Detailed Description

Extended Type to base Attributes. Attributes are used as template parameters for faudes containers and facilitate the modelling of customized properties of events, states and transitions. See the class faudes::AttributeFlags for a non-trivial example.

To derive a class from faudes::AttrType you should reimplement the virtual interface

The class faudes::AttrType extends the base Type marginally to distinguish void attributes from plain type objects; i.e., we introduce a marker in the type hierarchy. There is (almost) nothing functional about this class and we should find ways to go without.

Definition at line 1128 of file cfl_types.h.

#include <cfl_types.h>

Public Member Functions

 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
 
virtual void Name (const std::string &rName)
 
virtual const std::string & Name (void) const
 
virtual const std::string & TypeName (void) 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)
 

Static Public Member Functions

static void Skip (TokenReader &rTr)
 

Protected Member Functions

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 const TypeDefinitionTypeDefinitionp (void) const
 
virtual Token XBeginTag (const std::string &rLabel="", const std::string &rFallbackLabel="") const
 

Constructor & Destructor Documentation

◆ AttrType() [1/2]

faudes::AttrType::AttrType ( void  )

Constructor

Definition at line 375 of file cfl_types.cpp.

◆ AttrType() [2/2]

faudes::AttrType::AttrType ( const AttrType rSrc)

Copy Constructor

Definition at line 380 of file cfl_types.cpp.

◆ ~AttrType()

faudes::AttrType::~AttrType ( void  )
virtual

Destructor

Definition at line 385 of file cfl_types.cpp.

Member Function Documentation

◆ DoCopy()

void faudes::AttrType::DoCopy ( const AttrType rSrc)
inlineprotected

Copy (no members, dummy)

Definition at line 1167 of file cfl_types.h.

◆ DoEqual()

bool faudes::AttrType::DoEqual ( const AttrType rOther) const
inlineprotected

Test (no members, dummy)

Definition at line 1170 of file cfl_types.h.

◆ IsDefault()

◆ 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 434 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 368 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 383 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 418 of file cfl_types.cpp.

◆ Skip()

void faudes::AttrType::Skip ( TokenReader rTr)
static

Skip attribute tokens.

Helper method to be called after all sttribute derived classes had their chance to read their data. It skips all tokens and sections until it reaches a String or decimal Integer. This should go to BaseSet.

Parameters
rTrTokenReader to read from
Exceptions
Exception
  • IO error (id 1)

Definition at line 390 of file cfl_types.cpp.


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

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