xoreos  0.0.5
Classes | Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
Aurora::GFF3Writer Class Reference

#include <gff3writer.h>

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

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< FieldFieldPtr
 

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
 

Detailed Description

Definition at line 46 of file gff3writer.h.

Member Typedef Documentation

◆ FieldPtr

typedef boost::shared_ptr<Field> Aurora::GFF3Writer::FieldPtr
private

Definition at line 82 of file gff3writer.h.

Constructor & Destructor Documentation

◆ GFF3Writer()

Aurora::GFF3Writer::GFF3Writer ( uint32  id,
uint32  version = MKTAG('V', '3', '.', '2') 
)

Definition at line 36 of file gff3writer.cpp.

References _structs.

Member Function Documentation

◆ addLabel()

uint32 Aurora::GFF3Writer::addLabel ( const Common::UString label)
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().

Here is the caller graph for this function:

◆ createField()

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

Definition at line 286 of file gff3writer.cpp.

References _fields, and addLabel().

Referenced by Aurora::GFF3WriterStruct::createField().

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

◆ getFieldDataSize()

uint32 Aurora::GFF3Writer::getFieldDataSize ( FieldPtr  field)
staticprivate

◆ getTopLevel()

GFF3WriterStructPtr Aurora::GFF3Writer::getTopLevel ( )

Get the top-level struct.

Definition at line 40 of file gff3writer.cpp.

References _structs.

◆ write()

void Aurora::GFF3Writer::write ( Common::WriteStream stream)

Friends And Related Function Documentation

◆ GFF3WriterList

friend class GFF3WriterList
friend

Definition at line 93 of file gff3writer.h.

◆ GFF3WriterStruct

friend class GFF3WriterStruct
friend

Definition at line 94 of file gff3writer.h.

Member Data Documentation

◆ _fields

std::vector<FieldPtr> Aurora::GFF3Writer::_fields
private

◆ _id

uint32 Aurora::GFF3Writer::_id
private

Definition at line 84 of file gff3writer.h.

Referenced by write().

◆ _labels

std::vector<Common::UString> Aurora::GFF3Writer::_labels
private

Definition at line 90 of file gff3writer.h.

Referenced by addLabel(), and write().

◆ _lists

std::vector<GFF3WriterListPtr> Aurora::GFF3Writer::_lists
private

Definition at line 88 of file gff3writer.h.

Referenced by Aurora::GFF3WriterStruct::addList(), and write().

◆ _structs

std::vector<GFF3WriterStructPtr> Aurora::GFF3Writer::_structs
private

◆ _version

uint32 Aurora::GFF3Writer::_version
private

Definition at line 85 of file gff3writer.h.

Referenced by write().


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