faudes::Type Class Reference

#include <interface.h>

Inheritance diagram for faudes::Type:

faudes::ParallelExecutor faudes::ParallelExecutor::ParallelTimedState faudes::SymbolTable faudes::TBaseSet< T, Cmp > faudes::TBaseSet< Idx > faudes::TBaseSet< std::string > faudes::TBaseSet< Transition, Cmp > faudes::vGenerator List of all members.

Detailed Description

Base class of all core libFAUDES data objects.

Currently, faudes::Type only provides a standard interface to read and write configuration data from or to files.

Future libFAUDES versions will extend this base class to become a runtime interface to libFAUDES data types.

Definition at line 42 of file interface.h.

Public Member Functions

 Type (void)
 Constructor.
 Type (const Type &rType)
 Copy constructor.
virtual ~Type ()
 Destructor.
virtual void Clear (void)
 Clear configuration data.
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.
std::string ToString (const std::string &rLabel="", const Type *pContext=0) const
 Write configuration data to a 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 to TokenWriter, debugging format.
void Read (const std::string &rFileName, const std::string &rLabel="", const Type *pContext=0)
 Read configuration data from file with label specified.
void Read (TokenReader &rTr, const std::string &rLabel="", const Type *pContext=0)
 Read configuration data from TokenReader with label sepcified.

Protected Member Functions

virtual void DoRead (TokenReader &rTr, const std::string &rLabel="", const Type *pContext=0)
 Read configuration data of this object from TokenReader.
virtual void DoWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 Write configuration data of this object to TokenWriter.
virtual void DoDWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 Write configuration data in debugging format to TokenWriter.


Constructor & Destructor Documentation

faudes::Type::Type void   ) 
 

Constructor.

Definition at line 41 of file interface.cpp.

faudes::Type::Type const Type rType  ) 
 

Copy constructor.

Definition at line 44 of file interface.cpp.

faudes::Type::~Type  )  [virtual]
 

Destructor.

Definition at line 47 of file interface.cpp.


Member Function Documentation

void faudes::Type::Clear void   )  [virtual]
 

Clear configuration data.

Reimplemented in faudes::TaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >, faudes::TBaseSet< T, Cmp >, faudes::TaIndexSet< Attr >, faudes::SymbolTable, faudes::TaTransSet< Attr >, faudes::vGenerator, faudes::DeviceExecutor, faudes::Executor, faudes::LoggingExecutor, faudes::ParallelExecutor, faudes::ProposingExecutor, faudes::TaGenerator< AttributeTimedGlobal, AttributeTimedState, AttributeCFlags, AttributeTimedTrans >, faudes::TBaseSet< std::string >, faudes::TBaseSet< Idx >, faudes::TBaseSet< Transition, Cmp >, faudes::TaIndexSet< SimConditionAttribute >, faudes::TaIndexSet< StateAttr >, faudes::TaIndexSet< AttributeCFlags >, faudes::TaIndexSet< EventAttr >, and faudes::TaIndexSet< AttributeTimedState >.

Definition at line 51 of file interface.cpp.

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

Write configuration data in debugging format to TokenWriter.

Reimplement this method in derived classes to provide the std token io interface defined in the public section of Type.

Parameters:
rTw Reference to TokenWriter
rLabel Label of section to write
pContext Write context to provide contextual information
Exceptions:
Exception 
  • IO errors (id 2)

Reimplemented in faudes::TaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >, faudes::TBaseSet< T, Cmp >, faudes::NameSet, faudes::TaNameSet< Attr >, faudes::TaGenerator< AttributeTimedGlobal, AttributeTimedState, AttributeCFlags, AttributeTimedTrans >, faudes::TBaseSet< std::string >, faudes::TBaseSet< Idx >, faudes::TBaseSet< Transition, Cmp >, faudes::TaNameSet< SimConditionAttribute >, faudes::TaNameSet< AttributeCFlags >, and faudes::TaNameSet< EventAttr >.

Definition at line 137 of file interface.cpp.

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

Read configuration data of this object from TokenReader.

Reimplement this method in derived classes to provide the std token io interface defined in the public section of Type.

Parameters:
rTr TokenReader to read from
rLabel Section to read
pContext Read context to provide contextual information
Exceptions:
Exception 
  • IO error (id 1)

Reimplemented in faudes::TaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >, faudes::TBaseSet< T, Cmp >, faudes::IndexSet, faudes::TaIndexSet< Attr >, faudes::NameSet, faudes::TaNameSet< Attr >, faudes::SymbolSet, faudes::SymbolTable, faudes::LoggingExecutor, faudes::ParallelExecutor::ParallelTimedState, faudes::ParallelExecutor, faudes::ProposingExecutor, faudes::TaGenerator< AttributeTimedGlobal, AttributeTimedState, AttributeCFlags, AttributeTimedTrans >, faudes::TBaseSet< std::string >, faudes::TBaseSet< Idx >, faudes::TBaseSet< Transition, Cmp >, faudes::TaIndexSet< SimConditionAttribute >, faudes::TaIndexSet< StateAttr >, faudes::TaIndexSet< AttributeCFlags >, faudes::TaIndexSet< EventAttr >, faudes::TaIndexSet< AttributeTimedState >, faudes::TaNameSet< SimConditionAttribute >, faudes::TaNameSet< AttributeCFlags >, and faudes::TaNameSet< EventAttr >.

Definition at line 143 of file interface.cpp.

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

Write configuration data of this object to TokenWriter.

Reimplement this method in derived classes to provide the std token io interface defined in the public section of Type.

Parameters:
rTw Reference to TokenWriter
rLabel Label of section to write
pContext Write context to provide contextual information
Exceptions:
Exception 
  • IO errors (id 2)

Reimplemented in faudes::TaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >, faudes::TBaseSet< T, Cmp >, faudes::IndexSet, faudes::TaIndexSet< Attr >, faudes::NameSet, faudes::TaNameSet< Attr >, faudes::SymbolSet, faudes::SymbolTable, faudes::TTransSet< Cmp >, faudes::LoggingExecutor, faudes::ParallelExecutor::ParallelTimedState, faudes::ParallelExecutor, faudes::ProposingExecutor, faudes::TaGenerator< AttributeTimedGlobal, AttributeTimedState, AttributeCFlags, AttributeTimedTrans >, faudes::TBaseSet< std::string >, faudes::TBaseSet< Idx >, faudes::TBaseSet< Transition, Cmp >, faudes::TaIndexSet< SimConditionAttribute >, faudes::TaIndexSet< StateAttr >, faudes::TaIndexSet< AttributeCFlags >, faudes::TaIndexSet< EventAttr >, faudes::TaIndexSet< AttributeTimedState >, faudes::TaNameSet< SimConditionAttribute >, faudes::TaNameSet< AttributeCFlags >, and faudes::TaNameSet< EventAttr >.

Definition at line 131 of file interface.cpp.

void faudes::Type::DWrite TokenWriter rTw,
const std::string &  rLabel = "",
const Type pContext = 0
const
 

Write configuration data to TokenWriter, debugging format.

Note: all write functions use the virtual function DoDWrite(), to be reimplemented by derived classes.

Parameters:
rTw Reference to TokenWriter
rLabel Label of section to write
pContext Write context to provide contextual information
Exceptions:
Exception 
  • IO errors (id 2)

Definition at line 113 of file interface.cpp.

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

Note: all write functions use the virtual function DoDWrite(), to be reimplemented by derived classes.

Parameters:
pFileName Name of file
rLabel Label of section to write
pContext Write context to provide contextual information
openmode ios::openmode
Exceptions:
Exception 
  • IO errors (id 2)

Definition at line 99 of file interface.cpp.

void faudes::Type::DWrite const Type pContext = 0  )  const
 

Write configuration data to console, debugging format.

Note: all write functions use the virtual function DoDWrite(), to be reimplemented by derived classes.

Parameters:
pContext Write context to provide contextual information

Definition at line 93 of file interface.cpp.

void faudes::Type::Read TokenReader rTr,
const std::string &  rLabel = "",
const Type pContext = 0
 

Read configuration data from TokenReader with label sepcified.

Note: all read functions use the virtual function DoRead(), to be reimplemented for by derived classes.

Parameters:
rTr Reference to tokenreader
rLabel Section to read
pContext Read context to provide contextual information
Exceptions:
Exception 
  • IO errors (id 1)
  • token mismatch from DoRead()

Definition at line 125 of file interface.cpp.

void faudes::Type::Read const std::string &  rFileName,
const std::string &  rLabel = "",
const Type pContext = 0
 

Read configuration data from file with label specified.

Note: all read functions use the virtual function DoRead(), to be reimplemented for by derived classes.

Parameters:
rFileName Name of file
rLabel Section to read from
pContext Read context to provide contextual information
Exceptions:
Exception 
  • IO errors (id 1)
  • token mismatch from DoRead()

Definition at line 118 of file interface.cpp.

std::string faudes::Type::ToString const std::string &  rLabel = "",
const Type pContext = 0
const
 

Write configuration data to a string.

Note: all write functions use the virtual function DoWrite(), to be reimplemented by derived classes.

Parameters:
rLabel Label of section to write
pContext Write context to provide contextual information
Returns:
output string
Exceptions:
Exception 
  • IO errors (id 2)

Definition at line 86 of file interface.cpp.

void faudes::Type::Write TokenWriter rTw,
const std::string &  rLabel = "",
const Type pContext = 0
const
 

Write configuration data to TokenWriter.

Note: all write functions use the virtual function DoWrite(), to be reimplemented by derived classes.

Parameters:
rTw Reference to TokenWriter
rLabel Label of section to write
pContext Write context to provide contextual information
Exceptions:
Exception 
  • IO errors (id 2)

Definition at line 81 of file interface.cpp.

void faudes::Type::Write const std::string &  pFileName,
std::ios::openmode  openmode
const
 

Write configuration data to a file.

Note: all write functions use the virtual function DoWrite(), to be reimplemented by derived classes.

Parameters:
pFileName Name of file
openmode ios::openmode
Exceptions:
Exception 
  • IO errors (id 2)

Definition at line 76 of file interface.cpp.

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

Note: all write functions use the virtual function DoWrite(), to be reimplemented by derived classes.

Parameters:
pFileName Name of file
rLabel Label of section to write
pContext Write context to provide contextual information
openmode ios::openmode
Exceptions:
Exception 
  • IO errors (id 2)

Definition at line 62 of file interface.cpp.

void faudes::Type::Write const Type pContext = 0  )  const
 

Write configuration data to console.

Note: all write functions use the virtual function DoWrite(), to be reimplemented by derived classes.

Parameters:
pContext Write context to provide contextual information

Definition at line 56 of file interface.cpp.


The documentation for this class was generated from the following files:
Generated on Mon Nov 10 08:13:17 2008 for libFAUDES 2.11v by  doxygen 1.4.4