35 #ifndef modulemanager_h 36 #define modulemanager_h 46 #define _IFT_ModuleManager_nmodules "nmodules" 69 this->emodel = emodel;
82 virtual M *CreateModule(
const char *name,
int n,
EngngModel *emodel) = 0;
101 moduleList.reserve(numberOfModules);
102 for (
int i = 0; i < numberOfModules; i++ ) {
110 std :: unique_ptr< M > module( this->CreateModule(name.c_str(), i, emodel) );
115 module->initializeFrom(mir);
116 moduleList.push_back(std :: move(module));
131 virtual const char *giveClassName()
const = 0;
140 if ( num >= 1 && num <= (
int)moduleList.size() ) {
141 elem = moduleList[num-1].get();
152 #endif // modulemanager_h Class representing and implementing ModuleManager.
virtual int instanciateYourself(DataReader &dr, InputRecord *ir)
Reads receiver description from input stream and creates corresponding modules components accordingly...
Class representing the abstraction for input data source.
int numberOfModules
Number of modules.
#define VERBOSE_PRINT0(str, number)
M * giveModule(int num)
Returns the required module.
virtual InputRecord * giveInputRecord(InputRecordType irType, int recordId)=0
Returns input record corresponding to given InputRecordType value and its record_id.
EngngModel * emodel
Associated Engineering model.
int giveNumberOfModules() const
IRResultType
Type defining the return values of InputRecord reading operations.
std::vector< std::unique_ptr< M > > moduleList
Module list.
Abstract base class representing the "problem" under consideration.
the oofem namespace is to define a context or scope in which all oofem names are defined.
ModuleManager(EngngModel *emodel)