Model manager.
More...
#include </home/runner/work/iganet/iganet/webapps/modelmanager.hpp>
|
virtual const std::string & | name () const noexcept |
| Returns the full qualified name of the object.
|
|
at::optional< std::string > | name_ |
| String storing the full qualified name of the object.
|
|
Model manager.
This class implements the model manager
◆ ModelManager() [1/3]
iganet::ModelManager::ModelManager |
( |
| ) |
|
|
delete |
Default constructor deleted.
◆ ModelManager() [2/3]
iganet::ModelManager::ModelManager |
( |
const std::string & |
path | ) |
|
|
inline |
Constructor from filesystem.
◆ ModelManager() [3/3]
iganet::ModelManager::ModelManager |
( |
const std::vector< std::string > & |
paths | ) |
|
|
inline |
Constructor from filesystem.
◆ addModelPath() [1/2]
void iganet::ModelManager::addModelPath |
( |
const std::string & |
path | ) |
|
|
inline |
Adds models from given path.
◆ addModelPath() [2/2]
void iganet::ModelManager::addModelPath |
( |
const std::vector< std::string > & |
paths | ) |
|
|
inline |
Adds models from list of directories.
◆ create()
std::shared_ptr< Model< iganet::real_t > > iganet::ModelManager::create |
( |
const std::string & |
name, |
|
|
const nlohmann::json & |
json = NULL |
|
) |
| const |
|
inline |
Returns a new instance of the requested model and throws an exception if model cannot be found.
◆ getModels()
nlohmann::json iganet::ModelManager::getModels |
( |
| ) |
const |
|
inline |
Serializes the list of models to JSON.
◆ load()
std::shared_ptr< Model< iganet::real_t > > iganet::ModelManager::load |
( |
const nlohmann::json & |
json | ) |
const |
|
inline |
Returns a new model instance from binary data stream throws an exception if model cannot be created.
◆ pretty_print()
virtual void iganet::ModelManager::pretty_print |
( |
std::ostream & |
os = std::cout | ) |
const |
|
inlineoverridevirtualnoexcept |
◆ models
std::map<std::string, std::shared_ptr<ModelHandler> > iganet::ModelManager::models |
|
private |
The documentation for this class was generated from the following file: