C++ mpi module for stochmagnet_main Package
RNDB_ClassFactory.h
1 #ifndef RNDB_ClassFactory_H
2 #define RNDB_ClassFactory_H
3 
4 //include the base class of the package
5 #include "RAND_ClassFactory.h"
6 
7 
13 class RNDB_ClassFactory : public RAND_ClassFactory { // class
14 
15 
16  // ASSOCIATION
17 
18 
19 
20  // ATTRIBUTES
21 
22 private:
23 
24 
25  // ASSOCIATIONS
26 
27 
28 
29  // METHODS
30 
31 
32 public:
33  // CONSTRUCTORS
37 
38 
39 
40 
41  // DESTRUCTORS
45  virtual ~RNDB_ClassFactory(void);
46 
47 
48 
49 
50 
51 public:
52 
53 
54  //MEMORY
55 
69  virtual tMemSize getMemorySize() const {
70  return sizeof(*this)+getContentsMemorySize();
71  }
72 
73 
74  // SET
75 
76 
77 
78 
79 
80 public:
81 
82  //New class Factory
86  inline static CORE_UniquePointer<RNDB_ClassFactory> New() {
87  return CORE_UniquePointer<RNDB_ClassFactory>(new RNDB_ClassFactory(),RNDB_ClassFactory::Delete());
88  }
89 
90  // OTHERS
91 
92 
99  virtual CORE_UniquePointer<CORE_Object> NewInstance(const tString& name,
100  const CORE_OptionsList& arguments) const override;
101 
102 
103 
104 
105 
106 
107 
108 
109 
110 };
111 
112 #endif
virtual tMemSize getContentsMemorySize() const override
return the memory size in byte
Definition: CORE_ClassFactory.h:84
class Free introduced for deleting a smart pointer
Definition: CORE_Object.h:113
This class is an list of options.
Definition: CORE_OptionsList.h:36
this class describes a class factory to generate classes of the package
Definition: RAND_ClassFactory.h:13
this class describes a class factory to generate classes of the package
Definition: RNDB_ClassFactory.h:13
static CORE_UniquePointer< RNDB_ClassFactory > New()
build a new instance of default class factory
Definition: RNDB_ClassFactory.h:86
virtual tMemSize getMemorySize() const
return the memory size of the class and the memory size of all its attributes/associations
Definition: RNDB_ClassFactory.h:69
RNDB_ClassFactory()
build a RNDB_ClassFactory
Definition: RNDB_ClassFactory.cpp:14
virtual ~RNDB_ClassFactory(void)
destroy a RNDB_ClassFactory
Definition: RNDB_ClassFactory.cpp:18
virtual CORE_UniquePointer< CORE_Object > NewInstance(const tString &name, const CORE_OptionsList &arguments) const override
create an unique instance of a class
Definition: RNDB_ClassFactory.cpp:22