C++ mpi module for stochmagnet_main Package
SMOMPI_ClassFactory.h
1 #ifndef SMOMPI_ClassFactory_H
2 #define SMOMPI_ClassFactory_H
3 
4 //include the base class of the package
5 #include "CORE_ClassFactory.h"
6 
7 
13 class SMOMPI_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
37 
38 
39 
40 
41  // DESTRUCTORS
45  virtual ~SMOMPI_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<SMOMPI_ClassFactory> New() {
87  return CORE_UniquePointer<SMOMPI_ClassFactory>(new SMOMPI_ClassFactory(),
89  }
90 
91  // OTHERS
92 
93 
100  virtual CORE_UniquePointer<CORE_Object> NewInstance(const tString& name,
101  const CORE_OptionsList& arguments) const override;
102 
103 
104 
105 
106 
107 
108 
109 
110 
111 };
112 
113 #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: SMOMPI_ClassFactory.h:13
static CORE_UniquePointer< SMOMPI_ClassFactory > New()
build a new instance of default class factory
Definition: SMOMPI_ClassFactory.h:86
SMOMPI_ClassFactory()
build a SMOMPI_ClassFactory
virtual CORE_UniquePointer< CORE_Object > NewInstance(const tString &name, const CORE_OptionsList &arguments) const override
create an unique instance of a class
virtual tMemSize getMemorySize() const
return the memory size of the class and the memory size of all its attributes/associations
Definition: SMOMPI_ClassFactory.h:69
virtual ~SMOMPI_ClassFactory(void)
destroy a SMOMPI_ClassFactory