Code-generator common base class. More...
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... | |
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. static CodeGenerator * New(const std::string &type) Instantiate by identifier (returns 0 on unknown class) Definition: cgp_codegenerator.cpp:63 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);
#define FAUDES_REGISTERCODEGENERATOR(ftype, ctype) Class registration macro. Definition: cgp_codegenerator.h:831 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 |
Definition at line 472 of file cgp_codegenerator.h.
struct CodeGenerator::FlagExpression |
Definition at line 489 of file cgp_codegenerator.h.
Class Members | ||
---|---|---|
string | mAddress | target expression to represent the line value |
EventSet | mEvents | events to trigger on positive evaluation |
struct CodeGenerator::TimerConfiguration |
Definition at line 504 of file cgp_codegenerator.h.
Class Members | ||
---|---|---|
string | mAddress | target address prefix to maintain timer state |
string | mElapseEvent |
event to trigger on timer elapse |
string | mInitialValue | target representation of initial value |
EventSet | mStartEvents | start events as in AttributeCodeGeneratorEvent |
EventSet | mStopEvents | stop events as in AttributeCodeGeneratorEvent |
EventSet | mResetEvents | reset events as in AttributeCodeGeneratorEvent |
struct CodeGenerator::ActionAddress |
Definition at line 538 of file cgp_codegenerator.h.
Class Members | ||
---|---|---|
string | mAddress | target address as specified in configuration |
bool | mSetClr | is a set/clr type of address |
bool | mExe | is an executable type of address |