xoreos
0.0.5
|
#include <gff3writer.h>
Classes | |
struct | Field |
An implementation for a field. More... | |
Public Member Functions | |
GFF3Writer (uint32 id, uint32 version=MKTAG('V', '3', '.', '2')) | |
GFF3WriterStructPtr | getTopLevel () |
Get the top-level struct. More... | |
void | write (Common::WriteStream &stream) |
Write the GFF3 to stream. More... | |
Private Types | |
typedef boost::shared_ptr< Field > | FieldPtr |
Private Member Functions | |
uint32 | addLabel (const Common::UString &label) |
Adds a label to the writer and returns the corresponding index. More... | |
size_t | createField (GFF3Struct::FieldType type, const Common::UString &label) |
Static Private Member Functions | |
static uint32 | getFieldDataSize (FieldPtr field) |
Get the actual size of the field. More... | |
Private Attributes | |
uint32 | _id |
uint32 | _version |
std::vector< GFF3WriterStructPtr > | _structs |
std::vector< GFF3WriterListPtr > | _lists |
std::vector< Common::UString > | _labels |
std::vector< FieldPtr > | _fields |
Friends | |
class | GFF3WriterList |
class | GFF3WriterStruct |
Definition at line 46 of file gff3writer.h.
|
private |
Definition at line 82 of file gff3writer.h.
Definition at line 36 of file gff3writer.cpp.
References _structs.
|
private |
Adds a label to the writer and returns the corresponding index.
Definition at line 252 of file gff3writer.cpp.
References _labels.
Referenced by Aurora::GFF3WriterStruct::addList(), Aurora::GFF3WriterList::addStruct(), Aurora::GFF3WriterStruct::addStruct(), and createField().
|
private |
Definition at line 286 of file gff3writer.cpp.
References _fields, and addLabel().
Referenced by Aurora::GFF3WriterStruct::createField().
Get the actual size of the field.
Definition at line 262 of file gff3writer.cpp.
References Aurora::GFF3Struct::kFieldTypeDouble, Aurora::GFF3Struct::kFieldTypeExoString, Aurora::GFF3Struct::kFieldTypeLocString, Aurora::GFF3Struct::kFieldTypeOrientation, Aurora::GFF3Struct::kFieldTypeResRef, Aurora::GFF3Struct::kFieldTypeSint64, Aurora::GFF3Struct::kFieldTypeStrRef, Aurora::GFF3Struct::kFieldTypeUint64, Aurora::GFF3Struct::kFieldTypeVector, and Aurora::GFF3Struct::kFieldTypeVoid.
Referenced by write().
GFF3WriterStructPtr Aurora::GFF3Writer::getTopLevel | ( | ) |
void Aurora::GFF3Writer::write | ( | Common::WriteStream & | stream | ) |
Write the GFF3 to stream.
Definition at line 44 of file gff3writer.cpp.
References _fields, _id, _labels, _lists, _structs, _version, Common::UString::c_str(), getFieldDataSize(), Aurora::GFF3Struct::kFieldTypeByte, Aurora::GFF3Struct::kFieldTypeChar, Aurora::GFF3Struct::kFieldTypeDouble, Aurora::GFF3Struct::kFieldTypeExoString, Aurora::GFF3Struct::kFieldTypeFloat, Aurora::GFF3Struct::kFieldTypeList, Aurora::GFF3Struct::kFieldTypeLocString, Aurora::GFF3Struct::kFieldTypeOrientation, Aurora::GFF3Struct::kFieldTypeResRef, Aurora::GFF3Struct::kFieldTypeSint16, Aurora::GFF3Struct::kFieldTypeSint32, Aurora::GFF3Struct::kFieldTypeSint64, Aurora::GFF3Struct::kFieldTypeStrRef, Aurora::GFF3Struct::kFieldTypeStruct, Aurora::GFF3Struct::kFieldTypeUint16, Aurora::GFF3Struct::kFieldTypeUint32, Aurora::GFF3Struct::kFieldTypeUint64, Aurora::GFF3Struct::kFieldTypeVector, Aurora::GFF3Struct::kFieldTypeVoid, Common::UString::size(), Common::WriteStream::write(), Common::WriteStream::writeByte(), Common::WriteStream::writeIEEEDoubleLE(), Common::WriteStream::writeIEEEFloatLE(), Common::WriteStream::writeSint32LE(), Common::WriteStream::writeSint64LE(), Common::WriteStream::writeString(), Common::WriteStream::writeUint32BE(), Common::WriteStream::writeUint32LE(), Common::WriteStream::writeUint64LE(), and Common::WriteStream::writeZeros().
|
friend |
Definition at line 93 of file gff3writer.h.
|
friend |
Definition at line 94 of file gff3writer.h.
|
private |
Definition at line 91 of file gff3writer.h.
Referenced by Aurora::GFF3WriterStruct::addList(), Aurora::GFF3WriterList::addStruct(), Aurora::GFF3WriterStruct::addStruct(), createField(), Aurora::GFF3WriterStruct::createField(), and write().
|
private |
Definition at line 84 of file gff3writer.h.
Referenced by write().
|
private |
Definition at line 90 of file gff3writer.h.
Referenced by addLabel(), and write().
|
private |
Definition at line 88 of file gff3writer.h.
Referenced by Aurora::GFF3WriterStruct::addList(), and write().
|
private |
Definition at line 87 of file gff3writer.h.
Referenced by Aurora::GFF3WriterList::addStruct(), Aurora::GFF3WriterStruct::addStruct(), getTopLevel(), GFF3Writer(), and write().
|
private |
Definition at line 85 of file gff3writer.h.
Referenced by write().