"Safir SDK Core"
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
TestObject.h
Go to the documentation of this file.
1 #ifndef SAFIR_OLIBTEST_TESTOBJECT_H_INCLUDED
2 #define SAFIR_OLIBTEST_TESTOBJECT_H_INCLUDED
3 
8 
9 #include <Safir/Dob/Entity.h>
11 
12 #ifdef _MSC_VER
13 #ifdef DOTS_GENERATED_CPP_EXPORTS
14 #define GENERATED_API __declspec(dllexport)
15 #else
16 #define GENERATED_API __declspec(dllimport)
17 #ifdef _DEBUG
18 #pragma comment( lib, "dots_generated-Safir-cppd.lib" )
19 #else
20 #pragma comment( lib, "dots_generated-Safir-cpp.lib" )
21 #endif
22 #endif
23 #endif
24 #ifdef __GNUC__
25 #define GENERATED_API
26 #endif
27 
31 namespace Safir
32 {
36 namespace OlibTest
37 {
38 
39  class TestObject; //forward declaration
40  typedef boost::shared_ptr<TestObject> TestObjectPtr;
41  typedef boost::shared_ptr<const TestObject> TestObjectConstPtr;
42 
45 
50  class GENERATED_API TestObject : public Safir::Dob::Entity
51  {
52  public:
53  //Constructors and Create routines
54  TestObject();
55  virtual Safir::Dob::Typesystem::ObjectPtr Clone() const;
56  static TestObjectPtr Create();
57 
58  //StringName
59  static Safir::Dob::Typesystem::MemberIndex StringNameMemberIndex();
60  static Safir::Dob::Typesystem::Int32 StringNameMaxStringLength();
63 
64 
65  //StringDescription
66  static Safir::Dob::Typesystem::MemberIndex StringDescriptionMemberIndex();
67  static Safir::Dob::Typesystem::Int32 StringDescriptionMaxStringLength();
70 
71 
72  //Int32
73  static Safir::Dob::Typesystem::MemberIndex Int32MemberIndex();
76 
77 
78  //Int64
79  static Safir::Dob::Typesystem::MemberIndex Int64MemberIndex();
82 
83 
84  //Float32
85  static Safir::Dob::Typesystem::MemberIndex Float32MemberIndex();
88 
89 
90  //Float64
91  static Safir::Dob::Typesystem::MemberIndex Float64MemberIndex();
94 
95 
96  //Bool
97  static Safir::Dob::Typesystem::MemberIndex BoolMemberIndex();
100 
101 
103  static const Safir::Dob::Typesystem::TypeId ClassTypeId = 4085336816539293054LL;
104 
105  //Type id for TestObject
106  virtual Safir::Dob::Typesystem::TypeId GetTypeId() const {return ClassTypeId;}
107 
108  //Check if anything in the object has change flags set
109  virtual bool IsChanged();
110 
111  //Recursively set all change flags in the object
112  virtual void SetChanged(const bool changed);
113 
114 
115  //Reflection part (Don't use unless you really know what you're doing!!)
118  virtual const Safir::Dob::Typesystem::ContainerBase & GetMember(const Safir::Dob::Typesystem::MemberIndex member,
119  const Safir::Dob::Typesystem::ArrayIndex index) const;
120 
121  virtual Safir::Dob::Typesystem::Int32 CalculateBlobSize() const;
122  virtual void WriteToBlob(char * blob, char * & beginningOfUnused) const;
123  explicit TestObject(char const * const blob);
124 
125  private:
126 
127 #ifdef _MSC_VER
128 #pragma warning (push)
129 #pragma warning (disable : 4251)
130 #endif
131 
132  Safir::Dob::Typesystem::StringContainer m_StringNameMember;
133  Safir::Dob::Typesystem::StringContainer m_StringDescriptionMember;
139 
140 #ifdef _MSC_VER
141 #pragma warning (pop)
142 #endif
143  };
144 
145 } // OlibTest
146 } // Safir
147 
148 #endif
149 
Container for base types.
Definition: ValueContainers.h:60
This class has no summary.
Definition: TestObject.h:50
Safir::Dob::Typesystem::ObjectContainerImpl< TestObject > TestObjectContainer
Definition: TestObject.h:43
Safir::Dob::Typesystem::ArrayContainer< TestObjectContainer > TestObjectContainerArray
Definition: TestObject.h:44
boost::shared_ptr< const TestObject > TestObjectConstPtr
Definition: TestObject.h:41
boost::shared_ptr< TestObject > TestObjectPtr
Definition: TestObject.h:39
DotsC_Float64 Float64
64 bit floating point type.
Definition: Dob/Typesystem/Defs.h:78
Definition: ContainerProxies.h:38
DotsC_Int64 Int64
64 bit integer type.
Definition: Dob/Typesystem/Defs.h:72
DotsC_TypeId TypeId
A unique type identifier.
Definition: Dob/Typesystem/Defs.h:221
DotsC_Float32 Float32
32 bit floating point type.
Definition: Dob/Typesystem/Defs.h:75
Template class for all containers of automatically generated DOB objects.
Definition: ObjectContainer.h:185
Container for strings (std::wstring).
Definition: ValueContainers.h:128
boost::shared_ptr< Object > ObjectPtr
A smart pointer to an Object.
Definition: Object.h:41
DotsC_ArrayIndex ArrayIndex
Index into an array.
Definition: Dob/Typesystem/Defs.h:249
virtual Safir::Dob::Typesystem::TypeId GetTypeId() const
Get the type id of this object.
Definition: TestObject.h:106
Base class for all Containers.
Definition: ContainerBase.h:41
The baseclass for all entities.
Definition: Entity.h:48
STL container for arrays of DOB-containers.
Definition: ArrayContainer.h:58
DotsC_Int32 Int32
32 bit integer type.
Definition: Dob/Typesystem/Defs.h:69
DotsC_MemberIndex MemberIndex
The index of a member in an object.
Definition: Dob/Typesystem/Defs.h:240
static bool IsChanged(const ContainerBase &container)
Check if a container is changed.
Definition: ContainerBase.h:134