Safir SDK Core
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Service.h
Go to the documentation of this file.
1 #ifndef SAFIR_DOB_SERVICE_H_INCLUDED
2 #define SAFIR_DOB_SERVICE_H_INCLUDED
3 
8 
9 
10 #ifdef _MSC_VER
11 #ifdef DOTS_GENERATED_CPP_EXPORTS
12 #define GENERATED_API __declspec(dllexport)
13 #else
14 #define GENERATED_API __declspec(dllimport)
15 #ifdef _DEBUG
16 #pragma comment( lib, "dots_generated-Safir-cppd.lib" )
17 #else
18 #pragma comment( lib, "dots_generated-Safir-cpp.lib" )
19 #endif
20 #endif
21 #endif
22 #ifdef __GNUC__
23 #define GENERATED_API
24 #endif
25 
29 namespace Safir
30 {
34 namespace Dob
35 {
36 
37  class Service; //forward declaration
38  typedef boost::shared_ptr<Service> ServicePtr;
39  typedef boost::shared_ptr<const Service> ServiceConstPtr;
40 
43 
48  class GENERATED_API Service : public Safir::Dob::Typesystem::Object
49  {
50  public:
51  //Constructors and Create routines
52  Service();
53  virtual Safir::Dob::Typesystem::ObjectPtr Clone() const;
54  static ServicePtr Create();
55 
57  static const Safir::Dob::Typesystem::TypeId ClassTypeId = -5315939293064264373LL;
58 
59  //Type id for Service
60  virtual Safir::Dob::Typesystem::TypeId GetTypeId() const {return ClassTypeId;}
61 
62  //Check if anything in the object has change flags set
63  virtual bool IsChanged();
64 
65  //Recursively set all change flags in the object
66  virtual void SetChanged(const bool changed);
67 
68 
69  //Reflection part (Don't use unless you really know what you're doing!!)
73  const Safir::Dob::Typesystem::ArrayIndex index) const;
74 
75  virtual Safir::Dob::Typesystem::Int32 CalculateBlobSize() const;
76  virtual void WriteToBlob(char * blob, char * & beginningOfUnused) const;
77  explicit Service(char const * const blob);
78 
79  private:
80 
81 #ifdef _MSC_VER
82 #pragma warning (push)
83 #pragma warning (disable : 4251)
84 #endif
85 
86 
87 #ifdef _MSC_VER
88 #pragma warning (pop)
89 #endif
90  };
91 
92 } // Dob
93 } // Safir
94 
95 #endif
96 
The base class for all DOB objects.
Definition: Object.h:54
boost::shared_ptr< const Service > ServiceConstPtr
Definition: Service.h:39
Safir::Dob::Typesystem::ArrayContainer< ServiceContainer > ServiceContainerArray
Definition: Service.h:42
DotsC_TypeId TypeId
A unique type identifier.
Definition: Dob/Typesystem/Defs.h:221
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: Dob/Typesystem/Defs.h:249
The baseclass for all services.
Definition: Service.h:48
boost::shared_ptr< Service > ServicePtr
Definition: Service.h:37
virtual Safir::Dob::Typesystem::TypeId GetTypeId() const
Get the type id of this object.
Definition: Service.h:60
Base class for all Containers.
Definition: ContainerBase.h:41
Safir::Dob::Typesystem::ObjectContainerImpl< Service > ServiceContainer
Definition: Service.h:41
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