Sleeping Wombat GUI  0.100
swGUI
EngineObject.h
Go to the documentation of this file.
1 #pragma once
2 
10 
11 class ISerializer;
12 class IDeserializer;
13 
14 
23 {
24  RTTR_ENABLE()
25 
26 public:
27  inline TypeID GetType () const { return this->get_type(); }
28  inline std::string GetTypeName () const { return std::string( this->get_type().get_name() ); }
29 
30 
33  virtual void Serialize ( ISerializer* ser ) const;
34 
36  virtual void Deserialize ( IDeserializer* deser );
37 
40  virtual Size MemorySize () { return this->get_type().get_sizeof(); }
41 
42  template< typename TargetType >
43  TargetType* DynamicCast () { return rttr::rttr_cast< TargetType* >( this ); }
44 };
45 
Interface for deserializers.
Definition: Deserializer.h:38
Serializers interface.
Definition: Serializer.h:35
TypeID GetType() const
Definition: EngineObject.h:27
Plik zawiera definicje podstawowych typów zmiennych.
virtual void Deserialize(IDeserializer *deser)
Implements default deserialization.
Definition: EngineObject.cpp:23
std::string GetTypeName() const
Definition: EngineObject.h:28
TargetType * DynamicCast()
Definition: EngineObject.h:43
size_t Size
Definition: TypesDefinitions.h:35
Klasa bazowa dla obiektów, które mają być dostępne w edytorze poprzez rttr. Należy po niej odziedzicz...
Definition: EngineObject.h:22
rttr::type TypeID
Definition: RTTR.h:32
virtual Size MemorySize()
Definition: EngineObject.h:40
virtual void Serialize(ISerializer *ser) const
Implements default serialization. Serializes only declared properties.
Definition: EngineObject.cpp:16