Detailed Description

State attributes for hierarchical discrete event systems with inputs and outputs.

The flags are used by eg assertion functions to describe membership of the active events of a given state in a certain alphabet:

  • QY: only output (Y-) events are active.
  • QU: only input (U-) events are active.
  • additional flags QC,QP,QE,QL can be set/cleared to designate membership of the active events in the C-,P-,E-,L-alphabet, respectively. Membership in the union of several alphabets is possible by setting more than one of these flags.
  • states with active input- as well as active output-events are provided with the exclusive flags QYcUp, meaning that only events of the alphabet YC or UP are active, and QYlUe, meaning that only events of the alphabet YL or UE are active. QY,QU,QYcUp and QYlUe are exclusive by construction of the Set() operations.
  • Err: with public read/write access in all hiogenerators, this flag enables to specify so-called "Error behaviour" that is typically entered after unexpected input events, for example malfunction of a HioPlant after faulty operator input. The flag can be used by the model designer; also the hio function FreeInput() uses this flag when extending a hio generator by error behaviour in order to make an input free in this generator. Err is not bound to any formal definition and does not effect / can be combined with any of the remaining flags. Hence, Err remains untouched by the functions IsIoPlant(), IsIoController(), IsIoEnvironment(), IsIoConstraint() and UpdateStateAttributes().

Definition at line 256 of file hio_attributes.h.

#include <hio_attributes.h>

Public Member Functions

 HioStateFlags (void)
 Default constructor. More...
 
 HioStateFlags (const HioStateFlags &rSrc)
 Copy constructor. More...
 
virtual ~HioStateFlags (void)
 
virtual std::string ToString (void) const
 Write attribute to string. More...
 
void SetQY (void)
 Set QY-state flag. More...
 
void ClrQY (void)
 Clear QY-state flag. More...
 
bool IsQY (void) const
 Query QY-state flag. More...
 
void SetQU (void)
 Set QU-state flag. More...
 
void ClrQU (void)
 Clear QU-state flag. More...
 
bool IsQU (void) const
 Query QU-state flag. More...
 
void SetQC (void)
 Set QC-state flag. More...
 
void ClrQC (void)
 Clear QC-state flag. More...
 
bool IsQC (void) const
 Query QC-state flag. More...
 
void SetQP (void)
 Set QP-state flag. More...
 
void ClrQP (void)
 Clear QP-state flag. More...
 
bool IsQP (void) const
 Query QP-state flag. More...
 
void SetQE (void)
 Set QE-state flag. More...
 
void ClrQE (void)
 Clear QE-state flag. More...
 
bool IsQE (void) const
 Query QE-state flag. More...
 
void SetQL (void)
 Set QL-state flag. More...
 
void ClrQL (void)
 Clear QL-state flag. More...
 
bool IsQL (void) const
 Query QL-state flag. More...
 
void SetQYcUp (void)
 Set QYcUp-state flag. More...
 
void ClrQYcUp (void)
 Clear QYcUp-state flag. More...
 
bool IsQYcUp (void) const
 Query QYcUp-state flag. More...
 
void SetQYlUe (void)
 Set QYlUe-state flag. More...
 
void ClrQYlUe (void)
 Clear QYlUe-state flag. More...
 
bool IsQYlUe (void) const
 Query QYlUe-state flag. More...
 
void SetErr (void)
 Set Err-state flag. More...
 
void ClrErr (void)
 Clear Err-state flag. More...
 
bool IsErr (void) const
 Query Err-state flag. More...
 
bool IsDefault (void) const
 Test for default value. More...
 
- Public Member Functions inherited from faudes::AttributeFlags
 AttributeFlags (void)
 Default constructor. More...
 
 AttributeFlags (const AttributeFlags &rOther)
 Copy constructor. More...
 
virtual ~AttributeFlags (void)
 Destructor. More...
 
bool Test (fType mask) const
 Test a flag. More...
 
bool TestAll (fType mask) const
 Test multible flags, combine by "and". More...
 
bool TestSome (fType mask) const
 Test multible flags, combine by "or". More...
 
bool TestNone (fType mask) const
 Test multible flags, combine by "not or". More...
 
void Set (fType mask)
 Set multiple flags. More...
 
void Clr (fType mask)
 Clear multiple flags. More...
 
- Public Member Functions inherited from faudes::AttributeVoid
 AttributeVoid (void)
 Constructor. More...
 
 AttributeVoid (const AttributeVoid &rSrcAttr)
 Copy Constructor. More...
 
virtual ~AttributeVoid (void)
 Destructor. More...
 
virtual void SetDefault (void)
 Set to default value. More...
 
virtual void Clear (void)
 Synonym for SetDefault to match std interface. More...
 
- Public Member Functions inherited from faudes::Type
 Type (void)
 Constructor. More...
 
 Type (const Type &rType)
 Copy constructor. More...
 
virtual ~Type (void)
 Destructor. More...
 
virtual TypeNew (void) const
 Construct on heap. More...
 
virtual TypeCopy (void) const
 Construct on heap. More...
 
virtual const TypeCast (const Type *pOther) const
 Cast other object to this type. More...
 
virtual TypeAssign (const Type &rSrc)
 Assign configuration data from other object. More...
 
virtual Typeoperator= (const Type &rSrc)
 Assign configurationdata from other object. More...
 
virtual bool Equal (const Type &rOther) const
 Test equality of configuration data. More...
 
virtual bool operator== (const Type &rOther) const
 Test equality of configuration data. More...
 
virtual bool operator!= (const Type &rOther) const
 Test equality of configuration data. More...
 
virtual void Name (const std::string &rName)
 Set the objects's name. More...
 
virtual const std::string & Name (void) const
 Get objects's name. More...
 
virtual const std::string & TypeName (void) const
 Get objects's type name. More...
 
void Write (const Type *pContext=0) const
 Write configuration data to console. More...
 
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
 Write configuration data to a file. More...
 
void Write (const std::string &pFileName, std::ios::openmode openmode) const
 Write configuration data to a file. More...
 
void Write (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 Write configuration data to TokenWriter. More...
 
virtual void XWrite (const std::string &pFileName, const std::string &rLabel="", const Type *pContext=0) const
 Write configuration data to an XML file. More...
 
void XWrite (const Type *pContext=0) const
 Write configuration data in XML format to concole Note: this write function uses the virtual function DoXWrite(), to be reimplemented by derived classes. More...
 
void XWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 Write configuration data in XML format to TokenWriter. More...
 
std::string ToString (const std::string &rLabel="", const Type *pContext=0) const
 Write configuration data to a string. More...
 
std::string ToText (const std::string &rLabel="", const Type *pContext=0) const
 Write configuration data to a formated string. More...
 
void DWrite (const Type *pContext=0) const
 Write configuration data to console, debugging format. More...
 
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
 Write configuration data to a file, debugging format. More...
 
void DWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 Write configuration data in debug format to TokenWriter. More...
 
void SWrite (TokenWriter &rTw) const
 Write statistics comment to TokenWriter. More...
 
void SWrite (void) const
 Write statistics comment to console. More...
 
std::string ToSText (void) const
 Write statistics to a string. More...
 
void Read (const std::string &rFileName, const std::string &rLabel="", const Type *pContext=0)
 Read configuration data from file with label specified. More...
 
void FromString (const std::string &rString, const std::string &rLabel="", const Type *pContext=0)
 Read configuration data from a string. More...
 
void Read (TokenReader &rTr, const std::string &rLabel="", const Type *pContext=0)
 Read configuration data from TokenReader with label sepcified. More...
 

Static Public Attributes

static const fType mQYFlag =0x01
 
static const fType mQUFlag =0x02
 
static const fType mQCFlag =0x04
 
static const fType mQPFlag =0x08
 
static const fType mQEFlag =0x10
 
static const fType mQLFlag =0x20
 
static const fType mQYcUpFlag =0x40
 
static const fType mQYlUeFlag =0x80
 
static const fType mErrFlag =0x100
 
- Static Public Attributes inherited from faudes::AttributeFlags
static const fType mDefFlags =0x0
 

Protected Member Functions

void DoAssign (const HioStateFlags &rSrcAttr)
 Assignment method. More...
 
virtual void DoRead (TokenReader &rTr, const std::string &rLabel="", const Type *pContext=0)
 Reads attribute from TokenReader, see AttributeVoid for public wrappers. More...
 
virtual void DoWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 Writes attribute to TokenWriter, see AttributeVoid for public wrappers. More...
 
- Protected Member Functions inherited from faudes::AttributeFlags
void DoAssign (const AttributeFlags &rSrcAttr)
 Assignment method. More...
 
bool DoEqual (const AttributeFlags &rOther) const
 Test equality of configuration data. More...
 
virtual void DoXWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 Write to TokenWriter, see Type for public wrappers. More...
 
- Protected Member Functions inherited from faudes::AttributeVoid
void DoAssign (const AttributeVoid &rSrcAttr)
 Assign attribute members. More...
 
bool DoEqual (const AttributeVoid &rOther) const
 Test equality of configuration data. More...
 
virtual void DoDWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 Actual write method to write the attribute to a TokenWriter. More...
 
- Protected Member Functions inherited from faudes::Type
void DoAssign (const Type &rSrc)
 Assign configuration data from other object. More...
 
bool DoEqual (const Type &rOther) const
 Test equality of configuration data. More...
 
virtual void DoSWrite (TokenWriter &rTw) const
 Write statistical data as a comment to TokenWriter. More...
 
virtual const TypeDefinitionTypeDefinitionp (void) const
 Get objects's type definition. More...
 
virtual Token XBeginTag (const std::string &rLabel="", const std::string &rFallbackLabel="") const
 

Static Private Attributes

static const fType mDefHioStateFlags =0x000
 
static const fType mAllHioStateFlags =0x1FF
 

Additional Inherited Members

- Static Public Member Functions inherited from faudes::AttributeVoid
static void Skip (TokenReader &rTr)
 Skip attribute tokens. More...
 
- Public Attributes inherited from faudes::AttributeFlags
fType mFlags
 Flags (public access for convenience)
More...
 

Constructor & Destructor Documentation

◆ HioStateFlags() [1/2]

faudes::HioStateFlags::HioStateFlags ( void  )
inline

Default constructor.

Definition at line 265 of file hio_attributes.h.

◆ HioStateFlags() [2/2]

faudes::HioStateFlags::HioStateFlags ( const HioStateFlags rSrc)
inline

Copy constructor.

Definition at line 268 of file hio_attributes.h.

◆ ~HioStateFlags()

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

Definition at line 271 of file hio_attributes.h.

Member Function Documentation

◆ ClrErr()

void faudes::HioStateFlags::ClrErr ( void  )
inline

Clear Err-state flag.

Definition at line 457 of file hio_attributes.h.

◆ ClrQC()

void faudes::HioStateFlags::ClrQC ( void  )
inline

Clear QC-state flag.

Definition at line 339 of file hio_attributes.h.

◆ ClrQE()

void faudes::HioStateFlags::ClrQE ( void  )
inline

Clear QE-state flag.

Definition at line 375 of file hio_attributes.h.

◆ ClrQL()

void faudes::HioStateFlags::ClrQL ( void  )
inline

Clear QL-state flag.

Definition at line 393 of file hio_attributes.h.

◆ ClrQP()

void faudes::HioStateFlags::ClrQP ( void  )
inline

Clear QP-state flag.

Definition at line 357 of file hio_attributes.h.

◆ ClrQU()

void faudes::HioStateFlags::ClrQU ( void  )
inline

Clear QU-state flag.

Definition at line 321 of file hio_attributes.h.

◆ ClrQY()

void faudes::HioStateFlags::ClrQY ( void  )
inline

Clear QY-state flag.

Definition at line 298 of file hio_attributes.h.

◆ ClrQYcUp()

void faudes::HioStateFlags::ClrQYcUp ( void  )
inline

Clear QYcUp-state flag.

Definition at line 416 of file hio_attributes.h.

◆ ClrQYlUe()

void faudes::HioStateFlags::ClrQYlUe ( void  )
inline

Clear QYlUe-state flag.

Definition at line 439 of file hio_attributes.h.

◆ DoAssign()

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

Assignment method.

Parameters
rSrcAttrSource to assign from

Definition at line 122 of file hio_attributes.cpp.

◆ DoRead()

void faudes::HioStateFlags::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 HioStateFlag, 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.

Definition at line 172 of file hio_attributes.cpp.

◆ DoWrite()

void faudes::HioStateFlags::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.

Definition at line 128 of file hio_attributes.cpp.

◆ IsDefault()

bool faudes::HioStateFlags::IsDefault ( void  ) const
inlinevirtual

Test for default value.

Reimplemented from faudes::AttributeFlags.

Definition at line 468 of file hio_attributes.h.

◆ IsErr()

bool faudes::HioStateFlags::IsErr ( void  ) const
inline

Query Err-state flag.

Definition at line 463 of file hio_attributes.h.

◆ IsQC()

bool faudes::HioStateFlags::IsQC ( void  ) const
inline

Query QC-state flag.

Definition at line 345 of file hio_attributes.h.

◆ IsQE()

bool faudes::HioStateFlags::IsQE ( void  ) const
inline

Query QE-state flag.

Definition at line 381 of file hio_attributes.h.

◆ IsQL()

bool faudes::HioStateFlags::IsQL ( void  ) const
inline

Query QL-state flag.

Definition at line 399 of file hio_attributes.h.

◆ IsQP()

bool faudes::HioStateFlags::IsQP ( void  ) const
inline

Query QP-state flag.

Definition at line 363 of file hio_attributes.h.

◆ IsQU()

bool faudes::HioStateFlags::IsQU ( void  ) const
inline

Query QU-state flag.

Definition at line 327 of file hio_attributes.h.

◆ IsQY()

bool faudes::HioStateFlags::IsQY ( void  ) const
inline

Query QY-state flag.

Definition at line 304 of file hio_attributes.h.

◆ IsQYcUp()

bool faudes::HioStateFlags::IsQYcUp ( void  ) const
inline

Query QYcUp-state flag.

Definition at line 422 of file hio_attributes.h.

◆ IsQYlUe()

bool faudes::HioStateFlags::IsQYlUe ( void  ) const
inline

Query QYlUe-state flag.

Definition at line 445 of file hio_attributes.h.

◆ SetErr()

void faudes::HioStateFlags::SetErr ( void  )
inline

Set Err-state flag.

Definition at line 451 of file hio_attributes.h.

◆ SetQC()

void faudes::HioStateFlags::SetQC ( void  )
inline

Set QC-state flag.

Definition at line 333 of file hio_attributes.h.

◆ SetQE()

void faudes::HioStateFlags::SetQE ( void  )
inline

Set QE-state flag.

Definition at line 369 of file hio_attributes.h.

◆ SetQL()

void faudes::HioStateFlags::SetQL ( void  )
inline

Set QL-state flag.

Definition at line 387 of file hio_attributes.h.

◆ SetQP()

void faudes::HioStateFlags::SetQP ( void  )
inline

Set QP-state flag.

Definition at line 351 of file hio_attributes.h.

◆ SetQU()

void faudes::HioStateFlags::SetQU ( void  )
inline

Set QU-state flag.

Definition at line 310 of file hio_attributes.h.

◆ SetQY()

void faudes::HioStateFlags::SetQY ( void  )
inline

Set QY-state flag.

Definition at line 287 of file hio_attributes.h.

◆ SetQYcUp()

void faudes::HioStateFlags::SetQYcUp ( void  )
inline

Set QYcUp-state flag.

Definition at line 405 of file hio_attributes.h.

◆ SetQYlUe()

void faudes::HioStateFlags::SetQYlUe ( void  )
inline

Set QYlUe-state flag.

Definition at line 428 of file hio_attributes.h.

◆ ToString()

std::string faudes::HioStateFlags::ToString ( void  ) const
virtual

Write attribute to string.

Returns
string representation of attributes

Definition at line 167 of file hio_attributes.cpp.

Member Data Documentation

◆ mAllHioStateFlags

const fType faudes::HioStateFlags::mAllHioStateFlags =0x1FF
staticprivate

Definition at line 487 of file hio_attributes.h.

◆ mDefHioStateFlags

const fType faudes::HioStateFlags::mDefHioStateFlags =0x000
staticprivate

Definition at line 484 of file hio_attributes.h.

◆ mErrFlag

const fType faudes::HioStateFlags::mErrFlag =0x100
static

Definition at line 480 of file hio_attributes.h.

◆ mQCFlag

const fType faudes::HioStateFlags::mQCFlag =0x04
static

Definition at line 474 of file hio_attributes.h.

◆ mQEFlag

const fType faudes::HioStateFlags::mQEFlag =0x10
static

Definition at line 476 of file hio_attributes.h.

◆ mQLFlag

const fType faudes::HioStateFlags::mQLFlag =0x20
static

Definition at line 477 of file hio_attributes.h.

◆ mQPFlag

const fType faudes::HioStateFlags::mQPFlag =0x08
static

Definition at line 475 of file hio_attributes.h.

◆ mQUFlag

const fType faudes::HioStateFlags::mQUFlag =0x02
static

Definition at line 473 of file hio_attributes.h.

◆ mQYcUpFlag

const fType faudes::HioStateFlags::mQYcUpFlag =0x40
static

Definition at line 478 of file hio_attributes.h.

◆ mQYFlag

const fType faudes::HioStateFlags::mQYFlag =0x01
static

Definition at line 472 of file hio_attributes.h.

◆ mQYlUeFlag

const fType faudes::HioStateFlags::mQYlUeFlag =0x80
static

Definition at line 479 of file hio_attributes.h.


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

libFAUDES 2.32b --- 2024.03.01 --- c++ api documentaion by doxygen