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 #include <Safir/Utilities/Internal/VisibilityHelpers.h>
14 
15 #ifdef dots_generated_Safir_cpp_EXPORTS
16 # define DOTS_GENERATED_Safir_API SAFIR_HELPER_DLL_EXPORT
17 #else
18 # define DOTS_GENERATED_Safir_API SAFIR_HELPER_DLL_IMPORT
19 # define SAFIR_LIBRARY_NAME "dots_generated-Safir-cpp"
20 # include <Safir/Utilities/Internal/AutoLink.h>
21 #endif
22 #define DOTS_GENERATED_Safir_API_LOCAL SAFIR_HELPER_DLL_LOCAL
23 
27 namespace Safir
28 {
32 namespace Dob
33 {
34 
35  class NodeInfo; //forward declaration
36  typedef boost::shared_ptr<NodeInfo> NodeInfoPtr;
37  typedef boost::shared_ptr<const NodeInfo> NodeInfoConstPtr;
38 
41 
47  {
48  public:
49  //Constructors and Create routines
50  NodeInfo();
51  virtual Safir::Dob::Typesystem::ObjectPtr Clone() const;
52  static NodeInfoPtr Create();
53 
54  //NodeName
55  static Safir::Dob::Typesystem::MemberIndex NodeNameMemberIndex();
56  static Safir::Dob::Typesystem::Int32 NodeNameMaxStringLength();
62 
63 
64  //Status
65  static Safir::Dob::Typesystem::MemberIndex StatusMemberIndex();
71 
72 
73  //IpAddress
74  static Safir::Dob::Typesystem::MemberIndex IpAddressMemberIndex();
75  static Safir::Dob::Typesystem::Int32 IpAddressMaxStringLength();
81 
82 
84  static const Safir::Dob::Typesystem::TypeId ClassTypeId = -7384790295819199437LL;
85 
86  //Type id for NodeInfo
87  virtual Safir::Dob::Typesystem::TypeId GetTypeId() const {return ClassTypeId;}
88 
89  //Check if anything in the object has change flags set
90  virtual bool IsChanged();
91 
92  //Recursively set all change flags in the object
93  virtual void SetChanged(const bool changed);
94 
95 
96  //Reflection part (Don't use unless you really know what you're doing!!)
100  const Safir::Dob::Typesystem::ArrayIndex index) const;
101 
102  virtual Safir::Dob::Typesystem::Int32 CalculateBlobSize() const;
103  virtual void WriteToBlob(char * blob, char * & beginningOfUnused) const;
104  explicit NodeInfo(char const * const blob);
105 
106  private:
107 
108 #ifdef _MSC_VER
109 #pragma warning (push)
110 #pragma warning (disable : 4251)
111 #endif
112 
115  Safir::Dob::Typesystem::StringContainer m_IpAddressMember;
116 
117 #ifdef _MSC_VER
118 #pragma warning (pop)
119 #endif
120  };
121 
122 } // Dob
123 } // Safir
124 
125 #endif
126 
Safir::Dob::Typesystem::ObjectContainerImpl< NodeInfo > NodeInfoContainer
Definition: NodeInfo.h:39
#define DOTS_GENERATED_Safir_API
Definition: NodeInfo.h:18
Definition: ContainerProxies.h:38
DotsC_TypeId TypeId
A unique type identifier.
Definition: Defs.h:219
boost::shared_ptr< NodeInfo > NodeInfoPtr
Definition: NodeInfo.h:35
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:87
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:46
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
boost::shared_ptr< const NodeInfo > NodeInfoConstPtr
Definition: NodeInfo.h:37
Base class for all Containers.
Definition: ContainerBase.h:41
Safir::Dob::Typesystem::ArrayContainer< NodeInfoContainer > NodeInfoContainerArray
Definition: NodeInfo.h:40
The baseclass for all entities.
Definition: Entity.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