Safir SDK Core
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
NodeInfo.h
Go to the documentation of this file.
1 #ifndef SAFIR_DOB_NODEINFO_H_INCLUDED
2 #define SAFIR_DOB_NODEINFO_H_INCLUDED
3 
8 
9 #include <Safir/Dob/Entity.h>
10 #include <Safir/Dob/NodeStatus.h>
12 
13 #ifdef _MSC_VER
14 #ifdef DOTS_GENERATED_CPP_EXPORTS
15 #define GENERATED_API __declspec(dllexport)
16 #else
17 #define GENERATED_API __declspec(dllimport)
18 #ifdef _DEBUG
19 #pragma comment( lib, "dots_generated-Safir-cppd.lib" )
20 #else
21 #pragma comment( lib, "dots_generated-Safir-cpp.lib" )
22 #endif
23 #endif
24 #endif
25 #ifdef __GNUC__
26 #define GENERATED_API
27 #endif
28 
32 namespace Safir
33 {
37 namespace Dob
38 {
39 
40  class NodeInfo; //forward declaration
41  typedef boost::shared_ptr<NodeInfo> NodeInfoPtr;
42  typedef boost::shared_ptr<const NodeInfo> NodeInfoConstPtr;
43 
46 
51  class GENERATED_API NodeInfo : public Safir::Dob::Entity
52  {
53  public:
54  //Constructors and Create routines
55  NodeInfo();
56  virtual Safir::Dob::Typesystem::ObjectPtr Clone() const;
57  static NodeInfoPtr Create();
58 
59  //NodeName
60  static Safir::Dob::Typesystem::MemberIndex NodeNameMemberIndex();
61  static Safir::Dob::Typesystem::Int32 NodeNameMaxStringLength();
67 
68 
69  //Status
70  static Safir::Dob::Typesystem::MemberIndex StatusMemberIndex();
76 
77 
78  //IpAddress
79  static Safir::Dob::Typesystem::MemberIndex IpAddressMemberIndex();
80  static Safir::Dob::Typesystem::Int32 IpAddressMaxStringLength();
86 
87 
89  static const Safir::Dob::Typesystem::TypeId ClassTypeId = -7384790295819199437LL;
90 
91  //Type id for NodeInfo
92  virtual Safir::Dob::Typesystem::TypeId GetTypeId() const {return ClassTypeId;}
93 
94  //Check if anything in the object has change flags set
95  virtual bool IsChanged();
96 
97  //Recursively set all change flags in the object
98  virtual void SetChanged(const bool changed);
99 
100 
101  //Reflection part (Don't use unless you really know what you're doing!!)
104  virtual const Safir::Dob::Typesystem::ContainerBase & GetMember(const Safir::Dob::Typesystem::MemberIndex member,
105  const Safir::Dob::Typesystem::ArrayIndex index) const;
106 
107  virtual Safir::Dob::Typesystem::Int32 CalculateBlobSize() const;
108  virtual void WriteToBlob(char * blob, char * & beginningOfUnused) const;
109  explicit NodeInfo(char const * const blob);
110 
111  private:
112 
113 #ifdef _MSC_VER
114 #pragma warning (push)
115 #pragma warning (disable : 4251)
116 #endif
117 
120  Safir::Dob::Typesystem::StringContainer m_IpAddressMember;
121 
122 #ifdef _MSC_VER
123 #pragma warning (pop)
124 #endif
125  };
126 
127 } // Dob
128 } // Safir
129 
130 #endif
131 
Safir::Dob::Typesystem::ObjectContainerImpl< NodeInfo > NodeInfoContainer
Definition: NodeInfo.h:44
Definition: ContainerProxies.h:38
DotsC_TypeId TypeId
A unique type identifier.
Definition: Dob/Typesystem/Defs.h:221
boost::shared_ptr< NodeInfo > NodeInfoPtr
Definition: NodeInfo.h:40
Template class for all containers of automatically generated DOB objects.
Definition: ObjectContainer.h:185
virtual Safir::Dob::Typesystem::TypeId GetTypeId() const
Get the type id of this object.
Definition: NodeInfo.h:92
Container for strings (std::wstring).
Definition: ValueContainers.h:128
Contains the name, status, and Ip address for all nodes in the system.
Definition: NodeInfo.h:51
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
boost::shared_ptr< const NodeInfo > NodeInfoConstPtr
Definition: NodeInfo.h:42
Base class for all Containers.
Definition: ContainerBase.h:41
Safir::Dob::Typesystem::ArrayContainer< NodeInfoContainer > NodeInfoContainerArray
Definition: NodeInfo.h:45
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