libFAUDES

Sections

Index

faudes::Documentation Class Reference

#include <rtitypes.h>

Inherits faudes::Type.

Inherited by faudes::FunctionDefinition, and faudes::TypeDefinition.

List of all members.


Detailed Description

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 of this faudes-type
  "Generator"

      % corresponding c type (optional)
      +faudes::cGenerator+

      % short docu
  <TextDoc> "The common 5 tuple G=(Sigma, Q, delta, Qo, Qm)."

      % html reference for documentation
  <HtmlDoc> "generators.html#plain" </HtmlDoc>

      % relevant keywords 
  <Keywords> "generator" "language" </Keywords>

  </TypeDefinition>

Public Member Functions

 Documentation (void)
 Constructor.
virtual ~Documentation (void)
 Destructor.
const std::string & Name (void) const
 Get name of the entety to document (aka faudes-type or faudes-function).
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

Protected Member Functions

void Name (const std::string &name)
 Set name.
void CType (const std::string &name)
 Set c type.
void TextDoc (const std::string &textdoc)
 Set a short textual documentation.
void HtmlDoc (const std::string &fname)
 Set name of file pointing to the html documentation.
void AddKeyword (const std::string &rKeyword)
 Append keyword.
void Clear (void)
 Clear.
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.

Protected Attributes

std::string mName
 Faudes name.
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.

Static Protected Attributes

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

Constructor & Destructor Documentation

faudes::Documentation::Documentation ( void   ) 

Constructor.

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

Destructor.


Member Function Documentation

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

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

Returns:
Name

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

Get corresponding c type.

Returns:
CType, or "" if no such

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

Returns:
Short textual documentation.

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

Returns:
Filename pointing to the html documentation.

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

Returns:
CSV-string containing keywords.

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

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

Not implemented.

Returns:
Number of keywords.

std::string faudes::Documentation::KeywordAt ( int  pos  )  const

Parameters:
pos Position of keyword
Returns:
Keyword at specified position

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

Set name.

Parameters:
name New name.

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

Set c type.

Parameters:
name New ctype.

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

Set a short textual documentation.

Parameters:
textdoc New textual documentation.

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

Set name of file pointing to the html documentation.

Parameters:
fname Filename

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

Append keyword.

Parameters:
rKeyword Keyword

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

Clear.

Reimplemented from faudes::Type.

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

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 members only. It does NOT read the enclosing begin and end tokens. Both, rLabel and Pontext are ignored.

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, and faudes::TypeDefinition.

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 reads documentation members only. It does NOT write enclosing begin and end tokens. Both, rLabel and Pontext are ignored.

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, and faudes::TypeDefinition.


Member Data Documentation

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

Faudes name.

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

Corresponing c type, or "" if no such.

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

String containing the text-documentation.

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

String containing the filename of the corresponding html-documentation.

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

Comma-seperated string containing all keywords.

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

Constant characted used to seperate keywords.


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

libFAUDES 2.13a c++ source docu by doxygen 1.5.6