xoreos
0.0.5
|
A GFF3 struct containing GFF3 fields. More...
#include <gff3writer.h>
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 |
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.
Aurora::GFF3WriterStruct::GFF3WriterStruct | ( | GFF3Writer * | parent, |
uint32 | id = 0xFFFFFFFF |
||
) |
Definition at line 459 of file gff3writer.cpp.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
|
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().
size_t Aurora::GFF3WriterStruct::getFieldCount | ( | ) | const |
uint32 Aurora::GFF3WriterStruct::getID | ( | ) | const |
|
friend |
Definition at line 182 of file gff3writer.h.
|
friend |
Definition at line 183 of file gff3writer.h.
|
private |
Definition at line 180 of file gff3writer.h.
Referenced by addList(), addStruct(), createField(), and getFieldCount().
|
private |
Definition at line 178 of file gff3writer.h.
Referenced by getID().
|
private |
Definition at line 179 of file gff3writer.h.
Referenced by addList(), addStruct(), and createField().