OOFEM 3.0
Loading...
Searching...
No Matches
oofem::ModuleManager< M > Class Template Referenceabstract

#include <modulemanager.h>

Collaboration diagram for oofem::ModuleManager< M >:

Public Member Functions

 ModuleManager (EngngModel *emodel)
virtual ~ModuleManager ()
 ModuleManager (const ModuleManager &)=delete
ModuleManageroperator= (const ModuleManager &)=delete
virtual std::unique_ptr< M > CreateModule (const char *name, int n, EngngModel *emodel)=0
virtual int instanciateYourself (DataReader &dr, const std::shared_ptr< InputRecord > &irPtr, InputFieldType ift, const std::string &name, DataReader::InputRecordType irType)
virtual void registerModule (std::unique_ptr< M > &module)
virtual const char * giveClassName () const =0
 Returns class name of the receiver.
M * giveModule (int num)
int giveNumberOfModules () const

Protected Attributes

std::vector< std::unique_ptr< M > > moduleList
 Module list.
int numberOfModules = 0
 Number of modules.
EngngModelemodel = nullptr
 Associated Engineering model.

Detailed Description

template<class M>
class oofem::ModuleManager< M >

Class representing and implementing ModuleManager. It is attribute of EngngModel. It manages the modules of given type.

Definition at line 59 of file modulemanager.h.

Constructor & Destructor Documentation

◆ ModuleManager() [1/2]

template<class M>
oofem::ModuleManager< M >::ModuleManager ( EngngModel * emodel)
inline

Definition at line 70 of file modulemanager.h.

References emodel, and numberOfModules.

Referenced by ModuleManager(), and operator=().

◆ ~ModuleManager()

template<class M>
virtual oofem::ModuleManager< M >::~ModuleManager ( )
inlinevirtual

Definition at line 74 of file modulemanager.h.

◆ ModuleManager() [2/2]

template<class M>
oofem::ModuleManager< M >::ModuleManager ( const ModuleManager< M > & )
delete

References ModuleManager().

Member Function Documentation

◆ CreateModule()

template<class M>
virtual std::unique_ptr< M > oofem::ModuleManager< M >::CreateModule ( const char * name,
int n,
EngngModel * emodel )
pure virtual

Creates new instance of module.

Parameters
nameName of module.
nNumber associated with module.
emodelEngineering model which receiver belongs to.

Implemented in oofem::ExportModuleManager, oofem::InitModuleManager, and oofem::MonitorManager.

References emodel.

Referenced by instanciateYourself().

◆ giveClassName()

template<class M>
virtual const char * oofem::ModuleManager< M >::giveClassName ( ) const
pure virtual

Returns class name of the receiver.

Implemented in oofem::ExportModuleManager, oofem::InitModuleManager, and oofem::MonitorManager.

◆ giveModule()

template<class M>
M * oofem::ModuleManager< M >::giveModule ( int num)
inline

Returns the required module.

Parameters
numModule number.

Definition at line 140 of file modulemanager.h.

References moduleList, and OOFEM_ERROR.

Referenced by oofem::AdditiveManufacturingProblem::solveYourself().

◆ giveNumberOfModules()

template<class M>
int oofem::ModuleManager< M >::giveNumberOfModules ( ) const
inline

Definition at line 152 of file modulemanager.h.

References moduleList.

Referenced by oofem::AdditiveManufacturingProblem::solveYourself().

◆ instanciateYourself()

template<class M>
virtual int oofem::ModuleManager< M >::instanciateYourself ( DataReader & dr,
const std::shared_ptr< InputRecord > & irPtr,
InputFieldType ift,
const std::string & name,
DataReader::InputRecordType irType )
inlinevirtual

Reads receiver description from input stream and creates corresponding modules components accordingly. It scans input file, each line is assumed to be single record describing particular module. The record line is converted to lowercase letters. After new output module object is created, its initializeForm member function is called with its record as parameter.

Parameters
drData reader for input records.
irRecord for receiver.
Returns
Nonzero if o.k.

Definition at line 96 of file modulemanager.h.

References CreateModule(), emodel, oofem::DataReader::giveGroupRecords(), moduleList, numberOfModules, OOFEM_ERROR, registerModule(), oofem::DataReader::GroupRecords::size(), and VERBOSE_PRINT0.

◆ operator=()

template<class M>
ModuleManager & oofem::ModuleManager< M >::operator= ( const ModuleManager< M > & )
delete

References ModuleManager().

◆ registerModule()

template<class M>
virtual void oofem::ModuleManager< M >::registerModule ( std::unique_ptr< M > & module)
inlinevirtual

Stores a module in moduleList. Useful when adding modules externally, e.g. from Python

Definition at line 128 of file modulemanager.h.

References moduleList.

Referenced by instanciateYourself().

Member Data Documentation

◆ emodel

template<class M>
EngngModel* oofem::ModuleManager< M >::emodel = nullptr
protected

Associated Engineering model.

Definition at line 67 of file modulemanager.h.

Referenced by CreateModule(), instanciateYourself(), and ModuleManager().

◆ moduleList

template<class M>
std::vector< std::unique_ptr< M > > oofem::ModuleManager< M >::moduleList
protected

Module list.

Definition at line 63 of file modulemanager.h.

Referenced by giveModule(), giveNumberOfModules(), instanciateYourself(), and registerModule().

◆ numberOfModules

template<class M>
int oofem::ModuleManager< M >::numberOfModules = 0
protected

Number of modules.

Definition at line 65 of file modulemanager.h.

Referenced by instanciateYourself(), and ModuleManager().


The documentation for this class was generated from the following file:

This page is part of the OOFEM-3.0 documentation. Copyright Copyright (C) 1994-2025 Borek Patzak Bořek Patzák
Project e-mail: oofem@fsv.cvut.cz
Generated at for OOFEM by doxygen 1.15.0 written by Dimitri van Heesch, © 1997-2011