Stg::Worldfile Class Reference

#include <worldfile.hh>

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)
 
bool Load (std::istream &world_content, const std::string &filename=std::string())
 
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)
 
bool LoadCommon ()
 

Constructor & Destructor Documentation

◆ Worldfile()

Worldfile::Worldfile ( )

◆ ~Worldfile()

Worldfile::~Worldfile ( )

Member Function Documentation

◆ FileOpen()

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

◆ GetEntityCount()

int Worldfile::GetEntityCount ( )

◆ GetEntityParent()

int Worldfile::GetEntityParent ( int entity)

◆ GetEntityType()

const char * Worldfile::GetEntityType ( int entity)

◆ GetProperty()

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

◆ GetPropertyValue()

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

◆ Load() [1/2]

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

◆ Load() [2/2]

bool Worldfile::Load ( std::istream & world_content,
const std::string & filename = std::string() )

◆ LoadCommon()

bool Worldfile::LoadCommon ( )
protected

◆ LookupEntity()

int Worldfile::LookupEntity ( const char * type)

◆ PropertyExists()

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

◆ ReadAngle()

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

◆ ReadColor()

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

◆ ReadFilename()

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

◆ ReadFloat()

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

◆ ReadInt()

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

◆ ReadLength()

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

◆ ReadString()

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

◆ ReadTuple()

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

◆ Save()

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

◆ WarnUnused()

bool Worldfile::WarnUnused ( )

◆ WriteFloat()

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

◆ WriteInt()

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

◆ WriteLength()

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

◆ WriteString()

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

◆ WriteTuple()

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

Member Data Documentation

◆ filename

std::string Stg::Worldfile::filename

◆ unit_angle

double Stg::Worldfile::unit_angle

◆ unit_length

double Stg::Worldfile::unit_length

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