#include <textfileparser.h>
Public Member Functions | |
| TextFormatParser (tnstream *stream_, const ASCString &primaryName_="") | |
| TextPropertyGroup * | run () |
| 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) |
Definition at line 108 of file textfileparser.h.
| TextFormatParser::TextFormatParser | ( | tnstream * | stream_, | |
| const ASCString & | primaryName_ = "" | |||
| ) | [inline] |
Definition at line 119 of file textfileparser.h.
| 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().
const int TextFormatParser::operationsNum [static] |
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().
1.5.1