|
|
||||||
|
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 1467 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 1489 of file cfl_types.h. ◆ ~TypeDefinition()
◆ TypeDefinition() [2/2]
Disable copy constructor. Definition at line 1616 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 722 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 1724 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 710 of file cfl_types.cpp. ◆ DoAssign()
Std faudes type interface: assignment.
Definition at line 732 of file cfl_types.cpp. ◆ DoEqual()
Std faudes type interface: test equality.
Definition at line 745 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 755 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 768 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 791 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 800 of file cfl_types.cpp. ◆ FromFile()
template<class T >
Construct TypeDefinition object and read name and documentation-data from TokenReader.
Definition at line 1732 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 836 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 1137 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 1135 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 1136 of file cfl_types.cpp. ◆ Prototype() [1/2]
Use given object as prototype. The TypeDefinition takes ownership of the provided object.
Definition at line 820 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 815 of file cfl_types.cpp. ◆ XElementTag() [1/2]
Parameter access: Xml Element Tag.
Definition at line 852 of file cfl_types.cpp. ◆ XElementTag() [2/2]
Parameter access: Xml Element Tag. This parameter is used for Xml IO of sets and vectors. It determines the tag to used for individual elments.
Definition at line 847 of file cfl_types.cpp. Friends And Related Function Documentation◆ TypeRegistry
Definition at line 1473 of file cfl_types.h. Member Data Documentation◆ mpType
Type-pointer tp prototype instance. Definition at line 1701 of file cfl_types.h. ◆ mXElementTag
Extra documentation/parameter: Xml Element Tag. Definition at line 1704 of file cfl_types.h. The documentation for this class was generated from the following files: libFAUDES 2.32f --- 2024.12.22 --- c++ api documentaion by doxygen |