Classes | Public Member Functions | Public Attributes | Protected Member Functions | Private Types | Private Member Functions | Private Attributes
Stg::Worldfile Class Reference

#include <worldfile.hh>

List of all members.

Classes

class  CEntity
class  CMacro
class  CToken

Public Member Functions

int GetEntityCount ()
int GetEntityParent (int entity)
const char * GetEntityType (int entity)
CPropertyGetProperty (int entity, const char *name)
const char * GetPropertyValue (CProperty *property, int index)
bool Load (const std::string &filename)
int LookupEntity (const char *type)
bool PropertyExists (int section, const char *token)
double ReadAngle (int entity, const char *name, double value)
uint32_t ReadColor (int entity, const char *name, uint32_t value)
const char * ReadFilename (int entity, const char *name, const char *value)
double ReadFloat (int entity, const char *name, double value)
int ReadInt (int entity, const char *name, int value)
double ReadLength (int entity, const char *name, double value)
const std::string ReadString (int entity, const char *name, const std::string &value)
int ReadTuple (const int entity, const char *name, const unsigned int first, const unsigned int num, const char *format,...)
bool Save (const std::string &filename)
bool WarnUnused ()
 Worldfile ()
void WriteFloat (int entity, const char *name, double value)
void WriteInt (int entity, const char *name, int value)
void WriteLength (int entity, const char *name, double value)
void WriteString (int entity, const char *name, const std::string &value)
void WriteTuple (const int entity, const char *name, const unsigned int first, const unsigned int count, const char *format,...)
 ~Worldfile ()

Public Attributes

std::string filename
double unit_angle
double unit_length

Protected Member Functions

FILE * FileOpen (const std::string &filename, const char *method)

Private Types

enum  {
  TokenComment, TokenWord, TokenNum, TokenString,
  TokenOpenEntity, TokenCloseEntity, TokenOpenTuple, TokenCloseTuple,
  TokenSpace, TokenEOL
}

Private Member Functions

int AddEntity (int parent, const char *type)
void AddMacro (const char *macroname, const char *entityname, int line, int starttoken, int endtoken)
CPropertyAddProperty (int entity, const char *name, int line)
void AddPropertyValue (CProperty *property, int index, int value_token)
bool AddToken (int type, const char *value, int include)
void ClearEntities ()
void ClearMacros ()
void ClearProperties ()
void ClearTokens ()
void DumpEntities ()
void DumpMacros ()
void DumpProperties ()
void DumpTokens ()
const char * GetTokenValue (int index)
bool LoadTokenComment (FILE *file, int *line, int include)
bool LoadTokenInclude (FILE *file, int *line, int include)
bool LoadTokenNum (FILE *file, int *line, int include)
bool LoadTokens (FILE *file, int include)
bool LoadTokenSpace (FILE *file, int *line, int include)
bool LoadTokenString (FILE *file, int *line, int include)
bool LoadTokenWord (FILE *file, int *line, int include)
CMacroLookupMacro (const char *macroname)
bool ParseTokenDefine (int *index, int *line)
bool ParseTokenEntity (int entity, int *index, int *line)
bool ParseTokenInclude (int *index, int *line)
bool ParseTokenProperty (int entity, int *index, int *line)
bool ParseTokens ()
bool ParseTokenTuple (CProperty *property, int *index, int *line)
bool ParseTokenWord (int entity, int *index, int *line)
bool SaveTokens (FILE *file)
void SetPropertyValue (CProperty *property, int index, const char *value)
bool SetTokenValue (int index, const char *value)

Private Attributes

std::vector< CEntityentities
std::map< std::string, CMacromacros
std::map< std::string,
CProperty * > 
properties
std::vector< CTokentokens

Detailed Description

Definition at line 69 of file worldfile.hh.


Member Enumeration Documentation

anonymous enum [private]
Enumerator:
TokenComment 
TokenWord 
TokenNum 
TokenString 
TokenOpenEntity 
TokenCloseEntity 
TokenOpenTuple 
TokenCloseTuple 
TokenSpace 
TokenEOL 

Definition at line 268 of file worldfile.hh.


Constructor & Destructor Documentation

Definition at line 64 of file worldfile.cc.

Definition at line 78 of file worldfile.cc.


Member Function Documentation

int Worldfile::AddEntity ( int  parent,
const char *  type 
) [private]

Definition at line 1175 of file worldfile.cc.

void Worldfile::AddMacro ( const char *  macroname,
const char *  entityname,
int  line,
int  starttoken,
int  endtoken 
) [private]

Definition at line 1114 of file worldfile.cc.

CProperty * Worldfile::AddProperty ( int  entity,
const char *  name,
int  line 
) [private]

Definition at line 1267 of file worldfile.cc.

void Worldfile::AddPropertyValue ( CProperty property,
int  index,
int  value_token 
) [private]

Definition at line 1282 of file worldfile.cc.

bool Worldfile::AddToken ( int  type,
const char *  value,
int  include 
) [private]

Definition at line 689 of file worldfile.cc.

void Worldfile::ClearEntities ( ) [private]

Definition at line 1162 of file worldfile.cc.

void Worldfile::ClearMacros ( ) [private]

Definition at line 1106 of file worldfile.cc.

void Worldfile::ClearProperties ( ) [private]

Definition at line 1257 of file worldfile.cc.

void Worldfile::ClearTokens ( ) [private]

Definition at line 681 of file worldfile.cc.

void Worldfile::DumpEntities ( ) [private]

Definition at line 1244 of file worldfile.cc.

void Worldfile::DumpMacros ( ) [private]

Definition at line 1137 of file worldfile.cc.

void Worldfile::DumpProperties ( ) [private]

Definition at line 1355 of file worldfile.cc.

void Worldfile::DumpTokens ( ) [private]

Definition at line 717 of file worldfile.cc.

FILE * Worldfile::FileOpen ( const std::string &  filename,
const char *  method 
) [protected]

Definition at line 86 of file worldfile.cc.

Definition at line 1196 of file worldfile.cc.

int Worldfile::GetEntityParent ( int  entity)

Definition at line 1204 of file worldfile.cc.

const char * Worldfile::GetEntityType ( int  entity)

Definition at line 1214 of file worldfile.cc.

CProperty * Worldfile::GetProperty ( int  entity,
const char *  name 
)

Definition at line 1298 of file worldfile.cc.

const char * Worldfile::GetPropertyValue ( CProperty property,
int  index 
)

Definition at line 1345 of file worldfile.cc.

const char * Worldfile::GetTokenValue ( int  index) [private]

Definition at line 708 of file worldfile.cc.

bool Worldfile::Load ( const std::string &  filename)

Definition at line 125 of file worldfile.cc.

bool Worldfile::LoadTokenComment ( FILE *  file,
int *  line,
int  include 
) [private]

Definition at line 341 of file worldfile.cc.

bool Worldfile::LoadTokenInclude ( FILE *  file,
int *  line,
int  include 
) [private]

Definition at line 420 of file worldfile.cc.

bool Worldfile::LoadTokenNum ( FILE *  file,
int *  line,
int  include 
) [private]

Definition at line 550 of file worldfile.cc.

bool Worldfile::LoadTokens ( FILE *  file,
int  include 
) [private]

Definition at line 244 of file worldfile.cc.

bool Worldfile::LoadTokenSpace ( FILE *  file,
int *  line,
int  include 
) [private]

Definition at line 623 of file worldfile.cc.

bool Worldfile::LoadTokenString ( FILE *  file,
int *  line,
int  include 
) [private]

Definition at line 586 of file worldfile.cc.

bool Worldfile::LoadTokenWord ( FILE *  file,
int *  line,
int  include 
) [private]

Definition at line 374 of file worldfile.cc.

int Worldfile::LookupEntity ( const char *  type)

Definition at line 1225 of file worldfile.cc.

Worldfile::CMacro * Worldfile::LookupMacro ( const char *  macroname) [private]

Definition at line 1124 of file worldfile.cc.

bool Worldfile::ParseTokenDefine ( int *  index,
int *  line 
) [private]

Definition at line 826 of file worldfile.cc.

bool Worldfile::ParseTokenEntity ( int  entity,
int *  index,
int *  line 
) [private]

Definition at line 939 of file worldfile.cc.

bool Worldfile::ParseTokenInclude ( int *  index,
int *  line 
) [private]

Definition at line 795 of file worldfile.cc.

bool Worldfile::ParseTokenProperty ( int  entity,
int *  index,
int *  line 
) [private]

Definition at line 1028 of file worldfile.cc.

bool Worldfile::ParseTokens ( ) [private]

Definition at line 740 of file worldfile.cc.

bool Worldfile::ParseTokenTuple ( CProperty property,
int *  index,
int *  line 
) [private]

Definition at line 1069 of file worldfile.cc.

bool Worldfile::ParseTokenWord ( int  entity,
int *  index,
int *  line 
) [private]

Definition at line 903 of file worldfile.cc.

bool Worldfile::PropertyExists ( int  section,
const char *  token 
)

Definition at line 1324 of file worldfile.cc.

double Stg::Worldfile::ReadAngle ( int  entity,
const char *  name,
double  value 
) [inline]

Definition at line 116 of file worldfile.hh.

uint32_t Stg::Worldfile::ReadColor ( int  entity,
const char *  name,
uint32_t  value 
)
const char * Worldfile::ReadFilename ( int  entity,
const char *  name,
const char *  value 
)

Definition at line 1450 of file worldfile.cc.

double Worldfile::ReadFloat ( int  entity,
const char *  name,
double  value 
)

Definition at line 1434 of file worldfile.cc.

int Worldfile::ReadInt ( int  entity,
const char *  name,
int  value 
)

Definition at line 1398 of file worldfile.cc.

double Stg::Worldfile::ReadLength ( int  entity,
const char *  name,
double  value 
) [inline]

Definition at line 107 of file worldfile.hh.

const std::string Worldfile::ReadString ( int  entity,
const char *  name,
const std::string &  value 
)

Definition at line 1376 of file worldfile.cc.

int Worldfile::ReadTuple ( const int  entity,
const char *  name,
const unsigned int  first,
const unsigned int  num,
const char *  format,
  ... 
)

Definition at line 1506 of file worldfile.cc.

bool Worldfile::Save ( const std::string &  filename)

Definition at line 193 of file worldfile.cc.

bool Worldfile::SaveTokens ( FILE *  file) [private]

Definition at line 659 of file worldfile.cc.

void Worldfile::SetPropertyValue ( CProperty property,
int  index,
const char *  value 
) [private]

Definition at line 1332 of file worldfile.cc.

bool Worldfile::SetTokenValue ( int  index,
const char *  value 
) [private]

Definition at line 698 of file worldfile.cc.

Definition at line 224 of file worldfile.cc.

void Worldfile::WriteFloat ( int  entity,
const char *  name,
double  value 
)

Definition at line 1418 of file worldfile.cc.

void Worldfile::WriteInt ( int  entity,
const char *  name,
int  value 
)

Definition at line 1409 of file worldfile.cc.

void Stg::Worldfile::WriteLength ( int  entity,
const char *  name,
double  value 
)
void Worldfile::WriteString ( int  entity,
const char *  name,
const std::string &  value 
)

Definition at line 1387 of file worldfile.cc.

void Worldfile::WriteTuple ( const int  entity,
const char *  name,
const unsigned int  first,
const unsigned int  count,
const char *  format,
  ... 
)

Definition at line 1573 of file worldfile.cc.


Member Data Documentation

std::vector<CEntity> Stg::Worldfile::entities [private]

Definition at line 344 of file worldfile.hh.

Definition at line 350 of file worldfile.hh.

std::map<std::string,CMacro> Stg::Worldfile::macros [private]

Definition at line 327 of file worldfile.hh.

std::map<std::string,CProperty*> Stg::Worldfile::properties [private]

Definition at line 347 of file worldfile.hh.

std::vector<CToken> Stg::Worldfile::tokens [private]

Definition at line 298 of file worldfile.hh.

Definition at line 354 of file worldfile.hh.

Definition at line 353 of file worldfile.hh.


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


stage
Author(s): Richard Vaughan , Brian Gerkey , Reed Hedges , Andrew Howard , Toby Collett , Pooya Karimian , Jeremy Asher , Alex Couture-Beil , Geoff Biggs , Rich Mattes , Abbas Sadat
autogenerated on Thu Aug 27 2015 15:20:57