NDS3  1.0.0
API reference manual
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
node.h
Go to the documentation of this file.
1 /*
2  * Nominal Device Support v3 (NDS3)
3  *
4  * Copyright (c) 2015 Cosylab d.d.
5  *
6  * For more information about the license please refer to the license.txt
7  * file included in the distribution.
8  */
9 
10 #ifndef NDSNODE_H
11 #define NDSNODE_H
12 
24 #include "nds3/definitions.h"
25 #include "nds3/base.h"
26 
27 namespace nds
28 {
29 
30 class NodeImpl;
31 class PVBase;
32 class StateMachine;
33 
38 class NDS3_API Node: public Base
39 {
40 
41 public:
42 #ifndef SWIG
43  Node(std::shared_ptr<NodeImpl> portImpl);
44 #endif
45 
46  Node();
47 
56  Node(const std::string& name, const nodeType_t nodeType = nodeType_t::generic);
57 
65  template<class T>
66  T addChild(T child)
67  {
68  addChildInternal(child);
69  return child;
70  }
71 
79  void initialize(void* pDeviceObject, Factory& factory);
80 
81  Node addNode(Node& node); // Specialized for SWIG
82 
83  PVBase addPV(PVBase& pvBase); // Specialized for SWIG
84 
85  StateMachine addStateMachine(StateMachine& stateMachine); // Specialized for SWIG
86 
87 protected:
88 #ifndef SWIG
89  void addChildInternal(Base& child);
90 #endif
91 
92 };
93 
94 }
95 #endif // NDSNODE_H
A node object that can contain other nodes or PVs as children.
Definition: node.h:38
nodeType_t
Defines the nodes' roles in the tree structure: it is used to build the node's external name when usi...
Definition: definitions.h:103
This is the base class for all the NDS3 public classes that declare a device part (node...
Definition: base.h:45
Represents a state machine to be attached to a node.
Definition: stateMachine.h:57
The node's role is not specified.
Defines all the enumeration and common types used across the NDS library.
The node implements a state machine.
T addChild(T child)
Add a child node or record to this node. This node will take ownership of the added one and will take...
Definition: node.h:66
Defines the base class used for nodes, PVs, state machines and acquisition devices.
Communicates with a static instance of the control system.
Definition: factory.h:43
Base class for objects that process a single PV (or attribute in Tango parlance). ...
Definition: pvBase.h:42