Safir SDK Core
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Struct.h
Go to the documentation of this file.
1 #ifndef SAFIR_DOB_STRUCT_H_INCLUDED
2 #define SAFIR_DOB_STRUCT_H_INCLUDED
3 
8 
9 
10 #include <Safir/Utilities/Internal/VisibilityHelpers.h>
11 
12 #ifdef dots_generated_Safir_cpp_EXPORTS
13 # define DOTS_GENERATED_Safir_API SAFIR_HELPER_DLL_EXPORT
14 #else
15 # define DOTS_GENERATED_Safir_API SAFIR_HELPER_DLL_IMPORT
16 # define SAFIR_LIBRARY_NAME "dots_generated-Safir-cpp"
17 # include <Safir/Utilities/Internal/AutoLink.h>
18 #endif
19 #define DOTS_GENERATED_Safir_API_LOCAL SAFIR_HELPER_DLL_LOCAL
20 
24 namespace Safir
25 {
29 namespace Dob
30 {
31 
32  class Struct; //forward declaration
33  typedef boost::shared_ptr<Struct> StructPtr;
34  typedef boost::shared_ptr<const Struct> StructConstPtr;
35 
38 
44  {
45  public:
46  //Constructors and Create routines
47  Struct();
48  virtual Safir::Dob::Typesystem::ObjectPtr Clone() const;
49  static StructPtr Create();
50 
52  static const Safir::Dob::Typesystem::TypeId ClassTypeId = -6502158762730083309LL;
53 
54  //Type id for Struct
55  virtual Safir::Dob::Typesystem::TypeId GetTypeId() const {return ClassTypeId;}
56 
57  //Check if anything in the object has change flags set
58  virtual bool IsChanged();
59 
60  //Recursively set all change flags in the object
61  virtual void SetChanged(const bool changed);
62 
63 
64  //Reflection part (Don't use unless you really know what you're doing!!)
68  const Safir::Dob::Typesystem::ArrayIndex index) const;
69 
70  virtual Safir::Dob::Typesystem::Int32 CalculateBlobSize() const;
71  virtual void WriteToBlob(char * blob, char * & beginningOfUnused) const;
72  explicit Struct(char const * const blob);
73 
74  private:
75 
76 #ifdef _MSC_VER
77 #pragma warning (push)
78 #pragma warning (disable : 4251)
79 #endif
80 
81 
82 #ifdef _MSC_VER
83 #pragma warning (pop)
84 #endif
85  };
86 
87 } // Dob
88 } // Safir
89 
90 #endif
91 
The base class for all DOB objects.
Definition: Object.h:54
#define DOTS_GENERATED_Safir_API
Definition: Struct.h:15
virtual Safir::Dob::Typesystem::TypeId GetTypeId() const
Get the type id of this object.
Definition: Struct.h:55
boost::shared_ptr< const Struct > StructConstPtr
Definition: Struct.h:34
DotsC_TypeId TypeId
A unique type identifier.
Definition: Defs.h:219
Template class for all containers of automatically generated DOB objects.
Definition: ObjectContainer.h:185
boost::shared_ptr< Object > ObjectPtr
A smart pointer to an Object.
Definition: Object.h:41
DotsC_ArrayIndex ArrayIndex
Index into an array.
Definition: Defs.h:247
Base class for all Containers.
Definition: ContainerBase.h:41
Safir::Dob::Typesystem::ObjectContainerImpl< Struct > StructContainer
Definition: Struct.h:36
Safir::Dob::Typesystem::ArrayContainer< StructContainer > StructContainerArray
Definition: Struct.h:37
boost::shared_ptr< Struct > StructPtr
Definition: Struct.h:32
This class is intended to be used as baseclass for classes that in the future may be realized as low ...
Definition: Struct.h:43
STL container for arrays of DOB-containers.
Definition: ArrayContainer.h:58
DotsC_Int32 Int32
32 bit integer type.
Definition: Defs.h:67
DotsC_MemberIndex MemberIndex
The index of a member in an object.
Definition: Defs.h:238
static bool IsChanged(const ContainerBase &container)
Check if a container is changed.
Definition: ContainerBase.h:134