State attribute with substates. More...

#include <pd_attributes.h>

Public Member Functions

 AttributePushdownState (void)
 Constructor.
 ~AttributePushdownState ()
 Destructor.
virtual bool IsDefault (void) const
 Test for default value (ie default flags)
void SetMerge (const MergeAbstract &rMerge)
 Sets the mpMerge parameter.
const MergeAbstractMerge () const
 Getter for Merge.
void DfaState (const Idx dfaState)
 Setter for DfaState.
const Idx DfaState () const
 Getter for DfaState.
- Public Member Functions inherited from faudes::AttributeFlags
 AttributeFlags (void)
 Default constructor.
 AttributeFlags (const AttributeFlags &rOther)
 Copy constructor.
virtual ~AttributeFlags (void)
 Destructor.
bool Test (fType mask) const
 Test a flag.
bool TestAll (fType mask) const
 Test multible flags, combine by "and".
bool TestSome (fType mask) const
 Test multible flags, combine by "or".
bool TestNone (fType mask) const
 Test multible flags, combine by "not or".
void Set (fType mask)
 Set multiple flags.
void Clr (fType mask)
 Clear multiple flags.
- Public Member Functions inherited from faudes::AttributeVoid
 AttributeVoid (void)
 Constructor.
virtual ~AttributeVoid (void)
 Destructor.
virtual void SetDefault (void)
 Set to default value.
virtual void Clear (void)
 Synonym for SetDefault to match std interface.
- Public Member Functions inherited from faudes::Type
 Type (void)
 Constructor.
 Type (const Type &rType)
 Copy constructor.
virtual ~Type (void)
 Destructor.
virtual TypeNew (void) const
 Construct on heap.
virtual TypeCopy (void) const
 Construct on heap.
virtual const TypeCast (const Type *pOther) const
 Cast other object to this type.
virtual TypeAssign (const Type &rSrc)
 Assign configuration data from other object.
virtual Typeoperator= (const Type &rSrc)
 Assign configurationdata from other object.
virtual bool Equal (const Type &rOther) const
 Test equality of configuration data.
virtual bool operator== (const Type &rOther) const
 Test equality of configuration data.
virtual bool operator!= (const Type &rOther) const
 Test equality of configuration data.
virtual void Name (const std::string &rName)
 Set the objects's name.
virtual const std::string & Name (void) const
 Get objects's name.
void Write (const Type *pContext=0) const
 Write configuration data to console.
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.
void Write (const std::string &pFileName, std::ios::openmode openmode) const
 Write configuration data to a file.
void Write (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 Write configuration data to TokenWriter.
virtual void XWrite (const std::string &pFileName, const std::string &rLabel="", const Type *pContext=0) const
 Write configuration data to an XML file.
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.
void XWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 Write configuration data in XML format to TokenWriter.
std::string ToString (const std::string &rLabel="", const Type *pContext=0) const
 Write configuration data to a string.
std::string ToText (const std::string &rLabel="", const Type *pContext=0) const
 Write configuration data to a formated string.
void DWrite (const Type *pContext=0) const
 Write configuration data to console, debugging format.
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.
void DWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 Write configuration data in debug format to TokenWriter.
void SWrite (TokenWriter &rTw) const
 Write statistics comment to TokenWriter.
void SWrite (void) const
 Write statistics comment to console.
std::string ToSText (void) const
 Write statistics to a string.
void Read (const std::string &rFileName, const std::string &rLabel="", const Type *pContext=0)
 Read configuration data from file with label specified.
void FromString (const std::string &rString, const std::string &rLabel="", const Type *pContext=0)
 Read configuration data from a string.
void Read (TokenReader &rTr, const std::string &rLabel="", const Type *pContext=0)
 Read configuration data from TokenReader with label sepcified.

Protected Member Functions

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

Private Attributes

MergeAbstractmpMerge
 Substates.
Idx mDfaState
 Associated DFA state.

Additional Inherited Members

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

Detailed Description

State attribute with substates.

Merged substates should only needed to be accessed for debugging.

Definition at line 29 of file pd_attributes.h.

Constructor & Destructor Documentation

faudes::AttributePushdownState::AttributePushdownState ( void  )
inline

Constructor.

Definition at line 36 of file pd_attributes.h.

faudes::AttributePushdownState::~AttributePushdownState ( )

Destructor.

deletes mpMerge

Definition at line 23 of file pd_attributes.cpp.

Member Function Documentation

void faudes::AttributePushdownState::DfaState ( const Idx  dfaState)
inline

Setter for DfaState.

Returns
mDfaState

Definition at line 76 of file pd_attributes.h.

const Idx faudes::AttributePushdownState::DfaState ( ) const
inline

Getter for DfaState.

Returns
mDfaState

Definition at line 84 of file pd_attributes.h.

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

Assignment method.

Parameters
rSrcAttrSource to assign from

Definition at line 113 of file pd_attributes.cpp.

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

Test equality.

Parameters
rOtherOther attribute to compare with.

Definition at line 123 of file pd_attributes.cpp.

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

Reads the attribute from TokenReader, see AttributeVoid for public wrappers.

If the current token indicates a invariant section, the method reads the invariant from that section. Else, it does nothing. Exceptions may only be thrown on invalid data within the timing section. The context argument is ignored, the label argument can be used to override the default section name Invariant.

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 147 of file pd_attributes.cpp.

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

Writes the attribute to TokenWriter, see AttributeVoid for public wrappers.

Writes am Invariant section to include data on the invariant. The label argument can be used to set a section label different the the default Invariant. Th context argument is 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 134 of file pd_attributes.cpp.

virtual void faudes::AttributePushdownState::DoXWrite ( TokenWriter rTw,
const std::string &  rLabel = "",
const Type pContext = 0 
) const
inlineprotectedvirtual

Write to TokenWriter, see Type for public wrappers.

If not the defult value, write the flags in XML format. Else, do nothing. The label and context arguments are ignored.

Parameters
rTwReference to TokenWriter
rLabelLabel of section to write
pContextWrite context to provide contextual information
Exceptions
Exception
  • IO errors (id 2)

Reimplemented from faudes::AttributeFlags.

Definition at line 152 of file pd_attributes.h.

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

Test for default value (ie default flags)

Returns
True for default value

Reimplemented from faudes::AttributeFlags.

Definition at line 50 of file pd_attributes.h.

const MergeAbstract* faudes::AttributePushdownState::Merge ( ) const
inline

Getter for Merge.

Returns
mpMerge

Definition at line 68 of file pd_attributes.h.

void faudes::AttributePushdownState::SetMerge ( const MergeAbstract rMerge)

Sets the mpMerge parameter.

Allocates memory for the pointer. The reference given in the parameter will be copied into the new memory. Current mpMerge will be deleted.

Parameters
rMergethe merge parameter

Definition at line 29 of file pd_attributes.cpp.

Member Data Documentation

Idx faudes::AttributePushdownState::mDfaState
private

Associated DFA state.

Definition at line 91 of file pd_attributes.h.

MergeAbstract* faudes::AttributePushdownState::mpMerge
private

Substates.

Definition at line 89 of file pd_attributes.h.


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

libFAUDES 2.26g --- 2015.08.17 --- c++ api documentaion by doxygen