TextFormatParser Class Reference

Parses a .ASCTXT file and returns a TextPropertyGroup. More...

#include <textfileparser.h>

List of all members.

Public Member Functions

 TextFormatParser (tnstream *stream_, const ASCString &primaryName_="")
TextPropertyGrouprun ()
ASCString readLine ()

Static Public Attributes

static const int operationsNum
static const char * operations []
static const char * whiteSpace

Protected Member Functions

void startLevel (const ASCString &levelName)
void parseLine (const ASCString &line)
void error (const ASCString &errmsg)


Detailed Description

Parses a .ASCTXT file and returns a TextPropertyGroup.

Definition at line 108 of file textfileparser.h.


Constructor & Destructor Documentation

TextFormatParser::TextFormatParser ( tnstream stream_,
const ASCString primaryName_ = "" 
) [inline]

Definition at line 119 of file textfileparser.h.


Member Function Documentation

TextPropertyGroup * TextFormatParser::run (  ) 

Definition at line 491 of file textfileparser.cpp.

References TextPropertyGroup::archive, TextPropertyGroup::fileName, tnstream::getArchive(), tnstream::getDeviceName(), tnstream::getLocation(), TextPropertyGroup::location, parseLine(), and readLine().

Referenced by Panel::getDefaultWidgetParams(), CGameOptions::load(), GameParameterEditorWidget::LoadParameter(), readClipboard(), ASCGUI_Window::setup(), and transformMap().

ASCString TextFormatParser::readLine (  ) 

Definition at line 379 of file textfileparser.cpp.

References tnstream::readString(), and whiteSpace.

Referenced by run(), and startLevel().

void TextFormatParser::startLevel ( const ASCString levelName  )  [protected]

Definition at line 471 of file textfileparser.cpp.

References ASCString::compare_ci(), error(), parseLine(), readLine(), ASCString::toLower(), and TextPropertyGroup::typeName.

Referenced by parseLine().

void TextFormatParser::parseLine ( const ASCString line  )  [protected]

Definition at line 422 of file textfileparser.cpp.

References TextPropertyGroup::addEntry(), error(), StringTokenizer::getNextToken(), StringTokenizer::getRemaining(), line(), operations, operationsNum, startLevel(), and ASCString::toLower().

Referenced by run(), and startLevel().

void TextFormatParser::error ( const ASCString errmsg  )  [protected]

Definition at line 501 of file textfileparser.cpp.

References displayLogMessage(), and tnstream::getLocation().

Referenced by parseLine(), and startLevel().


Member Data Documentation

const int TextFormatParser::operationsNum [static]

Definition at line 123 of file textfileparser.h.

Referenced by parseLine().

const char * TextFormatParser::operations [static]

Definition at line 124 of file textfileparser.h.

Referenced by PropertyTemplate< T >::parse(), parseLine(), and TextPropertyGroup::Entry::toString().

const char * TextFormatParser::whiteSpace [static]

Definition at line 125 of file textfileparser.h.

Referenced by StringProperty::operation_eq(), readLine(), and StringProperty::toString().


The documentation for this class was generated from the following files:
Generated on Mon May 21 01:47:47 2012 for Advanced Strategic Command by  doxygen 1.5.1