Detailed Description

Attributes for states in DESs with in- and outputs.

The class AttributeIosState holds a bitarray to handle a state's io-properties. A state is said to be an in- or output state if the set of active events contains only in- or output events.

In order to envolve the state's io-properties during file-io the DoRead/DoWrite methods were overwritten. Use +I+ for input, +O+ for output states.

Definition at line 245 of file ios_attributes.h.

#include <ios_attributes.h>

Public Member Functions

 AttributeIosState (void)
 Default constructor. More...
 
 AttributeIosState (const AttributeIosState &rSrc)
 Copy constructor. More...
 
virtual ~AttributeIosState (void)
 Destructor. More...
 
void SetOutput (void)
 Set output flag. More...
 
void ClrOutput (void)
 Clear output flag. More...
 
void SetInput (void)
 Set input flag. More...
 
void ClrInput (void)
 Clear input flag. More...
 
void SetError (void)
 Set error flag. More...
 
void ClrError (void)
 Clear error flag. More...
 
bool Output (void) const
 Test output flag. More...
 
bool Input (void) const
 Test input flag. More...
 
bool Error (void) const
 Check error flag. More...
 
bool IsDefault (void) const
 Check a state's io-properties for default value. More...
 
virtual std::string ToString (void) const
 Write attribute to string. 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...
 
Typeoperator= (const Type &rSrc)
 Assign configurationdata from other object. More...
 
bool operator== (const Type &rOther) const
 Test equality of configuration data. More...
 
bool operator!= (const Type &rOther) const
 Test equality of configuration data. 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...
 
Typeoperator= (const Type &rSrc)
 Assign configurationdata from other object. More...
 
bool operator== (const Type &rOther) const
 Test equality of configuration data. More...
 
bool operator!= (const Type &rOther) const
 Test equality of configuration data. 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...
 
Typeoperator= (const Type &rSrc)
 Assign configurationdata from other object. More...
 
virtual bool Equal (const Type &rOther) const
 Test equality of configuration data. More...
 
bool operator== (const Type &rOther) const
 Test equality of configuration data. More...
 
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 mInputFlag = 0x10
 
static const fType mOutputFlag = 0x20
 
static const fType mErrorFlag = 0x40
 
- Static Public Attributes inherited from faudes::AttributeFlags
static const fType mDefFlags =0x0
 

Protected Member Functions

void DoAssign (const AttributeIosState &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...
 
virtual void DoXWrite (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...
 
- 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 Protected Attributes

static const fType mDefIosFlags = 0x00
 
static const fType mAllIosFlags = 0x70
 

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

◆ AttributeIosState() [1/2]

faudes::AttributeIosState::AttributeIosState ( void  )
inline

Default constructor.

Definition at line 255 of file ios_attributes.h.

◆ AttributeIosState() [2/2]

faudes::AttributeIosState::AttributeIosState ( const AttributeIosState rSrc)
inline

Copy constructor.

Definition at line 262 of file ios_attributes.h.

◆ ~AttributeIosState()

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

Destructor.

Definition at line 269 of file ios_attributes.h.

Member Function Documentation

◆ ClrError()

void faudes::AttributeIosState::ClrError ( void  )
inline

Clear error flag.

Definition at line 326 of file ios_attributes.h.

◆ ClrInput()

void faudes::AttributeIosState::ClrInput ( void  )
inline

Clear input flag.

Note: this will clear the input flag.

Definition at line 308 of file ios_attributes.h.

◆ ClrOutput()

void faudes::AttributeIosState::ClrOutput ( void  )
inline

Clear output flag.

Note: this will clear the input flag.

Definition at line 287 of file ios_attributes.h.

◆ DoAssign()

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

Assignment method.

Parameters
rSrcAttrSource to assign from

Definition at line 180 of file ios_attributes.cpp.

◆ DoRead()

void faudes::AttributeIosState::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 IosStateFlag, 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 248 of file ios_attributes.cpp.

◆ DoWrite()

void faudes::AttributeIosState::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 193 of file ios_attributes.cpp.

◆ DoXWrite()

void faudes::AttributeIosState::DoXWrite ( 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 218 of file ios_attributes.cpp.

◆ Error()

bool faudes::AttributeIosState::Error ( void  ) const
inline

Check error flag.

Returns
true: state is an error state false: state is not an error state

Definition at line 362 of file ios_attributes.h.

◆ Input()

bool faudes::AttributeIosState::Input ( void  ) const
inline

Test input flag.

Returns
true: state is an input state false: state is not an input state

Definition at line 349 of file ios_attributes.h.

◆ IsDefault()

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

Check a state's io-properties for default value.

If a state has default properties, it's neither an input nor to output state.

Returns
true: event has default properties false: event has non-default properties

Reimplemented from faudes::AttributeFlags.

Definition at line 376 of file ios_attributes.h.

◆ Output()

bool faudes::AttributeIosState::Output ( void  ) const
inline

Test output flag.

Returns
true: state is an output state false: state is not an output state

Definition at line 337 of file ios_attributes.h.

◆ SetError()

void faudes::AttributeIosState::SetError ( void  )
inline

Set error flag.

Definition at line 317 of file ios_attributes.h.

◆ SetInput()

void faudes::AttributeIosState::SetInput ( void  )
inline

Set input flag.

Note: this will clear the output flag.

Definition at line 297 of file ios_attributes.h.

◆ SetOutput()

void faudes::AttributeIosState::SetOutput ( void  )
inline

Set output flag.

Note: this will clear the input flag.

Definition at line 277 of file ios_attributes.h.

◆ ToString()

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

Write attribute to string.

Returns
string representation of attributes

Definition at line 187 of file ios_attributes.cpp.

Member Data Documentation

◆ mAllIosFlags

const fType faudes::AttributeIosState::mAllIosFlags = 0x70
staticprotected

Definition at line 400 of file ios_attributes.h.

◆ mDefIosFlags

const fType faudes::AttributeIosState::mDefIosFlags = 0x00
staticprotected

Definition at line 398 of file ios_attributes.h.

◆ mErrorFlag

const fType faudes::AttributeIosState::mErrorFlag = 0x40
static

Definition at line 383 of file ios_attributes.h.

◆ mInputFlag

const fType faudes::AttributeIosState::mInputFlag = 0x10
static

Definition at line 381 of file ios_attributes.h.

◆ mOutputFlag

const fType faudes::AttributeIosState::mOutputFlag = 0x20
static

Definition at line 382 of file ios_attributes.h.


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

libFAUDES 2.32f --- 2024.12.22 --- c++ api documentaion by doxygen