TnFOX
   HOME

TheInfoList



OR:

The TnFOX portability toolkit is a fork of the
FOX Foxes are small to medium-sized, omnivorous mammals belonging to several genera of the family Canidae. They have a flattened skull, upright, triangular ears, a pointed, slightly upturned snout, and a long bushy tail (or ''brush''). Twelve sp ...
GUI toolkit with most of the added code implementing orthogonal features (i.e. not substantially changing the FOX API) such that applications developed for FOX can be easily recompiled for TnFOX. Unusually, TnFOX also contains API emulations of some Qt library classes - according to the author, this was done to port a substantial project from Qt to FOX. Most of the added features implement a full "portability toolkit" library such that one can write one program to run anywhere - this differs from FOX which mostly just provides the GUI portability alone. TnFOX is therefore an example of an
operating system abstraction layer {{Short description, Application programming interface An operating system abstraction layer (OSAL) provides an application programming interface (API) to an abstract operating system making it easier and quicker to develop code for multiple softwa ...
. Unlike FOX, TnFOX supports only a restricted set of C++ compilers and operating systems. It only supports Microsoft's C++ compiler v7.1 and later, GCC v3.2 and later and
Intel C++ compiler Intel oneAPI DPC++/C++ Compiler and Intel C++ Compiler Classic are Intel’s C, C++, SYCL, and Data Parallel C++ (DPC++) compilers for Intel processor-based systems, available for Windows, Linux, and macOS operating systems. Overview Intel o ...
v8 or later. It also only runs on Windows 2000 or later, Linux 2.6 kernels or later,
FreeBSD FreeBSD is a free and open-source Unix-like operating system descended from the Berkeley Software Distribution (BSD), which was based on Research Unix. The first version of FreeBSD was released in 1993. In 2005, FreeBSD was the most popular ...
and Mac OS X 10.4 or later, though on any processor or architecture. TnFOX contains its own automatically generated bindings for Python based on Boost.Python library - such were the complexity of these it required adding the -fvisibility feature to GCC v4 onwards. However, the quality and state of these have languished in recent years. The library is no longer maintained by its author, as of 2012.See March 201
comment
by Niall Douglas: ''There hasn't been much work on TnFOX in recent years ... Probably, and sadly, most of the 40,000+ lines of my own code in TnFOX will be left to bit rot.''


Substantial Features of TnFOX

One of the more original features of TnFOX is its heavy usage of C++ metaprogramming though this is entirely kept away from the GUI side of things (for FOX compatibility). A full lightweight metaprogramming toolkit is included which allows many of the operations provided by the
Boost Boost, boosted or boosting may refer to: Science, technology and mathematics * Boost, positive manifold pressure in turbocharged engines * Boost (C++ libraries), a set of free peer-reviewed portable C++ libraries * Boost (material), a material b ...
metaprogramming library, including typelists, type traits, compile-time logic, functors, virtual table compilation, horizontal type list instantiation and more. Unlike Boost, due to the requirement for a modern C++ compiler, all the metaprogramming operates consistently across compilers without the need for ugly macros. Another unusual feature is the use of pervasive exception handling and safety whereby any line is assumed to always potentially throw an exception. TnFOX provides a C++ rollback mechanism (as originally proposed by
Andrei Alexandrescu Andrei Alexandrescu (born 1969) is a Romanian-American C++ and D language programmer and author. He is particularly known for his pioneering work on policy-based design implemented via template metaprogramming. These ideas are articulated in ...
) to keep track of what operations need to be undone at any given stage should an error occur - rather like a SQL transaction. One problem with this approach is the possibility of nested exception throws during object destruction which under the ISO C++ standard requires an immediate program termination - TnFOX works around this problem via preprocessing of the source to add extra support code. A quirky addition of the v0.88 release is to use Google Translate to convert its locale strings. While of dubious utility, especially for shorter strings, it nevertheless may save time during translations. Unlike most portability toolkits, TnFOX has been very extensively profiled and performance tuned for maximum speed and minimal memory usage. It has strong multithreading support including tuning to avoid two threads writing to the same cache line (which causes cache line bouncing and greatly bottlenecks parallel throughput). It optionally uses its own thread caching memory allocator, automatically uses dynamic algorithms which will trade speed for memory usage according to memory low conditions and has very strong x86 and x64 specific optimisations including a metaprogramming implementation of SIMD vectors which will automatically compile down into SSE operations (right up to SSE4 support). It has its own assembler written fast mutex implementation, extensive internal caching to avoid syscalls to the kernel and its own inter-process communication framework which can transport arbitrary C++ object instances from one place to another by leveraging metaprogramming to automatically implement serialisation & deserialisation. This is particularly evident in its SQL database interface where one can simply bind an arbitrary C++ object instance to a BLOB field and no further code is required. TnFOX optionally includes copies of the
OpenSSL OpenSSL is a software library for applications that provide secure communications over computer networks against eavesdropping or need to identify the party at the other end. It is widely used by Internet servers, including the majority of HTT ...
library and the SQLite library in order to implement its strong encryption and its default SQL database implementation respectively. It can be built modularly as a set of separate DLLs or monolithically. It also has full portable support for host operating system ACL security and knows how to protect sensitive data from entering the swap file, plus automatically shredding any deleted portions. It can access which user is running the process and how to escalate its privileges as necessary. It has a no GUI build suitable as a portability toolkit for daemon and system processes. This has no X11/GDI dependencies. TnFOX has already begun to add C++0x features for those compilers which support them - this being the next revision of the ISO C++ standard.


See also

* Widget toolkit *
Operating system abstraction layer {{Short description, Application programming interface An operating system abstraction layer (OSAL) provides an application programming interface (API) to an abstract operating system making it easier and quicker to develop code for multiple softwa ...
*
List of widget toolkits A ''list'' is any set of items in a row. List or lists may also refer to: People * List (surname) Organizations * List College, an undergraduate division of the Jewish Theological Seminary of America * SC Germania List, German rugby union ...
* FOX toolkit * Qt


References


External links


Project homepage
{{DEFAULTSORT:Tnfox Widget toolkits Free software programmed in C++ Software using the LGPL license