C++ main module for gpm Package  1.0
GPM_ModelParentNode.h
Go to the documentation of this file.
1 #ifndef GPM_ModelParentNode_H
2 #define GPM_ModelParentNode_H
3 
4 
5 #include "GPM_Object.h"
6 
9 
21 
22  SP_OBJECT(GPM_ModelParentNode);
23 
24 public:
25 
26 
27 
28 private:
29  // ATTRIBUTES
30  tString mName;
31  int mIndex;
32  tBoolean mIsBuild;
33 
34  //ASSOCIATION
35  SV::GPM_ModelChildNode mChildren;
36 
37 protected:
38  // METHODS
39 
40  // CONSTRUCTORS
41 
44  GPM_ModelParentNode(void);
45 
46 
47 
48  // DESTRUCTORS
49 
50 
53  virtual ~GPM_ModelParentNode(void);
54 
55 
56 
57 public:
58 
59  // SET Methods
60  // ===========
61 
64  inline void setName(const tString& name) {
65  mName=name;
66  }
69  inline void setIndex(const int& i) {
70  mIndex=i;
71  }
74  inline void setIsBuild(const tBoolean& v) {
75  mIsBuild=v;
76  }
79  void addToChildren(SP::GPM_ModelChildNode child);
80 
83  void removeFromChildren(SP::GPM_ModelChildNode child);
86  void clear();
87 
88  // GET Methods
89  // =============
90 
93  inline tString getName() const {
94  return mName;
95  }
98  inline int getIndex() const {
99  return mIndex;
100  }
103  inline tBoolean isBuild() const {
104  return mIsBuild;
105  }
108  inline int getChildrenNumber() const {
109  return mChildren.getSize();
110  }
111 
114  virtual void getLeaves(SV::GPM_ModelChildNode& nodes);
115 };
116 
117 #endif
DEFINE_SPTR(GPM_ModelChildNode)
void addToChildren(SP::GPM_ModelChildNode child)
add to children
Definition: GPM_ModelParentNode.cpp:14
This class describes a model parent node for tree.
Definition: GPM_ModelParentNode.h:20
void setName(const tString &name)
set name
Definition: GPM_ModelParentNode.h:64
#define tBoolean
Definition: types.h:35
virtual void getLeaves(SV::GPM_ModelChildNode &nodes)
get the leaves
Definition: GPM_ModelParentNode.cpp:49
virtual ~GPM_ModelParentNode(void)
destroy
Definition: GPM_ModelParentNode.cpp:11
tBoolean isBuild() const
return true if the node is build
Definition: GPM_ModelParentNode.h:103
GPM_ModelParentNode(void)
create
Definition: GPM_ModelParentNode.cpp:6
int getIndex() const
get the index
Definition: GPM_ModelParentNode.h:98
tString getName() const
set name
Definition: GPM_ModelParentNode.h:93
This class describes a model parent node for tree.
Definition: GPM_ModelChildNode.h:18
int getChildrenNumber() const
get the children number
Definition: GPM_ModelParentNode.h:108
#define tString
Definition: types.h:36
void removeFromChildren(SP::GPM_ModelChildNode child)
remove the child
Definition: GPM_ModelParentNode.cpp:32
void setIsBuild(const tBoolean &v)
set if the node is build
Definition: GPM_ModelParentNode.h:74
DEFINE_SVPTR(GPM_ModelChildNode)
void clear()
clear
Definition: GPM_ModelParentNode.cpp:45
void setIndex(const int &i)
set the index
Definition: GPM_ModelParentNode.h:69
This class is the base class of all graph classes.
Definition: GPM_Object.h:17