|
|
||||||
|
Public Member Functions |
Static Public Member Functions |
Protected Member Functions |
Protected Attributes |
Friends |
List of all members
faudes::TypeDefinition Class Reference Detailed DescriptionA TypeDefinition defines a faudes-type in that it specifies a faudes-type name to identify the type and a method NewObject() to instantiate objects of the respective type. In this sense, TypeDefinition is a so called factory class. Technically, the TypeDefinition holds one instance of the faude type, the so called prototype object, and NewObject() invokes the New() method of the prototype. Notebly, there is only one class TypeDefinition that by parametrisation defins all derivates of Type. TypeDefinition is derived from faudes::Documentation and therefore additional documentation-data can be associated. Definition at line 1602 of file cfl_types.h.
Constructor & Destructor Documentation◆ TypeDefinition() [1/2]
Constructor The default constructor instantiates an invalid type definition without prototype. To construct a valid type definition, use the static Constructor() template function. Definition at line 1624 of file cfl_types.h. ◆ ~TypeDefinition()
◆ TypeDefinition() [2/2]
Disable copy constructor Definition at line 1770 of file cfl_types.h. Member Function Documentation◆ Clear()
Clear documentation-data; do NOT delete prototype (this is for using Read to merge/overwrite documentation) Reimplemented from faudes::Documentation. Definition at line 891 of file cfl_types.cpp. ◆ Constructor() [1/2]
template<class T >
Construct empty TypeDefinition object. The given template parameter denotes any libFAUDES class derived from faudes::Type A new instance of this class is assigned to member variable (pType) whereas the name is set as specified.
Definition at line 1881 of file cfl_types.h. ◆ Constructor() [2/2]
Construct empty TypeDefinition object. The given prototype is assigned to the member variable pType,
Definition at line 879 of file cfl_types.cpp. ◆ DoAssign()
Std faudes type interface: assignment.
Definition at line 902 of file cfl_types.cpp. ◆ DoEqual()
Std faudes type interface: test equality
Definition at line 916 of file cfl_types.cpp. ◆ DoRead()
Read configuration data of this object from TokenReader. The section defaults to "TypeDefinition", context ignored. Actual reading is done by DoReadCore.
Reimplemented from faudes::Documentation. Definition at line 927 of file cfl_types.cpp. ◆ DoReadCore()
Read configuration data of this object from TokenReader. This method reads members only, it does not read the section.
Reimplemented from faudes::Documentation. Definition at line 940 of file cfl_types.cpp. ◆ DoWrite()
Write configuration data of this object to TokenWriter. The section defaults to "TypeDefinition", context ignored. Actual writing is done by DoWriteCore.
Reimplemented from faudes::Documentation. Definition at line 972 of file cfl_types.cpp. ◆ DoWriteCore()
Write configuration data of this object to TokenWriter. This method wrtite plain member data, the section lables are not written.
Reimplemented from faudes::Documentation. Definition at line 981 of file cfl_types.cpp. ◆ ElementTag() [1/2]
Parameter access: Element Tag
Definition at line 1039 of file cfl_types.cpp. ◆ ElementTag() [2/2]
Parameter access: Element Tag This parameter is used for IO of sets and vectors. It determines the tag to used for individual elments.
Definition at line 1034 of file cfl_types.cpp. ◆ ElementType() [1/2]
Parameter access: Element Tag
Definition at line 1049 of file cfl_types.cpp. ◆ ElementType() [2/2]
Parameter access: Element Tag This parameter is used for IO of sets and vectors. It determines the type to used for individual elments.
Definition at line 1044 of file cfl_types.cpp. ◆ FromFile()
template<class T >
Construct TypeDefinition object and read name and documentation-data from TokenReader.
Definition at line 1894 of file cfl_types.h. ◆ NewObject()
Construct faudes-object on heap. Return pointer to new instance of assigned Type class. Note: If no prototype is installed, NULL is returned.
Definition at line 1024 of file cfl_types.cpp. ◆ operator!=()
Test equality of configuration data. See operator==(const Type&). This method calls the virtual method DoEqual(). Re-implementation can be done via the convenience macros FAUDES_TYPE_DECLARATION and FAUDES_TYPE_IMPLEMENTATION.
Definition at line 1272 of file cfl_types.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 1270 of file cfl_types.cpp. ◆ operator==()
Test equality of configuration data. The operator form of the equality test is only defined for matching types, no cast will be performed. Thus, the test will be optimistic if the type is not known at compiletime. The object name or id is not considered in the test. This methoc calls the virtual method DoEqual(). Re-implementation can be done via the convenience macros FAUDES_TYPE_DECLARATION and FAUDES_TYPE_IMPLEMENTATION.
Definition at line 1271 of file cfl_types.cpp. ◆ Prototype() [1/2]
Use given object as prototype. The TypeDefinition takes ownership of the provided object.
Definition at line 1008 of file cfl_types.cpp. ◆ Prototype() [2/2]
Return pointer to faudes-object prototype Note: this method is meant for inspection only, control over the prototype remains with the TypeDefinition. Use NewObject() to instantiate a new faudes-object.
Definition at line 1003 of file cfl_types.cpp. Friends And Related Function Documentation◆ TypeRegistry
Definition at line 1608 of file cfl_types.h. Member Data Documentation◆ mElementTag
Extra documentation/parameter: Element Tag Definition at line 1861 of file cfl_types.h. ◆ mElementType
Extra documentation/parameter: Element Type Definition at line 1858 of file cfl_types.h. ◆ mpType
Type-pointer tp prototype instance Definition at line 1855 of file cfl_types.h. The documentation for this class was generated from the following files: libFAUDES 2.33h --- 2025.06.18 --- c++ api documentaion by doxygen |