Gorgon Game Engine
PointData Class Reference
Inheritance diagram for PointData:
[legend]

Public Member Functions

 PointData ()
 
 PointData (const std::string &name, Geometry::Point v)
 
 PointData (Geometry::Point v)
 
virtual GID::Type GetGID () const override
 Returns the Gorgon ID of this data object. More...
 
virtual void SaveValue (Writer &writer) const override
 Saves only the value of the data item to gorgon file. More...
 
virtual std::string ToString () const override
 Converts the contents of this data to string. More...
 
- Public Member Functions inherited from DataItem
virtual ~DataItem ()
 
template<class T_ >
T_ Get () const
 Returns the contents of this data item to the requested type; use GetObject in order to get resource objects. More...
 
template<>
int Get () const
 
template<>
float Get () const
 
template<class T_ >
T_ & GetObject () const
 
virtual void Save (Writer &writer) const
 Saves the data item with header information to gorgon file. More...
 

Static Public Member Functions

static DataItemLoad (std::weak_ptr< File > file, std::shared_ptr< Reader > reader, unsigned long totalsize)
 
- Static Public Member Functions inherited from DataItem
static void InitializeLoaders ()
 This function will initialize data loaders. More...
 

Additional Inherited Members

- Public Types inherited from DataItem
using LoaderFn = std::function< DataItem *(std::weak_ptr< File > file, std::shared_ptr< Reader > reader, unsigned long totalsize)>
 
- Public Attributes inherited from DataItem
std::string Name
 The name of the data item. More...
 
- Static Public Attributes inherited from DataItem
static std::map< GID::Type, LoaderFnDataLoaders
 Data loaders that all data containing classes would use to load their children. More...
 

Constructor & Destructor Documentation

◆ PointData() [1/3]

PointData ( )

◆ PointData() [2/3]

◆ PointData() [3/3]

PointData ( const std::string &  name,
Geometry::Point  v 
)

References DataItem::Name.

Member Function Documentation

◆ GetGID()

virtual GID::Type GetGID ( ) const
overridevirtual

Returns the Gorgon ID of this data object.

Implements DataItem.

References Gorgon::Resource::GID::Data_Point.

◆ Load()

DataItem * Load ( std::weak_ptr< File file,
std::shared_ptr< Reader reader,
unsigned long  totalsize 
)
static

◆ SaveValue()

virtual void SaveValue ( Writer writer) const
overridevirtual

Saves only the value of the data item to gorgon file.

issizewritten controls whether the size of the object should be written for some data types (like blob and string)

Implements DataItem.

References DataImp< Geometry::Point >::value, Writer::WriteInt32(), basic_Point< T_ >::X, and basic_Point< T_ >::Y.

◆ ToString()

virtual std::string ToString ( ) const
overridevirtual

Converts the contents of this data to string.

Implements DataItem.

References Gorgon::String::From(), and DataImp< Geometry::Point >::value.


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