C++ mpi module for stochmagnet_main Package
EXPR_GroupNode.h
1 #ifndef EXPR_GroupNode_H
2 #define EXPR_GroupNode_H
3 
4 #include "EXPR_InheritedNode.h"
5 
14 
15 private:
16 
17 
18 
19 
20 private:
21  //associations
22 
23 
24 
25 protected:
26  //builders
27 
31  }
32 
33  //deleters
36  virtual ~EXPR_GroupNode() {
37  }
38 
39 public:
40  //methods
41 
42 protected:
43 
44 
45 public:
49  static inline CORE_UniquePointer<EXPR_GroupNode> New() {
50  CORE_UniquePointer<EXPR_GroupNode> p(new EXPR_GroupNode(),
52  return p;
53  }
57  static inline CORE_SharedPointer<EXPR_GroupNode> NewSharedInstance() {
58  CORE_SharedPointer<EXPR_GroupNode> p(new EXPR_GroupNode(),
60  return p;
61  }
62 
63  //methods
64 
65  //MEMORY
66  //======
74  virtual tMemSize getMemorySize() const override {
75  return sizeof(*this)+getContentsMemorySize();
76  }
77 
86  virtual tMemSize getContentsMemorySize() const override {
88  return mem;
89  }
90 
91 
92 
96  virtual tString toString() const override {
97  std::stringstream sout;
98  sout<<"(";
99  const auto& children=getChildren();
100  for(const auto& child:children) sout<<child->toString()<<" ";
101  sout.seekp(-1, std::ios_base::end);
102  sout<<")";
103  return sout.str();
104  }
105 
106 
107 };
108 
109 
110 
111 
112 #endif
113 
114 
class Free introduced for deleting a smart pointer
Definition: CORE_Object.h:113
This class describes a unary node between ( )
Definition: EXPR_GroupNode.h:13
virtual ~EXPR_GroupNode()
delete the class
Definition: EXPR_GroupNode.h:36
virtual tMemSize getContentsMemorySize() const override
return nthe memory size of the included associations
Definition: EXPR_GroupNode.h:86
virtual tMemSize getMemorySize() const override
return the memory size of the class
Definition: EXPR_GroupNode.h:74
static CORE_UniquePointer< EXPR_GroupNode > New()
crete the new instance of this
Definition: EXPR_GroupNode.h:49
static CORE_SharedPointer< EXPR_GroupNode > NewSharedInstance()
crete the new instance of this
Definition: EXPR_GroupNode.h:57
virtual tString toString() const override
return the string representation of this
Definition: EXPR_GroupNode.h:96
EXPR_GroupNode()
create the class
Definition: EXPR_GroupNode.h:30
This class describes a child & parent node.
Definition: EXPR_InheritedNode.h:15
virtual tMemSize getContentsMemorySize() const override
return nthe memory size of the included associations
Definition: EXPR_InheritedNode.h:64
const std::vector< CORE_SharedPointer< EXPR_ChildNode > > & getChildren() const
get the children
Definition: EXPR_ParentNode.h:94