Dolphin Class Reference

#include <dolphin.h>

List of all members.


Detailed Description

Objects of this class can be used to parse 'dot' directives.

Public Types

enum  ErrorType
enum  DirectiveType { ARGUMENT = 3000, ATTRIB_VALUE, EMPTY, NONE }

Public Member Functions

 Dolphin (void)
virtual ~Dolphin (void)
bool parse (std::string &str)
Dolphin::ErrorInfo getErrorInfo (void)
DirectiveType getDirectiveType (void)
std::string getDirectiveName (void)
std::string getArgumentValue (void)
seal::LinkedList
< AttributeValuePair
getAttributeValuePairList (void)

Static Public Member Functions

static bool isDot (const std::string &str)

Classes

class  ErrorInfo

Member Enumeration Documentation

An enumerated data type which enumerates the different types of errors which can occur while parsing a 'dot' directive. A client of the Dolphin class should practically not need to make use of this data type.

Type of the directive which was parsed by a Dolphin object.

Enumerator:
ARGUMENT  An example of this type of directive is as follows:

.include "file.h"

In the above example .include is a dot directive which takes a single argument "file.h".
ATTRIB_VALUE  This type of 'dot' directive takes a space seperated list of attribute value pairs. An example is as follows.

.student name=jim grade=senior dob="05/06/07"

EMPTY  This type of 'dot' directive does not take any argument. An example is follows.

.code

NONE  This is the type returned by Dolphin::getDirectiveType if there was an error in parsing.


Constructor & Destructor Documentation

Dolphin::Dolphin ( void   ) 

Constructor.

virtual Dolphin::~Dolphin ( void   )  [virtual]

Destructor.


Member Function Documentation

bool Dolphin::parse ( std::string &  str  ) 

Parses a string. Reports error if it is not a 'dot' directive. Returns false if there is an error in parsing, true otherwise.

Parameters:
str The string to be parsed.

Dolphin::ErrorInfo Dolphin::getErrorInfo ( void   ) 

Returns the error info of an error which might have occured during a call to Dolphin::parse. The returned value is meaningful only in case an error occurs with a call to Dolphin::parse.

DirectiveType Dolphin::getDirectiveType ( void   )  [inline]

Returns the directive type of the parsed directive.

std::string Dolphin::getDirectiveName ( void   )  [inline]

Returns the directive name of the parsed directive.

std::string Dolphin::getArgumentValue ( void   )  [inline]

Returns the argument value in case of directives of type Dolphin::ARGUMENT.

seal::LinkedList<AttributeValuePair> Dolphin::getAttributeValuePairList ( void   )  [inline]

Returns the list of attribute value pairs in case of an attribute-value pair directive.

static bool Dolphin::isDot ( const std::string &  str  )  [static]

Returns true if the string argument is a dot directive. Note that the string is not parsed.

Parameters:
str The test string.


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

Generated on Sat May 23 10:36:09 2009 for Dolphin by  doxygen 1.5.5