HoverRace
2.0
|
Base class for object created with a Dll Factory. More...
#include <DllObjectFactory.h>
Public Member Functions | |
ObjectFromFactory (const ObjectFromFactoryId &pId) noexcept | |
virtual | ~ObjectFromFactory () |
const ObjectFromFactoryId & | GetTypeId () const noexcept |
virtual void | Serialize (Parcel::ObjStream &archive)=0 |
Static Public Member Functions | |
template<class T > | |
static void | SerializeShared (Parcel::ObjStream &archive, typename std::enable_if< std::is_base_of< ObjectFromFactory, T >::value, std::shared_ptr< T >>::type &obj) |
Serialize a shared pointer to a serializable object. More... | |
Static Private Member Functions | |
static void | ThrowUnexpected (const ObjectFromFactoryId &oid) |
Private Attributes | |
ObjectFromFactoryId | mId |
Base class for object created with a Dll Factory.
|
inlinenoexcept |
|
inlinevirtual |
|
inlinenoexcept |
|
pure virtual |
Implemented in HoverRace::Model::Element, HoverRace::ObjFac1::HoverRender, and HoverRace::ObjFac1::SpriteHandle.
|
inlinestatic |
Serialize a shared pointer to a serializable object.
When reading, the created object is checked against the expected type. If the created object is not the correct type, then the object pointer is set to nullptr
.
T | The expected shared pointer type. |
archive | The archive. | |
[in,out] | obj | The object. |
Parcel::ObjStreamExn | The object being read from the stream is not the expected type. |
|
staticprivate |
|
private |