Parfis
v0.0.7
|
The main class in the parfis library. More...
#include <parfis.h>
Public Member Functions | |
Parfis (uint32_t id, const std::string &cfgstr="", uint32_t writeLogFile=0) | |
Constructor with an id. More... | |
Parfis (const Parfis &)=default | |
Parfis & | operator= (const Parfis &)=default |
~Parfis () | |
Destroy the Parfis object. More... | |
int | initialize () |
Initialize all domains create command chains. More... | |
int | loadSimData () |
int | loadCfgData () |
int | runCommandChain (const std::string &str) |
Run command chain. More... | |
int | configure (const char *str) |
Configures the domain with a string and loads the CfgData. More... | |
Domain * | getDomain (const std::string &cstr) |
std::string | getParamValueString (const std::string &key) |
void | initializeDomains () |
Static Public Member Functions | |
static Parfis * | newParfis (const std::string &cfgstr="", uint32_t writeLogFile=0) |
Creates new Parfis object in memory. More... | |
static Parfis * | getParfis (uint32_t) |
Public Attributes | |
Logger | m_logger |
Logging object. | |
std::string | m_cfgstr |
Configuration string. | |
CfgData | m_cfgData |
Configuration data, from cfg strings and calculated. | |
SimData | m_simData |
Simulation data, particles and cell data. | |
uint32_t | m_id |
Id of the created object (same as Parfis::s_parfisMap id) | |
std::vector< std::string > | m_domainVec |
Domain vector. | |
std::map< std::string, std::unique_ptr< Domain > > | m_domainMap |
Map of all domains (name -> Domain) | |
std::map< std::string, std::unique_ptr< CommandChain > > | m_cmdChainMap |
Map of command chains. | |
Static Public Attributes | |
static std::map< uint32_t, std::unique_ptr< Parfis > > | s_parfisMap |
Static map of pointers to Parfis objects. | |
static uint32_t | s_parfisMapId = 0 |
Parfis id counter, unique id for every parfis even when deleted. | |
The main class in the parfis library.
Class methods are accessed through the C API functions.
parfis::Parfis::Parfis | ( | uint32_t | id, |
const std::string & | cfgstr = "" , |
||
uint32_t | writeLogFile = 0 |
||
) |
Constructor with an id.
id | of the created object |
cfgstr | configuration string ("" by default) |
parfis::Parfis::~Parfis | ( | ) |
Destroy the Parfis object.
Print log file.
int parfis::Parfis::configure | ( | const char * | str | ) |
Configures the domain with a string and loads the CfgData.
str | with the configuration text of the type "key=value" |
|
static |
int parfis::Parfis::initialize | ( | ) |
Initialize all domains create command chains.
Creates Data structs and calls loaders for the data that reside inside specific domains.
|
static |
Creates new Parfis object in memory.
Saves a uniquie pointer to the dynamicaly created object in the static map Parfis::s_parfisMap.
int parfis::Parfis::runCommandChain | ( | const std::string & | chainChainName | ) |
Run command chain.
chainChainName | name of the command chain |