xoreos  0.0.5
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
Aurora::GFF3WriterStruct Class Reference

A GFF3 struct containing GFF3 fields. More...

#include <gff3writer.h>

Inheritance diagram for Aurora::GFF3WriterStruct:
Inheritance graph
[legend]
Collaboration diagram for Aurora::GFF3WriterStruct:
Collaboration graph
[legend]

Public Member Functions

 GFF3WriterStruct (GFF3Writer *parent, uint32 id=0xFFFFFFFF)
 
uint32 getID () const
 Get ID of the struct. More...
 
size_t getFieldCount () const
 Get the count of fields. More...
 
GFF3WriterStructPtr addStruct (const Common::UString &label)
 Create a new struct. More...
 
GFF3WriterListPtr addList (const Common::UString &label)
 Create a new list. More...
 
void addByte (const Common::UString &label, byte value)
 Add a new byte. More...
 
void addChar (const Common::UString &label, char value)
 Add a new char. More...
 
void addFloat (const Common::UString &label, float value)
 Add a new float. More...
 
void addDouble (const Common::UString &label, double value)
 Add a new double. More...
 
void addUint16 (const Common::UString &label, uint16 value)
 Add a new uint16. More...
 
void addUint32 (const Common::UString &label, uint32 value)
 Add a new uint32. More...
 
void addUint64 (const Common::UString &label, uint64 value)
 Add a new uint64. More...
 
void addSint16 (const Common::UString &label, int16 value)
 Add a new sint16. More...
 
void addSint32 (const Common::UString &label, int32 value)
 Add a new sint32. More...
 
void addSint64 (const Common::UString &label, int64 value)
 Add a new sint64. More...
 
void addExoString (const Common::UString &label, const Common::UString &value)
 Add a new ExoString. More...
 
void addStrRef (const Common::UString &label, uint32 value)
 Add a new String reference. More...
 
void addResRef (const Common::UString &label, const Common::UString &value)
 Add a new Resource reference. More...
 
void addVoid (const Common::UString &label, const byte *data, uint32 size)
 Add new void data. More...
 
void addVector (const Common::UString &label, glm::vec3 value)
 Add a new Vector. More...
 
void addOrientation (const Common::UString &label, glm::vec4 value)
 Add a new Orientation. More...
 
void addLocString (const Common::UString &label, const LocString &value)
 Add a new LocString. More...
 

Private Member Functions

GFF3Writer::FieldPtr createField (GFF3Struct::FieldType type, const Common::UString &label)
 

Private Attributes

uint32 _id
 
GFF3Writer_parent
 
std::vector< size_t > _fieldIndices
 

Friends

class GFF3Writer
 
class GFF3WriterList
 

Detailed Description

A GFF3 struct containing GFF3 fields.

A field can be of any type, including list and struct.

Definition at line 126 of file gff3writer.h.

Constructor & Destructor Documentation

◆ GFF3WriterStruct()

Aurora::GFF3WriterStruct::GFF3WriterStruct ( GFF3Writer parent,
uint32  id = 0xFFFFFFFF 
)

Definition at line 459 of file gff3writer.cpp.

Member Function Documentation

◆ addByte()

void Aurora::GFF3WriterStruct::addByte ( const Common::UString label,
byte  value 
)

Add a new byte.

Definition at line 382 of file gff3writer.cpp.

References createField(), and Aurora::GFF3Struct::kFieldTypeByte.

Here is the call graph for this function:

◆ addChar()

void Aurora::GFF3WriterStruct::addChar ( const Common::UString label,
char  value 
)

Add a new char.

Definition at line 386 of file gff3writer.cpp.

References createField(), and Aurora::GFF3Struct::kFieldTypeChar.

Here is the call graph for this function:

◆ addDouble()

void Aurora::GFF3WriterStruct::addDouble ( const Common::UString label,
double  value 
)

Add a new double.

Definition at line 394 of file gff3writer.cpp.

References createField(), and Aurora::GFF3Struct::kFieldTypeDouble.

Here is the call graph for this function:

◆ addExoString()

void Aurora::GFF3WriterStruct::addExoString ( const Common::UString label,
const Common::UString value 
)

Add a new ExoString.

Definition at line 422 of file gff3writer.cpp.

References createField(), and Aurora::GFF3Struct::kFieldTypeExoString.

Here is the call graph for this function:

◆ addFloat()

void Aurora::GFF3WriterStruct::addFloat ( const Common::UString label,
float  value 
)

Add a new float.

Definition at line 390 of file gff3writer.cpp.

References createField(), and Aurora::GFF3Struct::kFieldTypeFloat.

Here is the call graph for this function:

◆ addList()

GFF3WriterListPtr Aurora::GFF3WriterStruct::addList ( const Common::UString label)

Create a new list.

Definition at line 360 of file gff3writer.cpp.

References _fieldIndices, Aurora::GFF3Writer::_fields, Aurora::GFF3Writer::_lists, _parent, Aurora::GFF3Writer::addLabel(), and Aurora::GFF3Struct::kFieldTypeList.

Here is the call graph for this function:

◆ addLocString()

void Aurora::GFF3WriterStruct::addLocString ( const Common::UString label,
const LocString value 
)

Add a new LocString.

Definition at line 449 of file gff3writer.cpp.

References createField(), and Aurora::GFF3Struct::kFieldTypeLocString.

Here is the call graph for this function:

◆ addOrientation()

void Aurora::GFF3WriterStruct::addOrientation ( const Common::UString label,
glm::vec4  value 
)

Add a new Orientation.

Definition at line 445 of file gff3writer.cpp.

References createField(), and Aurora::GFF3Struct::kFieldTypeOrientation.

Here is the call graph for this function:

◆ addResRef()

void Aurora::GFF3WriterStruct::addResRef ( const Common::UString label,
const Common::UString value 
)

Add a new Resource reference.

Definition at line 430 of file gff3writer.cpp.

References createField(), and Aurora::GFF3Struct::kFieldTypeResRef.

Here is the call graph for this function:

◆ addSint16()

void Aurora::GFF3WriterStruct::addSint16 ( const Common::UString label,
int16  value 
)

Add a new sint16.

Definition at line 410 of file gff3writer.cpp.

References createField(), and Aurora::GFF3Struct::kFieldTypeSint16.

Here is the call graph for this function:

◆ addSint32()

void Aurora::GFF3WriterStruct::addSint32 ( const Common::UString label,
int32  value 
)

Add a new sint32.

Definition at line 414 of file gff3writer.cpp.

References createField(), and Aurora::GFF3Struct::kFieldTypeSint32.

Here is the call graph for this function:

◆ addSint64()

void Aurora::GFF3WriterStruct::addSint64 ( const Common::UString label,
int64  value 
)

Add a new sint64.

Definition at line 418 of file gff3writer.cpp.

References createField(), and Aurora::GFF3Struct::kFieldTypeSint64.

Here is the call graph for this function:

◆ addStrRef()

void Aurora::GFF3WriterStruct::addStrRef ( const Common::UString label,
uint32  value 
)

Add a new String reference.

Definition at line 426 of file gff3writer.cpp.

References createField(), and Aurora::GFF3Struct::kFieldTypeStrRef.

Here is the call graph for this function:

◆ addStruct()

GFF3WriterStructPtr Aurora::GFF3WriterStruct::addStruct ( const Common::UString label)

Create a new struct.

Definition at line 337 of file gff3writer.cpp.

References _fieldIndices, Aurora::GFF3Writer::_fields, _parent, Aurora::GFF3Writer::_structs, Aurora::GFF3Writer::addLabel(), and Aurora::GFF3Struct::kFieldTypeStruct.

Here is the call graph for this function:

◆ addUint16()

void Aurora::GFF3WriterStruct::addUint16 ( const Common::UString label,
uint16  value 
)

Add a new uint16.

Definition at line 398 of file gff3writer.cpp.

References createField(), and Aurora::GFF3Struct::kFieldTypeUint16.

Here is the call graph for this function:

◆ addUint32()

void Aurora::GFF3WriterStruct::addUint32 ( const Common::UString label,
uint32  value 
)

Add a new uint32.

Definition at line 402 of file gff3writer.cpp.

References createField(), and Aurora::GFF3Struct::kFieldTypeUint32.

Here is the call graph for this function:

◆ addUint64()

void Aurora::GFF3WriterStruct::addUint64 ( const Common::UString label,
uint64  value 
)

Add a new uint64.

Definition at line 406 of file gff3writer.cpp.

References createField(), and Aurora::GFF3Struct::kFieldTypeUint64.

Here is the call graph for this function:

◆ addVector()

void Aurora::GFF3WriterStruct::addVector ( const Common::UString label,
glm::vec3  value 
)

Add a new Vector.

Definition at line 441 of file gff3writer.cpp.

References createField(), and Aurora::GFF3Struct::kFieldTypeVector.

Here is the call graph for this function:

◆ addVoid()

void Aurora::GFF3WriterStruct::addVoid ( const Common::UString label,
const byte data,
uint32  size 
)

Add new void data.

Data will be copied.

Definition at line 434 of file gff3writer.cpp.

References createField(), and Aurora::GFF3Struct::kFieldTypeVoid.

Here is the call graph for this function:

◆ createField()

GFF3Writer::FieldPtr Aurora::GFF3WriterStruct::createField ( GFF3Struct::FieldType  type,
const Common::UString label 
)
private

Definition at line 453 of file gff3writer.cpp.

References _fieldIndices, Aurora::GFF3Writer::_fields, _parent, and Aurora::GFF3Writer::createField().

Referenced by addByte(), addChar(), addDouble(), addExoString(), addFloat(), addLocString(), addOrientation(), addResRef(), addSint16(), addSint32(), addSint64(), addStrRef(), addUint16(), addUint32(), addUint64(), addVector(), and addVoid().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getFieldCount()

size_t Aurora::GFF3WriterStruct::getFieldCount ( ) const

Get the count of fields.

Definition at line 333 of file gff3writer.cpp.

References _fieldIndices.

◆ getID()

uint32 Aurora::GFF3WriterStruct::getID ( ) const

Get ID of the struct.

Definition at line 329 of file gff3writer.cpp.

References _id.

Friends And Related Function Documentation

◆ GFF3Writer

friend class GFF3Writer
friend

Definition at line 182 of file gff3writer.h.

◆ GFF3WriterList

friend class GFF3WriterList
friend

Definition at line 183 of file gff3writer.h.

Member Data Documentation

◆ _fieldIndices

std::vector<size_t> Aurora::GFF3WriterStruct::_fieldIndices
private

Definition at line 180 of file gff3writer.h.

Referenced by addList(), addStruct(), createField(), and getFieldCount().

◆ _id

uint32 Aurora::GFF3WriterStruct::_id
private

Definition at line 178 of file gff3writer.h.

Referenced by getID().

◆ _parent

GFF3Writer* Aurora::GFF3WriterStruct::_parent
private

Definition at line 179 of file gff3writer.h.

Referenced by addList(), addStruct(), and createField().


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