C++ mpi module for stochmagnet_main Package
SM_ClassFactory.h
1 #ifndef SM_ClassFactory_H
2 #define SM_ClassFactory_H
3 
4 //include the base class of the package
5 #include "CORE_ClassFactory.h"
6 
7 
13 class SM_ClassFactory : public CORE_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
36  SM_ClassFactory();
37 
38 
39 
40 
41  // DESTRUCTORS
45  virtual ~SM_ClassFactory(void);
46 
47 
48 
49 
50 
51 public:
52 
53 
54  //MEMORY
55 
69  virtual tMemSize getMemorySize() const override {
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<SM_ClassFactory> New() {
87  return CORE_UniquePointer<SM_ClassFactory>(new SM_ClassFactory(),SM_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
this class describes a class factory to generate classes
Definition: CORE_ClassFactory.h:24
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: SM_ClassFactory.h:13
virtual CORE_UniquePointer< CORE_Object > NewInstance(const tString &name, const CORE_OptionsList &arguments) const override
create an unique instance of a class
Definition: SM_ClassFactory.cpp:16
virtual ~SM_ClassFactory(void)
destroy a SM_ClassFactory
Definition: SM_ClassFactory.cpp:12
SM_ClassFactory()
build a SM_ClassFactory
Definition: SM_ClassFactory.cpp:8
static CORE_UniquePointer< SM_ClassFactory > New()
build a new instance of default class factory
Definition: SM_ClassFactory.h:86
virtual tMemSize getMemorySize() const override
return the memory size of the class and the memory size of all its attributes/associations
Definition: SM_ClassFactory.h:69