|
|
||||||
|
Public Types |
Public Member Functions |
Static Public Member Functions |
Protected Types |
Protected Member Functions |
Protected Attributes |
Static Protected Attributes |
List of all members
faudes::TypeRegistry Class Reference Detailed DescriptionThe TypeRegistry registers faudes-types. A faudes-type may be any class derived from faudes::Type, e.g. EventSet and generator. The registry maintains a mapping from faudes-type names to registred faudes::TypeDefinition. It provides an interface to inspect TypeDefinitions or to construct faudes-type 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 47 of file cfl_registry.h.
Member Typedef Documentation◆ Iterator
Convenience typedef to access registry entries. Definition at line 52 of file cfl_registry.h. ◆ iterator
Convenience typedef to access registry entries. Definition at line 421 of file cfl_registry.h. Constructor & Destructor Documentation◆ TypeRegistry()
Constructor. Definition at line 427 of file cfl_registry.h. ◆ ~TypeRegistry()
Destructor. Definition at line 430 of file cfl_registry.h. Member Function Documentation◆ AutoRegistered() [1/2]
Get AutoRegister flag for given faudes-type. Access the AutoRegister flag of a type definition. The flag is true for entries which were instantiated automatically by static constructor objects. AutoRegistered flags will not be cleared.
Definition at line 239 of file cfl_registry.cpp. ◆ AutoRegistered() [2/2]
Set AutoRegistered flag for given faudes-type. Access the AutoRegister flag of a type definition. The flag is true for entries with were instantiated by automatically by static constructor objects. AutoRegistered flags will not be cleared.
Definition at line 229 of file cfl_registry.cpp. ◆ Begin()
STL interator to the internal type-name map.
Definition at line 127 of file cfl_registry.cpp. ◆ Clear()
Clear all registered type definitions. This will also delete the correponsing prototype objects. It will, however, not delete C++-autoregistered registry entries. Reimplemented from faudes::Type. Definition at line 72 of file cfl_registry.cpp. ◆ ClearAll()
Clear all registered type definitions. This will also delete the correponsing prototype objects. This version will also delete C++-autoregistered registry entries. Definition at line 106 of file cfl_registry.cpp. ◆ Definition() [1/2]
Look up the type definition by faudes-type name.
Definition at line 278 of file cfl_registry.cpp. ◆ Definition() [2/2]
Look up the type definition by faudes object.
Definition at line 290 of file cfl_registry.cpp. ◆ Definitionp() [1/2]
Look up the type definition by faudes-type name.
Definition at line 301 of file cfl_registry.cpp. ◆ Definitionp() [2/2]
Look up the type definition by faudes object.
Definition at line 309 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 extract documentation.
Reimplemented from faudes::Type. Definition at line 358 of file cfl_registry.cpp. ◆ End()
STL interator to the internal type-name map.
Definition at line 132 of file cfl_registry.cpp. ◆ Exists() [1/2]
Test existence of a faudes-type by its name.
Definition at line 347 of file cfl_registry.cpp. ◆ Exists() [2/2]
Test existence of a faudes-type by faudes object.
Definition at line 352 of file cfl_registry.cpp. ◆ G()
Method to access the single global instance of the registry. Definition at line 62 of file cfl_registry.cpp. ◆ Insert() [1/3]
template<class T >
Register a faudes-type with specified type name. This is a convenience function: it uses the template parameter to construct the new instance of TypeDefinition to be registered. However, no documentation is added. See also MergeDocumentation.
Definition at line 151 of file cfl_registry.h. ◆ Insert() [2/3]
Register a faudes-type with specified type name. This is a convenience function: it uses the specified object as a a prototype and registers it under the given name. The registry takes ownership of the prototype. However, no documentation is added. See also MergeDocumentation.
Definition at line 172 of file cfl_registry.h. ◆ Insert() [3/3]
Add another type definition to the registry. The registry takes the ownership pf the provided type definition. It will be deleted either in Clear() or when the registry is destructed. The insertion of an allready registered type is ignored as long as the ctype matches. If the ctype fails to match, an exception is thrown.
Definition at line 137 of file cfl_registry.cpp. ◆ MergeDocumentation() [1/2]
Scan file for type documentation. Convenience method, see also MergeDocumentation(TokenReader& rTr)
Definition at line 206 of file cfl_registry.cpp. ◆ MergeDocumentation() [2/2]
Scan token input for type documentation. This function scans the entire token stream for sections with label "TypeDefinition". Any such section that refers to a type name which is known to the registry, will be applied to the corresponding registry entry. Typical invokation is as follows void MergeDocumentation(TokenReader &rTr) Scan token input for type documentation. Definition: cfl_registry.cpp:178 static TypeRegistry * G() Method to access the single global instance of the registry. Definition: cfl_registry.cpp:62 void Insert(TypeDefinition *pTypeDef) Add another type definition to the registry. Definition: cfl_registry.cpp:137 vGenerator Generator Plain generator, api typedef for generator with no attributes. Definition: cfl_generator.h:3240
Definition at line 178 of file cfl_registry.cpp. ◆ NewObject() [1/2]
Construct a faudes object by type name. Uses the internal prototype object to construct an object of the same c type on the heap.
Definition at line 247 of file cfl_registry.cpp. ◆ NewObject() [2/2]Construct a faudes object by prototype object. Depreciated: use new on the faudes object instead.
Definition at line 265 of file cfl_registry.cpp. ◆ Prototype()
Look up the prototype object by faudes-type name.
Definition at line 318 of file cfl_registry.cpp. ◆ Size()
Return number of registered type definitions.
Definition at line 122 of file cfl_registry.cpp. ◆ TypeName() [1/2]
Look up the type name by faudes object.
Definition at line 326 of file cfl_registry.cpp. ◆ TypeName() [2/2]
Cosmetic: fix compile warning for recent LLVM/clang++. Reimplemented from faudes::Type. Definition at line 425 of file cfl_types.cpp. ◆ TypeTest()
Test type compatibility. Test whether the provided object can be casted to the specified type name,
Definition at line 336 of file cfl_registry.cpp. ◆ XElementTag() [1/2]
Get Xml element tag for given faudes-type. Access to the XElementTag of a type definition. The latter is used for Xml token IO of sets and vectors. Unregistered types return the empty string.
Definition at line 220 of file cfl_registry.cpp. ◆ XElementTag() [2/2]
Set Xml element tag for given faudes-type. Access to the XElementTag of a type definition. The latter is used for Xml token IO of sets and vectors. Unregistered types are silently ignored.
Definition at line 213 of file cfl_registry.cpp. Member Data Documentation◆ mIdToTypeDef
Definition at line 436 of file cfl_registry.h. ◆ mNameToTypeDef
Map to associate labels and faudes::TypeDefinitions. Definition at line 435 of file cfl_registry.h. ◆ mpInstance
Singleton instance. Definition at line 424 of file cfl_registry.h. The documentation for this class was generated from the following files: libFAUDES 2.32b --- 2024.03.01 --- c++ api documentaion by doxygen |