C++ mpi module for stochmagnet_main Package
OMP_ClassFactory.h
1 #ifndef OMP_ClassFactory_H
2 #define OMP_ClassFactory_H
3 
4 
5 #include "CORE_ClassFactory.h"
6 
7 //header of std::function
8 #include<functional>
9 
15 class OMP_ClassFactory : public CORE_ClassFactory{ // class
16 
17 
18  // ASSOCIATION
19 
20 
21 
22  // ATTRIBUTES
23 
24 private:
25 
26 
27  // ASSOCIATIONS
28 
29 
30  // METHODS
31 
32 
33 protected:
34  // CONSTRUCTORS
38 
39 
40 
41 
42  // DESTRUCTORS
46  virtual ~OMP_ClassFactory(void) ;
47 
48 
49 
50 
51 
52 public:
53  // NEW
57  inline static CORE_UniquePointer<OMP_ClassFactory> New() {
58  CORE_UniquePointer<OMP_ClassFactory> p(new OMP_ClassFactory(),
60  return p;
61  }
62 
70  virtual tMemSize getMemorySize() const override {
71  return sizeof(*this)+getContentsMemorySize();
72  }
73  // SET
74 
75 
76 
77 
78  // GET
79 
80 
81  // OTHERS
82 
83 
90  virtual CORE_UniquePointer<CORE_Object> NewInstance(const tString& name,
91  const CORE_OptionsList& arguments) const override;
92 
93 
94 
98  static void InitSeeds();
99 
103  static void InitSeeds(const tULLInt& seed);
108  static void InitSeeds(const tULLInt& alpha,const tULLInt& beta);
109 
113  static void InitSeeds(std::function<tULLInt(tInteger)> F);
114 
115 };
116 
117 #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 for the math/fftw Package
Definition: OMP_ClassFactory.h:15
static CORE_UniquePointer< OMP_ClassFactory > New()
create a unque pointer to the class factory
Definition: OMP_ClassFactory.h:57
static void InitSeeds(std::function< tULLInt(tInteger)> F)
init the seeds
virtual tMemSize getMemorySize() const override
return the memory size of the class and the memory size of all its attributes/associations
Definition: OMP_ClassFactory.h:70
static void InitSeeds(const tULLInt &alpha, const tULLInt &beta)
init the linear seeds. seed for thread i is (i+1) x alpha +beta
static void InitSeeds(const tULLInt &seed)
init the seeds
OMP_ClassFactory()
build a OMP_ClassFactory
Definition: OMP_ClassFactory.cpp:4
static void InitSeeds()
init the seeds
virtual CORE_UniquePointer< CORE_Object > NewInstance(const tString &name, const CORE_OptionsList &arguments) const override
create an unique instance of a class as a general CORE_Object
Definition: OMP_ClassFactory.cpp:10
virtual ~OMP_ClassFactory(void)
destroy a OMP_ClassFactory
Definition: OMP_ClassFactory.cpp:7