Parfis  v0.0.7
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
parfis::Parfis Struct Reference

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
Parfisoperator= (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...
DomaingetDomain (const std::string &cstr)
std::string getParamValueString (const std::string &key)
void initializeDomains ()

Static Public Member Functions

static ParfisnewParfis (const std::string &cfgstr="", uint32_t writeLogFile=0)
 Creates new Parfis object in memory. More...
static ParfisgetParfis (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.

Detailed Description

The main class in the parfis library.

Class methods are accessed through the C API functions.

Constructor & Destructor Documentation

◆ Parfis()

parfis::Parfis::Parfis ( uint32_t  id,
const std::string &  cfgstr = "",
uint32_t  writeLogFile = 0 

Constructor with an id.

idof the created object
cfgstrconfiguration string ("" by default)

◆ ~Parfis()

parfis::Parfis::~Parfis ( )

Destroy the Parfis object.

Print log file.

Member Function Documentation

◆ configure()

int parfis::Parfis::configure ( const char *  str)

Configures the domain with a string and loads the CfgData.

strwith the configuration text of the type "key=value"
Zero on success

◆ getParfis()

parfis::Parfis * parfis::Parfis::getParfis ( uint32_t  id)
Write doxy

◆ initialize()

int parfis::Parfis::initialize ( )

Initialize all domains create command chains.

Creates Data structs and calls loaders for the data that reside inside specific domains.

Zero for success

◆ newParfis()

parfis::Parfis * parfis::Parfis::newParfis ( const std::string &  cfgStr = "",
uint32_t  writeLogFile = 0 

Creates new Parfis object in memory.

Saves a uniquie pointer to the dynamicaly created object in the static map Parfis::s_parfisMap.

Pointer to the created Parfis object

◆ runCommandChain()

int parfis::Parfis::runCommandChain ( const std::string &  chainChainName)

Run command chain.

chainChainNamename of the command chain
Zero on success