Free Electron
Framework Basics

Directory Structure

In the root directory of the FE code base, there are several directories to make note of.

The bin/ contains python and shell scripts, mostly used to compile the software.

The doc/ contains the main doxygen pages, as well as some supporting images and text files. Additional doxygen '.dox' pages may be scattered throughout the code base.

The src/ contains the very fundamental pieces of FE. Within src/, platform/ files are mostly OS abstractions and simple data types. The memory/ files are really just break-out piece from platform/ that has to be compiled separately. The core/ files contain common objects used througout FE source. The plugin/ files provide the ability to add new arbitrary classes at run time using dynamic libraries. The data/ files provide a fast run-time database system. The signal/ files allow record objects from data/ to be used as signals.

Outside of src/, the source subdirectories are referred to as modules and the directories containing them are module sets (or "modsets").

The ext/ modset contains public well-supported modules, like operators and surfaces.

The lab/ modset contains public working modules with limited support. These may be fully functional, but aren't given as much immediate attention as the modules in ext/.

The old/ modset contains public modules which should be presumed not to work. They are kept around for historical reference.

The sample/ modset can contain public samples and tutorials.

Additional modsets can be placed in directories peer to the FE root directory. For example, if your FE root is at /opt/fe/base/, your organization could add an additional "modset root" at, say, /opt/fe/codebiz/. Under this, they could place modsets, and therein modules, perhaps like /opt/fe/codebiz/secret_modules/perpetual_motion/. To have the FE build system recognize the additional modset root, it would be added in /opt/fe/base/local.py with a changed setting similar to:

forge.modset_roots = ".:../codebiz"

Data Types

Many of the 'plain old data" types of C/C++ have typedefs in the src/platform/datatypes.h header.

FE has its own string class fe::String which is threadsafe and has very fast comparisons of short strings. Copying to and from std::string objects is trivial.

FE also has its own linked list fe::List which is directionally symmetrical and automatically corrects for iterators referencing entries that have been arbitrarily removed.

The FE dynamic array fe::Array is simply derived from std::vector, with the addition of bounds checking in debug builds.