|
|
||||||
|
Public Types |
Public Member Functions |
Static Public Member Functions |
Protected Types |
Protected Member Functions |
Protected Attributes |
Static Protected Attributes |
List of all members
faudes::FunctionRegistry Class Reference Detailed DescriptionThe FunctionRegistry registers faudes-functions. A faudes-functions operates on faudes objects, eg the parallel composition of two generators is available as faudes-function. The registry maintains a mapping between function names and a coresponding function::Definition. The latter provides signatures, ie parameter types the function can take. The registry provides an interface to inspect TypeDefinitions or to construct function objects by their type name. Technical note: the class is implemented according to the "Singleton" design pattern, ie, only one global instance of the registry can exist. Definition at line 534 of file cfl_registry.h.
Member Typedef Documentation◆ Iterator
Convenience typedef to access registry entries Definition at line 541 of file cfl_registry.h. ◆ iterator
Convenience typedef to access registry entries Definition at line 775 of file cfl_registry.h. Constructor & Destructor Documentation◆ FunctionRegistry()
Constructor Definition at line 781 of file cfl_registry.h. ◆ ~FunctionRegistry()
Destructor Definition at line 784 of file cfl_registry.h. Member Function Documentation◆ Begin()
STL interator to the internal function-name map.
Definition at line 450 of file cfl_registry.cpp. ◆ Clear()
Clear all registered function definitions. This will also delete the correponsing prototype objects. Reimplemented from faudes::Type. Definition at line 428 of file cfl_registry.cpp. ◆ Definition() [1/2]
Look up the function definition by faudes object Techcal note: this implementation is slow, we should use a function id map.
Definition at line 572 of file cfl_registry.cpp. ◆ Definition() [2/2]
Look up the function definition by faudes-function name
Definition at line 560 of file cfl_registry.cpp. ◆ Definitionp()
Look up the function definition by faudes-function name
Definition at line 583 of file cfl_registry.cpp. ◆ DoWrite()
Write registry data of this to TokenWriter. Since the registry cannot reconfigure itself from a token stream, this output is informative only. However, MergeDocumentation will accept the format to insert/extract documentation.
Reimplemented from faudes::Type. Definition at line 612 of file cfl_registry.cpp. ◆ End()
STL interator to the internal function-name map.
Definition at line 455 of file cfl_registry.cpp. ◆ Exists() [1/2]
Test existence of a faudes-function by faudes object
Definition at line 606 of file cfl_registry.cpp. ◆ Exists() [2/2]
Test existence of a faudes-function by its name.
Definition at line 601 of file cfl_registry.cpp. ◆ FunctionName()
Look up the function name by faudes object
Definition at line 591 of file cfl_registry.cpp. ◆ G()
Method to access the single global instance of the registry. Definition at line 418 of file cfl_registry.cpp. ◆ Insert() [1/2]
template<class T >
Register a faudes-function with specified function name. This is a convenience function: it uses the template parameter to construct the new instance of FunctionDefinition to be registered. However, no documentation is added. See also MergeDocumentation.
Definition at line 630 of file cfl_registry.h. ◆ Insert() [2/2]
Add another function definition to the registry. The registry takes the ownership pf the provided function definition. It will be deleted either in Clear() or when the registry is destructed.
Definition at line 460 of file cfl_registry.cpp. ◆ MergeDocumentation() [1/2]
Scan file for function documentation. Convenience method, see also MergeDocumentation(TokenReader& rTr)
Definition at line 522 of file cfl_registry.cpp. ◆ MergeDocumentation() [2/2]
Scan token input for function documentation. This function scans the entire token stream for sections with label "FunctionDefinition". Any such section that refers to a function name which is known to the registry, will be applied to the corresponding registry entry.
Definition at line 489 of file cfl_registry.cpp. ◆ NewFunction() [1/2]Construct a faudes object by protofunction object. Depreciated: use new on the faudes object instead.
Definition at line 547 of file cfl_registry.cpp. ◆ NewFunction() [2/2]
Construct a faudes object by function name Uses the internal prototype object to construct an object of the same c function on the heap.
Definition at line 529 of file cfl_registry.cpp. ◆ operator=()
Assign configurationdata from other object. Derived classes should implement the operator form for the assignment for each source type which allows for a non-trivial assignment. This includes the particular case were the source and destination types match exactly. In the latter case the DoAssign method should be invoked. In contrast to the Assign function, the operator form must not be reimplemented for missmatched source types: the operator form only accepts sensible source types. This allows for compiletime typeckecking. However, the downside is that when the type is not known at compiletime, configuration is not properly assigned. Re-implementation can be done via the convenience macros FAUDES_TYPE_DECLARATION and FAUDES_TYPE_IMPLEMENTATION.
Definition at line 355 of file cfl_types.cpp. ◆ Size()
Return number of registered function definitions.
Definition at line 445 of file cfl_registry.cpp. Member Data Documentation◆ mIdToFunctionDef
Definition at line 790 of file cfl_registry.h. ◆ mNameToFunctionDef
Map to associate labels and faudes::FunctionDefinitions. Definition at line 789 of file cfl_registry.h. ◆ mpInstance
Singleton instance Definition at line 778 of file cfl_registry.h. The documentation for this class was generated from the following files: libFAUDES 2.33h --- 2025.06.18 --- c++ api documentaion by doxygen |