Detailed Description

This class extends the base Type by common features worthwhile for "large objects", e.g., object name, a cache for the regsitry record and convenience access wrappers.

Definition at line 1182 of file cfl_types.h.

#include <cfl_types.h>

Public Member Functions

 ExtType (void)
 
 ExtType (const ExtType &rType)
 
virtual ~ExtType (void)
 
const std::string & Name (void) const
 
void Name (const std::string &rName)
 
virtual const std::string & TypeName (void) const
 
virtual void TypeName (const std::string &rType)
 
virtual const std::string & ElementTag (void) const
 
virtual void ElementTag (const std::string &rTag)
 
virtual const std::string & ElementType (void) const
 
virtual const TypeDefinitionTypeDefinitionp (void) const
 
Typeoperator= (const Type &rSrc)
 
Typeoperator= (Type &&rSrc)
 
bool operator== (const Type &rOther) const
 
bool operator!= (const Type &rOther) const
 
- Public Member Functions inherited from faudes::AttrType
 AttrType (void)
 
 AttrType (const AttrType &rSrc)
 
virtual ~AttrType (void)
 
virtual bool IsDefault (void) const
 
Typeoperator= (const Type &rSrc)
 
Typeoperator= (Type &&rSrc)
 
bool operator== (const Type &rOther) const
 
bool operator!= (const Type &rOther) const
 
- Public Member Functions inherited from faudes::Type
 Type (void)
 
 Type (const Type &rType)
 
virtual ~Type (void)
 
virtual TypeNew (void) const
 
virtual TypeNewCpy (void) const
 
virtual const TypeCast (const Type *pOther) const
 
virtual void Clear (void)
 
virtual TypeCopy (const Type &rSrc)
 
virtual TypeMove (Type &rSrc)
 
Typeoperator= (const Type &rSrc)
 
Typeoperator= (Type &&rSrc)
 
virtual bool Equal (const Type &rOther) const
 
bool operator== (const Type &rOther) const
 
bool operator!= (const Type &rOther) const
 
void Write (const Type *pContext=0) const
 
void Write (const std::string &pFileName, const std::string &rLabel="", const Type *pContext=0, std::ios::openmode openmode=std::ios::out|std::ios::trunc) const
 
void Write (const std::string &pFileName, std::ios::openmode openmode) const
 
void Write (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 
virtual void XWrite (const std::string &pFileName, const std::string &rLabel="", const Type *pContext=0) const
 
void XWrite (const Type *pContext=0) const
 
void XWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 
std::string ToString (const std::string &rLabel="", const Type *pContext=0) const
 
std::string ToText (const std::string &rLabel="", const Type *pContext=0) const
 
void DWrite (const Type *pContext=0) const
 
void DWrite (const std::string &pFileName, const std::string &rLabel="", const Type *pContext=0, std::ios::openmode openmode=std::ios::out|std::ios::trunc) const
 
void DWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 
void SWrite (TokenWriter &rTw) const
 
void SWrite (void) const
 
std::string ToSText (void) const
 
void Read (const std::string &rFileName, const std::string &rLabel="", const Type *pContext=0)
 
void FromString (const std::string &rString, const std::string &rLabel="", const Type *pContext=0)
 
void Read (TokenReader &rTr, const std::string &rLabel="", const Type *pContext=0)
 

Protected Attributes

std::string mElementType
 
std::string mElementTagDef
 
std::string mObjectName
 

Private Attributes

const TypeDefinitionpTypeDefinition
 
std::string mFaudesTypeName
 
std::string mElementTag
 

Additional Inherited Members

- Static Public Member Functions inherited from faudes::AttrType
static void Skip (TokenReader &rTr)
 
- Protected Member Functions inherited from faudes::AttrType
void DoCopy (const AttrType &rSrc)
 
bool DoEqual (const AttrType &rOther) const
 
- Protected Member Functions inherited from faudes::Type
void DoCopy (const Type &rSrc)
 
void DoMove (Type &rSrc)
 
bool DoEqual (const Type &rOther) const
 
virtual void DoRead (TokenReader &rTr, const std::string &rLabel="", const Type *pContext=0)
 
virtual void DoWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 
virtual void DoXWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 
virtual void DoDWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 
virtual void DoSWrite (TokenWriter &rTw) const
 
virtual Token XBeginTag (const std::string &rLabel="", const std::string &rFallbackLabel="") const
 

Constructor & Destructor Documentation

◆ ExtType() [1/2]

faudes::ExtType::ExtType ( void  )

Constructor

Definition at line 434 of file cfl_types.cpp.

◆ ExtType() [2/2]

faudes::ExtType::ExtType ( const ExtType rType)

Copy constructor

Definition at line 437 of file cfl_types.cpp.

◆ ~ExtType()

faudes::ExtType::~ExtType ( void  )
virtual

Destructor

Definition at line 440 of file cfl_types.cpp.

Member Function Documentation

◆ ElementTag() [1/2]

void faudes::ExtType::ElementTag ( const std::string &  rTag)
virtual

Configure the element name tag.

This method allows to overwrite the tag used for elements in XML IO. For usual, you will register derived classes with the run-time-interface and set the elemen tag for XML IO.

Parameters
rTagTag to set

Definition at line 497 of file cfl_types.cpp.

◆ ElementTag() [2/2]

const std::string & faudes::ExtType::ElementTag ( void  ) const
virtual

Get the element name tag.

Tags used for XML IO when eriting elements of a container class. This is either the deribeved class default of found in the registry.

Returns
Tag

Definition at line 480 of file cfl_types.cpp.

◆ ElementType()

const std::string & faudes::ExtType::ElementType ( void  ) const
virtual

Get the element type.

This should be found in the registry.

Returns
Tag

Definition at line 503 of file cfl_types.cpp.

◆ Name() [1/2]

void faudes::ExtType::Name ( const std::string &  rName)
virtual

Set objects name

Parameters
rNameName to set

Reimplemented from faudes::Type.

Definition at line 448 of file cfl_types.cpp.

◆ Name() [2/2]

const std::string & faudes::ExtType::Name ( void  ) const
virtual

Get objects name

Returns
Name

Reimplemented from faudes::Type.

Definition at line 443 of file cfl_types.cpp.

◆ operator!=()

bool faudes::Type::operator!= ( const Type rOther) const

Test equality of configuration data. See operator==(const Type&).

This operator calls DoEqual(). Re-implementation can be done via the convenience macros FAUDES_TYPE_DECLARATION and FAUDES_TYPE_IMPLEMENTATION.

Parameters
rOtherOther objevt to compare with.
Returns
True on mismatch.

Definition at line 1136 of file cfl_types.cpp.

◆ operator=() [1/2]

Type & faudes::Type::operator= ( const Type rSrc)

Copy configuration data from other object. Derived classes should implement at least the signature with matching source and destination types via the DoCopy method. Additionally, one may implement variants with a base class as source, as mong as meaningul assigment is possible.

Re-implementation can be done via the convenience macros FAUDES_TYPE_DECLARATION and FAUDES_TYPE_IMPLEMENTATION.

Parameters
rSrcSource to copy from
Returns
Reference to this object.

Definition at line 1134 of file cfl_types.cpp.

◆ operator=() [2/2]

Type & faudes::Type::operator= ( Type &&  rSrc)

Copy configuration data from other object (destructive) Derived classes should implement at least the signature with matching source and destination types via the DoCopy method. Additionally, one may implement variants with a base class as source, as mong as meaningul assigment is possible.

Re-implementation can be done via the convenience macros FAUDES_TYPE_DECLARATION and FAUDES_TYPE_IMPLEMENTATION.

Parameters
rSrcSource to copy from
Returns
Reference to this object.

Definition at line 1134 of file cfl_types.cpp.

◆ operator==()

bool faudes::Type::operator== ( const Type rOther) const

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 operator calls DoEqual(). Re-implementation can be done via the convenience macros FAUDES_TYPE_DECLARATION and FAUDES_TYPE_IMPLEMENTATION.

Parameters
rOtherOther object to compare with.
Returns
True on match.

Definition at line 1135 of file cfl_types.cpp.

◆ TypeDefinitionp()

const TypeDefinition * faudes::ExtType::TypeDefinitionp ( void  ) const
virtual

Get registry record

Returns nullptr if not registered

Returns
Pointer to registry entry

Reimplemented from faudes::Type.

Definition at line 454 of file cfl_types.cpp.

◆ TypeName() [1/2]

void faudes::ExtType::TypeName ( const std::string &  rType)
virtual

Overwrite faudes-type name.

This method is used to overwrite the faudes-type identifyer to account for unregistered classe/

Parameters
rTypeFaudes-type name to set

Definition at line 475 of file cfl_types.cpp.

◆ TypeName() [2/2]

const std::string & faudes::ExtType::TypeName ( void  ) const
virtual

Get objects's type name.

Retrieve the faudes-type name from the type registry.

Returns
Faudes-type name or empty string.

Reimplemented from faudes::Type.

Definition at line 464 of file cfl_types.cpp.

Member Data Documentation

◆ mElementTag

std::string faudes::ExtType::mElementTag
private

Current/cached name of elements (use protected accessor methods for caching)

Definition at line 1293 of file cfl_types.h.

◆ mElementTagDef

std::string faudes::ExtType::mElementTagDef
protected

Defauft name of elements (if not over written manually or by registry)

Definition at line 1301 of file cfl_types.h.

◆ mElementType

std::string faudes::ExtType::mElementType
protected

Current/cached name of elements (use protected accessor methods for caching)

Definition at line 1298 of file cfl_types.h.

◆ mFaudesTypeName

std::string faudes::ExtType::mFaudesTypeName
private

Current/cached faudes type-name

Definition at line 1290 of file cfl_types.h.

◆ mObjectName

std::string faudes::ExtType::mObjectName
protected

object name

Definition at line 1304 of file cfl_types.h.

◆ pTypeDefinition

const TypeDefinition* faudes::ExtType::pTypeDefinition
private

TypeDefinition cache (should use guarded pointer here)

Definition at line 1287 of file cfl_types.h.


The documentation for this class was generated from the following files:

libFAUDES 2.34e --- 2026.03.16 --- c++ api documentaion by doxygen