Safir SDK Core
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
NodeParameters.h
Go to the documentation of this file.
1 #ifndef SAFIR_DOB_NODEPARAMETERS_H_INCLUDED
2 #define SAFIR_DOB_NODEPARAMETERS_H_INCLUDED
3 
8 
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 NodeParameters; //forward declaration
41  typedef boost::shared_ptr<NodeParameters> NodeParametersPtr;
42  typedef boost::shared_ptr<const NodeParameters> NodeParametersConstPtr;
43 
46 
51  class GENERATED_API NodeParameters : public Safir::Dob::Parametrization
52  {
53  public:
54  //Constructors and Create routines
56  virtual Safir::Dob::Typesystem::ObjectPtr Clone() const;
57  static NodeParametersPtr Create();
58 
59  //SystemId
63  static Safir::Dob::Typesystem::InstanceId SystemId();
64 
65  //TypesystemSharedMemorySize
69  static Safir::Dob::Typesystem::Int32 TypesystemSharedMemorySize();
70 
71  //SharedMemorySize
75  static Safir::Dob::Typesystem::Int32 SharedMemorySize();
76 
77  //NetworkAddress
81  static std::wstring NetworkAddress();
82 
83  //RoutingHops
87  static Safir::Dob::Typesystem::Int32 RoutingHops();
88 
89  //ThreadingWarningsEnabled
93  static bool ThreadingWarningsEnabled();
94 
95  //TerminateDoseMainWhenUnrecoverableError
99  static bool TerminateDoseMainWhenUnrecoverableError();
100 
101  //DoseMainThreadWatchdogTimeout
105  static Safir::Dob::Typesystem::Int32 DoseMainThreadWatchdogTimeout();
106 
107  //NumberOfContexts
111  static Safir::Dob::Typesystem::Int32 NumberOfContexts();
112 
113  //LocalContexts
114  static Safir::Dob::Typesystem::ArrayIndex LocalContextsArraySize();
118  static bool LocalContexts(const Safir::Dob::Typesystem::ArrayIndex index);
119 
120  //NumberOfNodes
124  static Safir::Dob::Typesystem::Int32 NumberOfNodes();
125 
126  //Nodes
127  static Safir::Dob::Typesystem::ArrayIndex NodesArraySize();
132 
134  static const Safir::Dob::Typesystem::TypeId ClassTypeId = -4532363161627336967LL;
135 
136  //Type id for NodeParameters
137  virtual Safir::Dob::Typesystem::TypeId GetTypeId() const {return ClassTypeId;}
138 
139  //Check if anything in the object has change flags set
140  virtual bool IsChanged();
141 
142  //Recursively set all change flags in the object
143  virtual void SetChanged(const bool changed);
144 
145 
146  //Reflection part (Don't use unless you really know what you're doing!!)
149  virtual const Safir::Dob::Typesystem::ContainerBase & GetMember(const Safir::Dob::Typesystem::MemberIndex member,
150  const Safir::Dob::Typesystem::ArrayIndex index) const;
151 
152  virtual Safir::Dob::Typesystem::Int32 CalculateBlobSize() const;
153  virtual void WriteToBlob(char * blob, char * & beginningOfUnused) const;
154  explicit NodeParameters(char const * const blob);
155 
156  private:
157 
158 #ifdef _MSC_VER
159 #pragma warning (push)
160 #pragma warning (disable : 4251)
161 #endif
162 
163 
164 #ifdef _MSC_VER
165 #pragma warning (pop)
166 #endif
167  };
168 
169 } // Dob
170 } // Safir
171 
172 #endif
173 
Safir::Dob::Typesystem::ObjectContainerImpl< NodeParameters > NodeParametersContainer
Definition: NodeParameters.h:44
Contains paramaters for all nodes in the system.
Definition: NodeParameters.h:51
boost::shared_ptr< NodeDefinition > NodeDefinitionPtr
Definition: NodeDefinition.h:39
boost::shared_ptr< const NodeParameters > NodeParametersConstPtr
Definition: NodeParameters.h:42
Class containing the identity of an instance.
Definition: InstanceId.h:48
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
Safir::Dob::Typesystem::ArrayContainer< NodeParametersContainer > NodeParametersContainerArray
Definition: NodeParameters.h:45
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
This class is intended to be used as baseclass for classes that only contains parameters.
Definition: Parametrization.h:48
boost::shared_ptr< NodeParameters > NodeParametersPtr
Definition: NodeParameters.h:40
Base class for all Containers.
Definition: ContainerBase.h:41
virtual Safir::Dob::Typesystem::TypeId GetTypeId() const
Get the type id of this object.
Definition: NodeParameters.h:137
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