faudes::Documentation Class Reference

faudes type implementation macros, overall, debug version More...

#include <cfl_types.h>

List of all members.

Public Member Functions

 Documentation (void)
 Constructor.
 Documentation (const Documentation &rOther)
 Copy constructor.
virtual ~Documentation (void)
 Destructor.
void Clear (void)
 Clear.
const std::string & Name (void) const
 Get name of the entety to document (aka faudes-type or faudes-function).
const std::string & PlugIn (void) const
 Get name of plugin.
const std::string & CType (void) const
 Get corresponding C++ type.
const std::string & TextDoc (void) const
const std::string & HtmlDoc (void) const
const std::string & Keywords (void) const
std::string MatchKeyword (const std::string &rPattern) const
 Search comma-seperated keywords for a substring.
int KeywordsSize (void) const
 Not implemented.
std::string KeywordAt (int pos) const
bool AutoRegistered (void) const
 Get auto-register flag.
bool ApplicationRegistered (void) const
 Get application-registered flag.
virtual void MergeDocumentation (TokenReader &rTr)
 Merge documentation from token stream.

Protected Member Functions

void Name (const std::string &name)
 Set name.
void PlugIn (const std::string &plugin)
 Set name of plugin.
void CType (const std::string &name)
 Set C++ type.
void TextDoc (const std::string &textdoc)
 Set a short textual documentation.
void AutoRegistered (bool flag)
 Set auto-register flag.
void ApplicationRegistered (bool flag)
 Set application-registered flag.
void HtmlDoc (const std::string &fname)
 Set name of file pointing to the html documentation.
void AddKeyword (const std::string &rKeyword)
 Append keyword.
virtual void DoAssign (const Documentation &rSrc)
 Std faudes type interface: assignment.
virtual bool DoEqual (const Documentation &rOther) const
 Std faudes type interface: test equality.
virtual void DoRead (TokenReader &rTr, const std::string &rLabel="", const Type *pContext=0)
 Read configuration data of this object from TokenReader.
virtual void DoReadCore (TokenReader &rTr)
 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 DoWriteCore (TokenWriter &rTw) const
 Write configuration data of this object to TokenWriter.

Protected Attributes

std::string mName
 Faudes name.
std::string mPlugIn
 Faudes plugin.
std::string mCType
 Corresponing C++ type, or "" if no such.
std::string mTextDoc
 String containing the text-documentation.
std::string mHtmlDoc
 String containing the filename of the corresponding html-documentation.
std::string mKeywords
 Comma-seperated string containing all keywords.
bool mAutoRegistered
 Flag to indicate automated registration.
bool mApplicationRegistered
 Flag to indicate application registration.

Static Protected Attributes

static const char mDelim = ';'
 Constant characted used to seperate keywords.

Detailed Description

faudes type implementation macros, overall, debug version

Structure to hold documentation data relating to a faudes-type or -function. This class is the common base for faudes::TypeDefinition and faudes::FunctionDefinition. It supports token io as demonstrated by the follwoing example for a type defintion:

  <TypeDefinition name="CoreFaudes::Generator" ctype="faudes::Generator">

  <Documentation ref="generators.html#plain"> 
      The common 5 tuple G=(Sigma, Q, delta, Qo, Qm).
  <Documentation/>

  <Keywords> "generator" "language" </Keywords>

  </TypeDefinition>

Technical detail: Documentation is derived from Type for the purpose of token IO. We still implement the faudes type interface to make it a fully qualified faudes data type.

Technical detail: To facilitate inheritance, token io of member data and token io of the section tags is separated.

Definition at line 1062 of file cfl_types.h.


Constructor & Destructor Documentation

faudes::Documentation::Documentation ( void   ) 

Constructor.

Definition at line 352 of file cfl_types.cpp.

faudes::Documentation::Documentation ( const Documentation rOther  ) 

Copy constructor.

Definition at line 358 of file cfl_types.cpp.

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

Destructor.

Definition at line 1075 of file cfl_types.h.


Member Function Documentation

void faudes::Documentation::AddKeyword ( const std::string &  rKeyword  )  [protected]

Append keyword.

Parameters:
rKeyword Keyword

Definition at line 415 of file cfl_types.cpp.

void faudes::Documentation::ApplicationRegistered ( bool  flag  )  [protected]

Set application-registered flag.

See also AutoRegistered(void)

Parameters:
flag Flag value.

Definition at line 412 of file cfl_types.cpp.

bool faudes::Documentation::ApplicationRegistered ( void   )  const

Get application-registered flag.

Returns:
True <> registered by application

Definition at line 403 of file cfl_types.cpp.

void faudes::Documentation::AutoRegistered ( bool  flag  )  [protected]

Set auto-register flag.

See also AutoRegistered(void)

Parameters:
flag Flag value.

Definition at line 411 of file cfl_types.cpp.

bool faudes::Documentation::AutoRegistered ( void   )  const

Get auto-register flag.

This flag indicated that the respective type was (will be) registered by a libFAUDES static initialisation protorype.

Returns:
True <> C++-automatic-registration

Definition at line 402 of file cfl_types.cpp.

void faudes::Documentation::Clear ( void   )  [virtual]

Clear.

Reimplemented from faudes::Type.

Reimplemented in faudes::FunctionDefinition, faudes::TypeDefinition, and faudes::LuaFunctionDefinition.

Definition at line 384 of file cfl_types.cpp.

void faudes::Documentation::CType ( const std::string &  name  )  [protected]

Set C++ type.

Parameters:
name New ctype.

Definition at line 408 of file cfl_types.cpp.

const std::string & faudes::Documentation::CType ( void   )  const

Get corresponding C++ type.

Returns:
CType, or "" if no such

Definition at line 398 of file cfl_types.cpp.

void faudes::Documentation::DoAssign ( const Documentation rSrc  )  [protected, virtual]

Std faudes type interface: assignment.

Parameters:
rSrc Source to copy from
Returns:
Reference to this object.

Definition at line 363 of file cfl_types.cpp.

bool faudes::Documentation::DoEqual ( const Documentation rOther  )  const [protected, virtual]

Std faudes type interface: test equality.

Parameters:
rOther Other object to compare with.
Returns:
True on match.

Definition at line 373 of file cfl_types.cpp.

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

Read configuration data of this object from TokenReader.

This virtual function reads documentation from a token stream. The section defaults to Documentation. It invokes DoReadCore to do the member data token reading.

Parameters:
rTr TokenReader to read from
rLabel Section to read
pContext Read context to provide contextual information (ignored)
Exceptions:
Exception 
  • Token mismatch (id 50, 51, 52)
  • IO Error (id 1)

Reimplemented from faudes::Type.

Reimplemented in faudes::FunctionDefinition, faudes::TypeDefinition, and faudes::LuaFunctionDefinition.

Definition at line 513 of file cfl_types.cpp.

void faudes::Documentation::DoReadCore ( TokenReader rTr  )  [protected, virtual]

Read configuration data of this object from TokenReader.

This virtual function reads documentation member data only. It does NOT read the enclosing begin and end tokens.

Parameters:
rTr TokenReader to read from
Exceptions:
Exception 
  • Token mismatch (id 50, 51, 52)
  • IO Error (id 1)

Reimplemented in faudes::FunctionDefinition, faudes::TypeDefinition, and faudes::LuaFunctionDefinition.

Definition at line 564 of file cfl_types.cpp.

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

Write configuration data of this object to TokenWriter.

This virtual function writes documentation to a token stream. The section defaults to Documentation. It invokes DoWriteCore to do the actual member data writing.

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

Reimplemented in faudes::FunctionDefinition, faudes::TypeDefinition, and faudes::LuaFunctionDefinition.

Definition at line 644 of file cfl_types.cpp.

void faudes::Documentation::DoWriteCore ( TokenWriter rTw  )  const [protected, virtual]

Write configuration data of this object to TokenWriter.

This virtual function reads documentation members only. It does NOT write enclosing begin and end tokens.

Parameters:
rTw Reference to TokenWriter
Exceptions:
Exception 
  • IO errors (id 2)

Reimplemented in faudes::FunctionDefinition, faudes::TypeDefinition, and faudes::LuaFunctionDefinition.

Definition at line 669 of file cfl_types.cpp.

void faudes::Documentation::HtmlDoc ( const std::string &  fname  )  [protected]

Set name of file pointing to the html documentation.

Parameters:
fname Filename

Definition at line 410 of file cfl_types.cpp.

const std::string & faudes::Documentation::HtmlDoc ( void   )  const
Returns:
Filename pointing to the html documentation.

Definition at line 400 of file cfl_types.cpp.

std::string faudes::Documentation::KeywordAt ( int  pos  )  const
Parameters:
pos Position of keyword
Returns:
Keyword at specified position (or "" if pos out of range)

Definition at line 452 of file cfl_types.cpp.

const std::string & faudes::Documentation::Keywords ( void   )  const
Returns:
CSV-string containing keywords.

Definition at line 401 of file cfl_types.cpp.

int faudes::Documentation::KeywordsSize ( void   )  const

Not implemented.

Returns:
Number of keywords.

Definition at line 476 of file cfl_types.cpp.

std::string faudes::Documentation::MatchKeyword ( const std::string &  rPattern  )  const

Search comma-seperated keywords for a substring.

This should be extended to regular expressions in a future release.

Parameters:
rPattern String-pattern.
Returns:
Matching keyword or "" if no match

Definition at line 425 of file cfl_types.cpp.

void faudes::Documentation::MergeDocumentation ( TokenReader rTr  )  [virtual]

Merge documentation from token stream.

An exception is thrown if the current type name differs from the one in the documentation.

Parameters:
rTr TokenReader to read from.
Exceptions:
Exception 
  • Type mismatch (id )
  • Token mismatch (id 50, 51, 52)
  • IO Error (id 1)

Definition at line 491 of file cfl_types.cpp.

void faudes::Documentation::Name ( const std::string &  name  )  [protected, virtual]

Set name.

Parameters:
name New name.

Reimplemented from faudes::Type.

Definition at line 406 of file cfl_types.cpp.

const std::string & faudes::Documentation::Name ( void   )  const [virtual]

Get name of the entety to document (aka faudes-type or faudes-function).

Returns:
Name

Reimplemented from faudes::Type.

Definition at line 396 of file cfl_types.cpp.

void faudes::Documentation::PlugIn ( const std::string &  plugin  )  [protected]

Set name of plugin.

Parameters:
plugin New name.

Definition at line 407 of file cfl_types.cpp.

const std::string & faudes::Documentation::PlugIn ( void   )  const

Get name of plugin.

The plugin name defaults to CoreFaudes.

Returns:
Name

Definition at line 397 of file cfl_types.cpp.

void faudes::Documentation::TextDoc ( const std::string &  textdoc  )  [protected]

Set a short textual documentation.

Parameters:
textdoc New textual documentation.

Definition at line 409 of file cfl_types.cpp.

const std::string & faudes::Documentation::TextDoc ( void   )  const
Returns:
Short textual documentation.

Definition at line 399 of file cfl_types.cpp.


Member Data Documentation

Flag to indicate application registration.

Definition at line 1373 of file cfl_types.h.

Flag to indicate automated registration.

Definition at line 1370 of file cfl_types.h.

std::string faudes::Documentation::mCType [protected]

Corresponing C++ type, or "" if no such.

Definition at line 1355 of file cfl_types.h.

const char faudes::Documentation::mDelim = ';' [static, protected]

Constant characted used to seperate keywords.

Definition at line 1367 of file cfl_types.h.

std::string faudes::Documentation::mHtmlDoc [protected]

String containing the filename of the corresponding html-documentation.

Definition at line 1361 of file cfl_types.h.

std::string faudes::Documentation::mKeywords [protected]

Comma-seperated string containing all keywords.

Definition at line 1364 of file cfl_types.h.

std::string faudes::Documentation::mName [protected]

Faudes name.

Definition at line 1349 of file cfl_types.h.

std::string faudes::Documentation::mPlugIn [protected]

Faudes plugin.

Definition at line 1352 of file cfl_types.h.

std::string faudes::Documentation::mTextDoc [protected]

String containing the text-documentation.

Definition at line 1358 of file cfl_types.h.


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

libFAUDES 2.23h --- 2014.04.03 --- c++ api documentaion by doxygen