Safir SDK Core
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Message.h
Go to the documentation of this file.
1 #ifndef SAFIR_DOB_MESSAGE_H_INCLUDED
2 #define SAFIR_DOB_MESSAGE_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 Message; //forward declaration
33  typedef boost::shared_ptr<Message> MessagePtr;
34  typedef boost::shared_ptr<const Message> MessageConstPtr;
35 
38 
44  {
45  public:
46  //Constructors and Create routines
47  Message();
48  virtual Safir::Dob::Typesystem::ObjectPtr Clone() const;
49  static MessagePtr Create();
50 
52  static const Safir::Dob::Typesystem::TypeId ClassTypeId = -7321740247856001552LL;
53 
54  //Type id for Message
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 Message(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
The baseclass for all messages.
Definition: Message.h:43
boost::shared_ptr< Message > MessagePtr
Definition: Message.h:32
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
Safir::Dob::Typesystem::ArrayContainer< MessageContainer > MessageContainerArray
Definition: Message.h:37
virtual Safir::Dob::Typesystem::TypeId GetTypeId() const
Get the type id of this object.
Definition: Message.h:55
Base class for all Containers.
Definition: ContainerBase.h:41
boost::shared_ptr< const Message > MessageConstPtr
Definition: Message.h:34
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
#define DOTS_GENERATED_Safir_API
Definition: Message.h:15
Safir::Dob::Typesystem::ObjectContainerImpl< Message > MessageContainer
Definition: Message.h:36