TextPropertyGroup Class Reference

Class that stores all the (preparsed) entries of an .ASCTXT file. More...

#include <textfileparser.h>

List of all members.

Public Types

typedef vector< Entry * > Matches
typedef list< TextPropertyGroup * > Parents

Public Member Functions

 TextPropertyGroup ()
void addEntry (const Entry &entry)
Entryfind (const ASCString &n)
void findMatches (const ASCString &name, const ASCString &name_without_dot, Matches &matches)
int evalID ()
void buildInheritance (TextPropertyList &tpl)
void resolveAllAlias ()
bool isAbstract ()
void print (int indent=0)

Public Attributes

Parents parents
ASCString fileName
ASCString location
ASCString archive
ASCString typeName
 the name of the structure. For example "VehicleType"

Protected Member Functions

void error (const ASCString &msg, bool printInheritance=true)
bool processAlias (Entry &e, Entries &entriesToAdd, EntryPointerList &markAsResolved)
int findGeneration (Entry *e)
ASCString listInheritanceFilenames ()

Classes

class  Entry


Detailed Description

Class that stores all the (preparsed) entries of an .ASCTXT file.

The entries consist of a PropertyName, an operator and a value, but don't have any type information

Definition at line 52 of file textfileparser.h.


Member Typedef Documentation

typedef vector<Entry*> TextPropertyGroup::Matches

Definition at line 85 of file textfileparser.h.

typedef list<TextPropertyGroup*> TextPropertyGroup::Parents

Definition at line 88 of file textfileparser.h.


Constructor & Destructor Documentation

TextPropertyGroup::TextPropertyGroup (  )  [inline]

Definition at line 57 of file textfileparser.h.


Member Function Documentation

void TextPropertyGroup::error ( const ASCString msg,
bool  printInheritance = true 
) [protected]

Definition at line 71 of file textfileparser.cpp.

References fatalError(), listInheritanceFilenames(), and location.

Referenced by buildInheritance(), and resolveAllAlias().

bool TextPropertyGroup::processAlias ( Entry e,
Entries &  entriesToAdd,
EntryPointerList &  markAsResolved 
) [protected]

Definition at line 227 of file textfileparser.cpp.

References TextPropertyGroup::Entry::alias, TextPropertyGroup::Entry::alias_all, TextPropertyGroup::Entry::alias_all_resolved, displayLogMessage(), TextPropertyGroup::Entry::eq, find(), findGeneration(), findMatches(), TextPropertyGroup::Entry::op, TextPropertyGroup::Entry::parent, parents, TextPropertyGroup::Entry::propertyName, ASCString::toLower(), and TextPropertyGroup::Entry::value.

Referenced by resolveAllAlias().

int TextPropertyGroup::findGeneration ( Entry e  )  [protected]

Definition at line 212 of file textfileparser.cpp.

References parents.

Referenced by processAlias().

ASCString TextPropertyGroup::listInheritanceFilenames (  )  [protected]

Definition at line 154 of file textfileparser.cpp.

References location, and parents.

Referenced by error().

void TextPropertyGroup::addEntry ( const Entry entry  ) 

Definition at line 369 of file textfileparser.cpp.

References TextPropertyGroup::Entry::propertyName.

Referenced by TextFormatParser::parseLine(), and resolveAllAlias().

TextPropertyGroup::Entry * TextPropertyGroup::find ( const ASCString n  ) 

Definition at line 343 of file textfileparser.cpp.

References parents.

Referenced by buildInheritance(), PropertyContainer::find(), PropertyContainer::Property::findEntry(), and processAlias().

void TextPropertyGroup::findMatches ( const ASCString name,
const ASCString name_without_dot,
Matches matches 
)

Definition at line 358 of file textfileparser.cpp.

References parents.

Referenced by processAlias().

int TextPropertyGroup::evalID (  ) 

Definition at line 333 of file textfileparser.cpp.

References PropertyContainer::addInteger(), and typeName.

void TextPropertyGroup::buildInheritance ( TextPropertyList tpl  ) 

Definition at line 99 of file textfileparser.cpp.

References PropertyContainer::addBool(), PropertyContainer::addInteger(), PropertyContainer::addIntegerArray(), displayLogMessage(), error(), find(), TextPropertyList::get(), location, parents, resolveAllAlias(), strrr(), and typeName.

void TextPropertyGroup::resolveAllAlias (  ) 

Definition at line 163 of file textfileparser.cpp.

References addEntry(), TextPropertyGroup::Entry::alias_all_resolved, error(), print(), processAlias(), and typeName.

Referenced by buildInheritance().

bool TextPropertyGroup::isAbstract (  )  [inline]

Definition at line 102 of file textfileparser.h.

void TextPropertyGroup::print ( int  indent = 0  ) 

Definition at line 80 of file textfileparser.cpp.

References displayLogMessage(), and parents.

Referenced by resolveAllAlias().


Member Data Documentation

Parents TextPropertyGroup::parents

Definition at line 89 of file textfileparser.h.

Referenced by buildInheritance(), find(), findGeneration(), findMatches(), listInheritanceFilenames(), print(), and processAlias().

ASCString TextPropertyGroup::fileName

Definition at line 91 of file textfileparser.h.

Referenced by PropertyReadingContainer::getFileName(), PropertyWritingContainer::PropertyWritingContainer(), TextFormatParser::run(), and PropertyContainer::warning().

ASCString TextPropertyGroup::location

Definition at line 92 of file textfileparser.h.

Referenced by buildInheritance(), error(), PropertyReadingContainer::getLocation(), listInheritanceFilenames(), PropertyWritingContainer::PropertyWritingContainer(), and TextFormatParser::run().

ASCString TextPropertyGroup::archive

Definition at line 93 of file textfileparser.h.

Referenced by PropertyReadingContainer::getArchive(), and TextFormatParser::run().

ASCString TextPropertyGroup::typeName

the name of the structure. For example "VehicleType"

Definition at line 96 of file textfileparser.h.

Referenced by buildInheritance(), evalID(), loadalltextfiles(), resolveAllAlias(), and TextFormatParser::startLevel().


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