Code-generator common base class. More...
Definition in file cgp_codegenerator.h.
Go to the source code of this file.
Classes | |
class | CodeGenerator |
Code-generation common base. More... | |
struct | CodeGenerator::LineAddress |
Compiled record per input line. More... | |
struct | CodeGenerator::FlagExpression |
Compiled record per input flag-expression. More... | |
struct | CodeGenerator::TimerConfiguration |
Compiled record per timer acting. More... | |
struct | CodeGenerator::ActionAddress |
Compiled record per action-address. More... | |
class | CodeGenerator::TimerAction |
Compiled record per event on how it affects timers. More... | |
class | CodeGenerator::Registration< T > |
Registration class. More... | |
class | CodeGenerator::cgp_streambuf |
Code-Generator Registry | |
Derived classes register via a static registration mechanism to provide an application-invokable constructor. The static registry records the constructor with a std::string typename as identifier. The purpose of this mechanism is to instantiate derived classes by their identifier at runtime.E.g. instantiates a CodeGenerator object of the type registered by "iec". See the command-line tool compiledes.cpp for a relevant use case. Registration can be conveniently triggered by instantiation of a CodeGenerator::Registration object via the provided macro. E.g. in the source that defines the class IecCodeGenerator FAUDES_REGISTERCODEGENERATOR("iec",IecCodeGenerator);
is used to register the respective class with the identifier "iec". | |
#define | FAUDES_REGISTERCODEGENERATOR(ftype, ctype) static CodeGenerator::Registration<ctype> gRegister(ftype) |
Class registration macro. |
struct CodeGenerator::LineAddress |
struct CodeGenerator::TimerConfiguration |