![]() |
Gorgon Game Engine
|
Public Member Functions | |
PointfData () | |
PointfData (const std::string &name, Geometry::Pointf v) | |
PointfData (Geometry::Pointf 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... | |
![]() | |
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 DataItem * | Load (std::weak_ptr< File > file, std::shared_ptr< Reader > reader, unsigned long totalsize) |
![]() | |
static void | InitializeLoaders () |
This function will initialize data loaders. More... | |
Additional Inherited Members | |
![]() | |
using | LoaderFn = std::function< DataItem *(std::weak_ptr< File > file, std::shared_ptr< Reader > reader, unsigned long totalsize)> |
![]() | |
std::string | Name |
The name of the data item. More... | |
![]() | |
static std::map< GID::Type, LoaderFn > | DataLoaders |
Data loaders that all data containing classes would use to load their children. More... | |
PointfData | ( | ) |
PointfData | ( | const std::string & | name, |
Geometry::Pointf | v | ||
) |
References DataItem::Name.
|
overridevirtual |
Returns the Gorgon ID of this data object.
Implements DataItem.
References Gorgon::Resource::GID::Data_Pointf.
|
static |
References PointfData::PointfData(), ASSERT, and DataImp< Geometry::Pointf >::value.
|
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::Pointf >::value, Writer::WriteFloat(), basic_Point< T_ >::X, and basic_Point< T_ >::Y.
|
overridevirtual |
Converts the contents of this data to string.
Implements DataItem.
References Gorgon::String::From(), and DataImp< Geometry::Pointf >::value.