#include <cfl_cgenerator.h>

Public Member Functions

 AttributeCFlags (void)
 
virtual ~AttributeCFlags (void)
 
void SetControllable (void)
 
void ClrControllable (void)
 
bool Controllable (void) const
 
void SetObservable (void)
 
void ClrObservable (void)
 
bool Observable (void) const
 
void SetForcible (void)
 
void ClrForcible (void)
 
bool Forcible (void) const
 
void SetHighlevel (void)
 
void SetLowlevel (void)
 
bool Highlevel (void) const
 
bool Lowlevel (void) const
 
virtual bool IsDefault (void) const
 
Typeoperator= (const Type &rSrc)
 
bool operator== (const Type &rOther) const
 
bool operator!= (const Type &rOther) const
 
- Public Member Functions inherited from faudes::AttributeFlags
 AttributeFlags (void)
 
 AttributeFlags (const AttributeFlags &rOther)
 
virtual ~AttributeFlags (void)
 
bool Test (fType mask) const
 
bool TestAll (fType mask) const
 
bool TestSome (fType mask) const
 
bool TestNone (fType mask) const
 
void Set (fType mask)
 
void Clr (fType mask)
 
Typeoperator= (const Type &rSrc)
 
bool operator== (const Type &rOther) const
 
bool operator!= (const Type &rOther) const
 
- Public Member Functions inherited from faudes::AttributeVoid
 AttributeVoid (void)
 
 AttributeVoid (const AttributeVoid &rSrcAttr)
 
virtual ~AttributeVoid (void)
 
virtual void SetDefault (void)
 
virtual void Clear (void)
 
Typeoperator= (const 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 TypeCopy (void) const
 
virtual const TypeCast (const Type *pOther) const
 
virtual TypeAssign (const Type &rSrc)
 
Typeoperator= (const 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 Attributes

static const fType mControllableFlag =0x01
 
static const fType mObservableFlag =0x02
 
static const fType mForcibleFlag =0x04
 
static const fType mAbstractionFlag =0x08
 
- Static Public Attributes inherited from faudes::AttributeFlags
static const fType mDefFlags =0x0
 

Protected Member Functions

void DoAssign (const AttributeCFlags &rSrcAttr)
 
bool DoEqual (const AttributeCFlags &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
 
- Protected Member Functions inherited from faudes::AttributeFlags
void DoAssign (const AttributeFlags &rSrcAttr)
 
bool DoEqual (const AttributeFlags &rOther) const
 
- Protected Member Functions inherited from faudes::AttributeVoid
void DoAssign (const AttributeVoid &rSrcAttr)
 
bool DoEqual (const AttributeVoid &rOther) const
 
virtual void DoDWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 
- Protected Member Functions inherited from faudes::Type
void DoAssign (const Type &rSrc)
 
bool DoEqual (const Type &rOther) const
 
virtual void DoSWrite (TokenWriter &rTw) const
 
virtual const TypeDefinitionTypeDefinitionp (void) const
 
virtual Token XBeginTag (const std::string &rLabel="", const std::string &rFallbackLabel="") const
 

Static Private Attributes

static const fType mDefCFlags =0x0a
 
static const fType mAllCFlags =0x0f
 

Additional Inherited Members

- Static Public Member Functions inherited from faudes::AttributeVoid
static void Skip (TokenReader &rTr)
 
- Public Attributes inherited from faudes::AttributeFlags
fType mFlags
 

Detailed Description

Attribute class to model event controllability properties.

This attribute is meant to be an event attribute and can distinguish between controllable, observable, forcible and abstraction events. It is based on faudes::AttributeFlags and uses the lower four bits in the flag word to store the respective boolean values. The AttributeCFlags class adds convenience functions to access these bits and a default-value that corresponds to observable and neiter controllable nor forcible.

Presuming that only controllability flags are uses (different from default), the token representation is by an Option String consisting of the initials c,o,f and a, where initials are capitatised for set flags and default values are not written; eg +C+ for a controllable event that is observable (default), not forcible (default) and
an abstraction event (default). If other than the four controllability bits are used, std. hex format is used.

Definition at line 56 of file cfl_cgenerator.h.

Constructor & Destructor Documentation

◆ AttributeCFlags()

faudes::AttributeCFlags::AttributeCFlags ( void  )
inline

Default constructor

Definition at line 69 of file cfl_cgenerator.h.

◆ ~AttributeCFlags()

virtual faudes::AttributeCFlags::~AttributeCFlags ( void  )
inlinevirtual

Destructor

Definition at line 72 of file cfl_cgenerator.h.

Member Function Documentation

◆ ClrControllable()

void faudes::AttributeCFlags::ClrControllable ( void  )
inline

Clear controllable flag

Definition at line 83 of file cfl_cgenerator.h.

◆ ClrForcible()

void faudes::AttributeCFlags::ClrForcible ( void  )
inline

Clear forcible flag

Definition at line 116 of file cfl_cgenerator.h.

◆ ClrObservable()

void faudes::AttributeCFlags::ClrObservable ( void  )
inline

Clear observable flag

Definition at line 99 of file cfl_cgenerator.h.

◆ Controllable()

bool faudes::AttributeCFlags::Controllable ( void  ) const
inline

Query controllablility

Definition at line 88 of file cfl_cgenerator.h.

◆ DoAssign()

void faudes::AttributeCFlags::DoAssign ( const AttributeCFlags rSrcAttr)
protected

Assignment method.

Parameters
rSrcAttrSource to assign from

Definition at line 49 of file cfl_cgenerator.cpp.

◆ DoEqual()

bool faudes::AttributeCFlags::DoEqual ( const AttributeCFlags rOther) const
protected

Test equality of configuration data.

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

Definition at line 55 of file cfl_cgenerator.cpp.

◆ DoRead()

void faudes::AttributeCFlags::DoRead ( TokenReader rTr,
const std::string &  rLabel = "",
const Type pContext = 0 
)
protectedvirtual

Reads attribute from TokenReader, see AttributeVoid for public wrappers. Reads a single token if it can be interpreted as AttributeCFlag, that is, if it is a respective option string or hex number. Label and Context argument are ignored. No token mismatch exceptions are thrown on error.

Parameters
rTrTokenReader to read from
rLabelSection to read
pContextRead context to provide contextual information
Exceptions
Exception
  • IO error (id 1)

Reimplemented from faudes::AttributeFlags.

Reimplemented in faudes::AttributePriority, and faudes::SimEventAttribute.

Definition at line 137 of file cfl_cgenerator.cpp.

◆ DoWrite()

void faudes::AttributeCFlags::DoWrite ( TokenWriter rTw,
const std::string &  rLabel = "",
const Type pContext = 0 
) const
protectedvirtual

Writes attribute to TokenWriter, see AttributeVoid for public wrappers. Label and Context argument are ignored.

Parameters
rTwTokenWriter to write to
rLabelSection to write
pContextWrite context to provide contextual information
Exceptions
Exception
  • IO error (id 2)

Reimplemented from faudes::AttributeFlags.

Reimplemented in faudes::AttributePriority, and faudes::SimEventAttribute.

Definition at line 66 of file cfl_cgenerator.cpp.

◆ DoXWrite()

void faudes::AttributeCFlags::DoXWrite ( TokenWriter rTw,
const std::string &  rLabel = "",
const Type pContext = 0 
) const
protectedvirtual

Writes attribute to TokenWriter (XML format), see AttributeVoid for public wrappers. Label and Context argument are ignored.

Parameters
rTwTokenWriter to write to
rLabelSection to write
pContextWrite context to provide contextual information
Exceptions
Exception
  • IO error (id 2)

Reimplemented from faudes::AttributeFlags.

Reimplemented in faudes::AttributePriority.

Definition at line 103 of file cfl_cgenerator.cpp.

◆ Forcible()

bool faudes::AttributeCFlags::Forcible ( void  ) const
inline

Query forcibility

Definition at line 121 of file cfl_cgenerator.h.

◆ Highlevel()

bool faudes::AttributeCFlags::Highlevel ( void  ) const
inline

Query abstaction flag

Definition at line 137 of file cfl_cgenerator.h.

◆ IsDefault()

virtual bool faudes::AttributeCFlags::IsDefault ( void  ) const
inlinevirtual

Test for default value

Reimplemented from faudes::AttributeFlags.

Reimplemented in faudes::SimEventAttribute, and faudes::AttributePriority.

Definition at line 148 of file cfl_cgenerator.h.

◆ Lowlevel()

bool faudes::AttributeCFlags::Lowlevel ( void  ) const
inline

Query abstaction flag

Definition at line 142 of file cfl_cgenerator.h.

◆ Observable()

bool faudes::AttributeCFlags::Observable ( void  ) const
inline

Query observablility

Definition at line 104 of file cfl_cgenerator.h.

◆ operator!=()

bool faudes::Type::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.

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

Definition at line 215 of file cfl_types.cpp.

◆ operator=()

Type & faudes::Type::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.

Parameters
rSrcSource to copy from
Returns
Reference to this object.

Definition at line 213 of file cfl_types.cpp.

◆ operator==()

bool faudes::Type::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.

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

Definition at line 214 of file cfl_types.cpp.

◆ SetControllable()

void faudes::AttributeCFlags::SetControllable ( void  )
inline

Set controllable flag

Definition at line 77 of file cfl_cgenerator.h.

◆ SetForcible()

void faudes::AttributeCFlags::SetForcible ( void  )
inline

Set forcible flag

Definition at line 110 of file cfl_cgenerator.h.

◆ SetHighlevel()

void faudes::AttributeCFlags::SetHighlevel ( void  )
inline

Set abstraction flag

Definition at line 127 of file cfl_cgenerator.h.

◆ SetLowlevel()

void faudes::AttributeCFlags::SetLowlevel ( void  )
inline

Clear abstraction flag

Definition at line 132 of file cfl_cgenerator.h.

◆ SetObservable()

void faudes::AttributeCFlags::SetObservable ( void  )
inline

Set observable flag

Definition at line 94 of file cfl_cgenerator.h.

Member Data Documentation

◆ mAbstractionFlag

const fType faudes::AttributeCFlags::mAbstractionFlag =0x08
static

Definition at line 154 of file cfl_cgenerator.h.

◆ mAllCFlags

const fType faudes::AttributeCFlags::mAllCFlags =0x0f
staticprivate

All flags used by CFlags

Definition at line 161 of file cfl_cgenerator.h.

◆ mControllableFlag

const fType faudes::AttributeCFlags::mControllableFlag =0x01
static

Definition at line 151 of file cfl_cgenerator.h.

◆ mDefCFlags

const fType faudes::AttributeCFlags::mDefCFlags =0x0a
staticprivate

Overall default value

Definition at line 158 of file cfl_cgenerator.h.

◆ mForcibleFlag

const fType faudes::AttributeCFlags::mForcibleFlag =0x04
static

Definition at line 153 of file cfl_cgenerator.h.

◆ mObservableFlag

const fType faudes::AttributeCFlags::mObservableFlag =0x02
static

Definition at line 152 of file cfl_cgenerator.h.


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

libFAUDES 2.33c --- 2025.05.15 --- c++ api documentaion by doxygen