Detailed Description

Attribute for the configuration of a input or output mapping.

The base class for all device event attributes only distinguishes between output and input events. The actual attribute is of type AttributeVoid. Derived classes are meant to override this type in order to provide the defining data for the actual mapping of physical and logical events.

Definition at line 68 of file iop_vdevice.h.

#include <iop_vdevice.h>

Public Member Functions

 AttributeDeviceEvent (void)
 Default constructor (no attributes, aka undefined) More...
 
 AttributeDeviceEvent (const AttributeDeviceEvent &rOtherAttr)
 Copy constructor. More...
 
virtual ~AttributeDeviceEvent (void)
 Destructor. More...
 
virtual void Clear (void)
 Clear. More...
 
virtual bool IsDefault (void) const
 Test for default value (undefined) More...
 
bool IsOutput (void) const
 Does this attribute define an output mapping? More...
 
bool IsInput (void) const
 Does this attribute define a input mapping? More...
 
void DefaultOutput (void)
 Set to default output attribute. More...
 
void DefaultInput (void)
 Set to default input attribute. More...
 
virtual void Output (const AttributeVoid &rOutputAttribute)
 Set output attribute. More...
 
virtual void Input (const AttributeVoid &rInputAttribute)
 Set input attribute. More...
 
virtual void ReadOutput (TokenReader &rTr)
 Read output attribute. More...
 
virtual void ReadInput (TokenReader &rTr)
 Read input attribute. More...
 
const AttributeVoidOutputp (void) const
 Get output mapping (return 0 if its not an output) More...
 
const AttributeVoidInputp (void) const
 Get input mapping (return 0 if its not a input) 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...
 
- 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...
 

Protected Member Functions

void DoAssign (const AttributeDeviceEvent &rSrcAttr)
 Assignment. More...
 
virtual void DoRead (TokenReader &rTr, const std::string &rLabel="", const Type *pContext=0)
 Reads the attribute from TokenReader, see AttributeVoid for public wrappers. More...
 
virtual void DoWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 Writes the attribute to TokenWriter, see AttributeVoid 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 DoXWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 Write configuration data of this object to TokenWriter in XML format. 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 Member Functions

static const AttributeVoidFallbackAttributep (void)
 Fallback attribute type (initialize on first use static construct) More...
 

Protected Attributes

AttributeVoidmpOutputAttribute
 Output Attribute (use cast in derived classes) More...
 
AttributeVoidmpInputAttribute
 Input Attribute (use cast in derived classes) More...
 
const AttributeVoidpOutputPrototype
 Output Prototype (set to nontrivial attribute in derived classes) More...
 
const AttributeVoidpInputPrototype
 Input Prototype (set to nontrivial attribute in derived classes) More...
 

Additional Inherited Members

- Static Public Member Functions inherited from faudes::AttributeVoid
static void Skip (TokenReader &rTr)
 Skip attribute tokens. More...
 

Constructor & Destructor Documentation

◆ AttributeDeviceEvent() [1/2]

faudes::AttributeDeviceEvent::AttributeDeviceEvent ( void  )

Default constructor (no attributes, aka undefined)

Definition at line 43 of file iop_vdevice.cpp.

◆ AttributeDeviceEvent() [2/2]

faudes::AttributeDeviceEvent::AttributeDeviceEvent ( const AttributeDeviceEvent rOtherAttr)

Copy constructor.

Definition at line 56 of file iop_vdevice.cpp.

◆ ~AttributeDeviceEvent()

faudes::AttributeDeviceEvent::~AttributeDeviceEvent ( void  )
virtual

Destructor.

Definition at line 70 of file iop_vdevice.cpp.

Member Function Documentation

◆ Clear()

void faudes::AttributeDeviceEvent::Clear ( void  )
virtual

Clear.

Reimplemented from faudes::AttributeVoid.

Reimplemented in faudes::AttributeSimplenetEvent, and faudes::AttributeSignalEvent.

Definition at line 82 of file iop_vdevice.cpp.

◆ DefaultInput()

void faudes::AttributeDeviceEvent::DefaultInput ( void  )
inline

Set to default input attribute.

Definition at line 103 of file iop_vdevice.h.

◆ DefaultOutput()

void faudes::AttributeDeviceEvent::DefaultOutput ( void  )
inline

Set to default output attribute.

Definition at line 97 of file iop_vdevice.h.

◆ DoAssign()

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

Assignment.

Parameters
rSrcAttrSource to copy from
Returns
Ref to this attribute

Definition at line 90 of file iop_vdevice.cpp.

◆ DoRead()

void faudes::AttributeDeviceEvent::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 an "Input" or "Output" section, the method reads that section. Else it does nothing. Exceptions may only be thrown on invalid data within the section. The label argument is ignored. The context argument is ignored.

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

Reimplemented from faudes::AttributeVoid.

Definition at line 108 of file iop_vdevice.cpp.

◆ DoWrite()

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

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

Writes all present device event attributes to include the defining data. The label argument is ignored, we use hardcoded labels "Input" or "Output". The context argument is ignored.

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

Reimplemented from faudes::AttributeVoid.

Definition at line 101 of file iop_vdevice.cpp.

◆ FallbackAttributep()

const AttributeVoid * faudes::AttributeDeviceEvent::FallbackAttributep ( void  )
staticprotected

Fallback attribute type (initialize on first use static construct)

Definition at line 76 of file iop_vdevice.cpp.

◆ Input()

virtual void faudes::AttributeDeviceEvent::Input ( const AttributeVoid rInputAttribute)
inlinevirtual

Set input attribute.

Definition at line 115 of file iop_vdevice.h.

◆ Inputp()

const AttributeVoid* faudes::AttributeDeviceEvent::Inputp ( void  ) const
inline

Get input mapping (return 0 if its not a input)

Definition at line 136 of file iop_vdevice.h.

◆ IsDefault()

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

Test for default value (undefined)

Reimplemented from faudes::AttributeVoid.

Reimplemented in faudes::AttributeSimplenetEvent, and faudes::AttributeSignalEvent.

Definition at line 88 of file iop_vdevice.h.

◆ IsInput()

bool faudes::AttributeDeviceEvent::IsInput ( void  ) const
inline

Does this attribute define a input mapping?

Definition at line 94 of file iop_vdevice.h.

◆ IsOutput()

bool faudes::AttributeDeviceEvent::IsOutput ( void  ) const
inline

Does this attribute define an output mapping?

Definition at line 91 of file iop_vdevice.h.

◆ Output()

virtual void faudes::AttributeDeviceEvent::Output ( const AttributeVoid rOutputAttribute)
inlinevirtual

Set output attribute.

Definition at line 109 of file iop_vdevice.h.

◆ Outputp()

const AttributeVoid* faudes::AttributeDeviceEvent::Outputp ( void  ) const
inline

Get output mapping (return 0 if its not an output)

Definition at line 133 of file iop_vdevice.h.

◆ ReadInput()

virtual void faudes::AttributeDeviceEvent::ReadInput ( TokenReader rTr)
inlinevirtual

Read input attribute.

Definition at line 127 of file iop_vdevice.h.

◆ ReadOutput()

virtual void faudes::AttributeDeviceEvent::ReadOutput ( TokenReader rTr)
inlinevirtual

Read output attribute.

Definition at line 121 of file iop_vdevice.h.

Member Data Documentation

◆ mpInputAttribute

AttributeVoid* faudes::AttributeDeviceEvent::mpInputAttribute
protected

Input Attribute (use cast in derived classes)

Definition at line 145 of file iop_vdevice.h.

◆ mpOutputAttribute

AttributeVoid* faudes::AttributeDeviceEvent::mpOutputAttribute
protected

Output Attribute (use cast in derived classes)

Definition at line 142 of file iop_vdevice.h.

◆ pInputPrototype

const AttributeVoid* faudes::AttributeDeviceEvent::pInputPrototype
protected

Input Prototype (set to nontrivial attribute in derived classes)

Definition at line 151 of file iop_vdevice.h.

◆ pOutputPrototype

const AttributeVoid* faudes::AttributeDeviceEvent::pOutputPrototype
protected

Output Prototype (set to nontrivial attribute in derived classes)

Definition at line 148 of file iop_vdevice.h.


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

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