PolyDiM
C++ library for POLYtopal DIscretization Methods
Loading...
Searching...
No Matches
Gedim::Configurations Class Referencefinal

#include <Configurations.hpp>

Public Member Functions

 ~Configurations ()
 

Static Public Member Functions

static const unsigned intNumberProperties ()
 
static void InitializeFromCsv (const std::string &ConfigurationsFile, const bool &hasHeader=true, const char &separator=';')
 Read the configuration from csv file.
 
static void InitializeFromIni (const std::string &ConfigurationsFile)
 Read the configuration from ini file.
 
static void Initialize (const int &argc, char **argv, const std::string &format="id:type=value")
 
static void ExportToCsv (const std::string &filePath, const bool &append=false, const char &separator=';')
 Export the configuration to csv file.
 
static void ExportToIni (const std::string &filePath, const bool &append=false, const std::string &section="")
 Export the configuration to ini file.
 
static void Reset ()
 Reset the Configurations class.
 
static void RemoveProperty (const std::string &id)
 Remove Single Property.
 
static bool ExistsProperty (const std::string &id)
 Check if Property exists.
 
template<class T >
static bool CheckPropertyType (const std::string &id)
 
static void ConvertPropertyFromString (const std::string &id, const std::string &type, const std::string &value, const std::string &description="")
 Convert Property by string Type and string value.
 
template<class T >
static void AddProperty (const std::string &id, const T &value=T(), const std::string &description="")
 Add or Overwrite Property.
 
static void AddProperty (const std::string &id, const char *value="", const std::string &description="")
 Add or Overwrite Property converting const char* to string.
 
template<class T >
static void SetPropertyValue (const std::string &id, const T value)
 Set Property Value.
 
static void SetPropertyValue (const std::string &id, const char *value)
 Set Property Value converting const char* to string.
 
template<class T >
static const TGetPropertyValue (const std::string &id)
 Get Property Value.
 

Constructor & Destructor Documentation

◆ ~Configurations()

Gedim::Configurations::~Configurations ( )
inline

Member Function Documentation

◆ AddProperty() [1/2]

void Gedim::Configurations::AddProperty ( const std::string &  id,
const char value = "",
const std::string &  description = "" 
)
static

Add or Overwrite Property converting const char* to string.

◆ AddProperty() [2/2]

template<class T >
static void Gedim::Configurations::AddProperty ( const std::string &  id,
const T value = T(),
const std::string &  description = "" 
)
inlinestatic

Add or Overwrite Property.

◆ CheckPropertyType()

template<class T >
static bool Gedim::Configurations::CheckPropertyType ( const std::string &  id)
inlinestatic

◆ ConvertPropertyFromString()

void Gedim::Configurations::ConvertPropertyFromString ( const std::string &  id,
const std::string &  type,
const std::string &  value,
const std::string &  description = "" 
)
static

Convert Property by string Type and string value.

◆ ExistsProperty()

static bool Gedim::Configurations::ExistsProperty ( const std::string &  id)
inlinestatic

Check if Property exists.

◆ ExportToCsv()

void Gedim::Configurations::ExportToCsv ( const std::string &  filePath,
const bool append = false,
const char separator = ';' 
)
static

Export the configuration to csv file.

◆ ExportToIni()

void Gedim::Configurations::ExportToIni ( const std::string &  filePath,
const bool append = false,
const std::string &  section = "" 
)
static

Export the configuration to ini file.

◆ GetPropertyValue()

template<class T >
static const T & Gedim::Configurations::GetPropertyValue ( const std::string &  id)
inlinestatic

Get Property Value.

◆ Initialize()

void Gedim::Configurations::Initialize ( const int argc,
char **  argv,
const std::string &  format = "id:type=value" 
)
static

Read the configuration from command arguments

Note
format shall contain keyword id + char + type + char + value (example: id:type=value)

◆ InitializeFromCsv()

void Gedim::Configurations::InitializeFromCsv ( const std::string &  ConfigurationsFile,
const bool hasHeader = true,
const char separator = ';' 
)
static

Read the configuration from csv file.

◆ InitializeFromIni()

void Gedim::Configurations::InitializeFromIni ( const std::string &  ConfigurationsFile)
static

Read the configuration from ini file.

◆ NumberProperties()

static const unsigned int & Gedim::Configurations::NumberProperties ( )
inlinestatic

◆ RemoveProperty()

void Gedim::Configurations::RemoveProperty ( const std::string &  id)
static

Remove Single Property.

◆ Reset()

void Gedim::Configurations::Reset ( )
static

Reset the Configurations class.

◆ SetPropertyValue() [1/2]

void Gedim::Configurations::SetPropertyValue ( const std::string &  id,
const char value 
)
static

Set Property Value converting const char* to string.

◆ SetPropertyValue() [2/2]

template<class T >
static void Gedim::Configurations::SetPropertyValue ( const std::string &  id,
const T  value 
)
inlinestatic

Set Property Value.


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