libFAUDES

Sections

Index

faudes::HioStateFlags Class Reference
[Hierarchical I/O Systems PlugIn]

#include <hio_attributes.h>

Inherits faudes::AttributeFlags.

List of all members.


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().

Public Member Functions

 HioStateFlags (void)
 Default constructor.
virtual ~HioStateFlags (void)
virtual HioStateFlagsNew (void) const
 Construct on heap.
virtual std::string ToString (void) const
 Write attribute to string.
void SetQY (void)
 Set QY-state flag.
void ClrQY (void)
 Clear QY-state flag.
bool IsQY (void) const
 Query QY-state flag.
void SetQU (void)
 Set QU-state flag.
void ClrQU (void)
 Clear QU-state flag.
bool IsQU (void) const
 Query QU-state flag.
void SetQC (void)
 Set QC-state flag.
void ClrQC (void)
 Clear QC-state flag.
bool IsQC (void) const
 Query QC-state flag.
void SetQP (void)
 Set QP-state flag.
void ClrQP (void)
 Clear QP-state flag.
bool IsQP (void) const
 Query QP-state flag.
void SetQE (void)
 Set QE-state flag.
void ClrQE (void)
 Clear QE-state flag.
bool IsQE (void) const
 Query QE-state flag.
void SetQL (void)
 Set QL-state flag.
void ClrQL (void)
 Clear QL-state flag.
bool IsQL (void) const
 Query QL-state flag.
void SetQYcUp (void)
 Set QYcUp-state flag.
void ClrQYcUp (void)
 Clear QYcUp-state flag.
bool IsQYcUp (void) const
 Query QYcUp-state flag.
void SetQYlUe (void)
 Set QYlUe-state flag.
void ClrQYlUe (void)
 Clear QYlUe-state flag.
bool IsQYlUe (void) const
 Query QYlUe-state flag.
void SetErr (void)
 Set Err-state flag.
void ClrErr (void)
 Clear Err-state flag.
bool IsErr (void) const
 Query Err-state flag.
bool IsDefault (void) const
 Test for default value.

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

Protected Member Functions

virtual void DoRead (TokenReader &rTr, const std::string &rLabel="", const Type *pContext=0)
 Reads attribute from TokenReader, see AttributeVoid for public wrappers.
virtual void DoWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 Writes attribute to TokenWriter, see AttributeVoid for public wrappers.

Static Private Attributes

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


Constructor & Destructor Documentation

faudes::HioStateFlags::HioStateFlags ( void   )  [inline]

Default constructor.

virtual faudes::HioStateFlags::~HioStateFlags ( void   )  [inline, virtual]


Member Function Documentation

virtual HioStateFlags* faudes::HioStateFlags::New ( void   )  const [inline, virtual]

Construct on heap.

Technically not a constructor, this function creates an object with the same type. It is the callers reponsabilty to delete the object when no longer needed. Derived attribute classes must reimplement this function for container based token io to operate properly.

Returns:
Pointer to new attribute object

Reimplemented from faudes::AttributeFlags.

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

Write attribute to string.

Returns:
string representation of attributes

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

Set QY-state flag.

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

Clear QY-state flag.

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

Query QY-state flag.

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

Set QU-state flag.

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

Clear QU-state flag.

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

Query QU-state flag.

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

Set QC-state flag.

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

Clear QC-state flag.

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

Query QC-state flag.

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

Set QP-state flag.

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

Clear QP-state flag.

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

Query QP-state flag.

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

Set QE-state flag.

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

Clear QE-state flag.

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

Query QE-state flag.

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

Set QL-state flag.

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

Clear QL-state flag.

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

Query QL-state flag.

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

Set QYcUp-state flag.

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

Clear QYcUp-state flag.

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

Query QYcUp-state flag.

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

Set QYlUe-state flag.

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

Clear QYlUe-state flag.

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

Query QYlUe-state flag.

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

Set Err-state flag.

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

Clear Err-state flag.

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

Query Err-state flag.

bool faudes::HioStateFlags::IsDefault ( void   )  const [inline, virtual]

Test for default value.

Reimplemented from faudes::AttributeFlags.

void faudes::HioStateFlags::DoRead ( TokenReader rTr,
const std::string &  rLabel = "",
const Type pContext = 0 
) [protected, virtual]

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:
rTr TokenReader to read from
rLabel Section to read
pContext Read context to provide contextual information
Exceptions:
Exception 
  • IO error (id 1)

Reimplemented from faudes::AttributeFlags.

void faudes::HioStateFlags::DoWrite ( TokenWriter rTw,
const std::string &  rLabel = "",
const Type pContext = 0 
) const [protected, virtual]

Writes attribute to TokenWriter, see AttributeVoid for public wrappers.

Label and Context argument are ignored.

Parameters:
rTw TokenWriter to write to
rLabel Section to write
pContext Write context to provide contextual information
Exceptions:
Exception 
  • IO error (id 2)

Reimplemented from faudes::AttributeFlags.


Member Data Documentation

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

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

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

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

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

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

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

const fType faudes::HioStateFlags::mDefHioStateFlags = 0x000 [static, private]

const fType faudes::HioStateFlags::mAllHioStateFlags = 0x1FF [static, private]


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

libFAUDES 2.13a c++ source docu by doxygen 1.5.6