|
C++ mpi module for stochmagnet_main Package
|
This class is an list of options. More...
#include <CORE_OptionsList.h>


Public Member Functions | |
| CORE_OptionsList (void) | |
| create | |
| virtual | ~CORE_OptionsList (void) |
| destroy | |
| virtual tMemSize | getMemorySize () const override |
| return the memory size of the class More... | |
| virtual tMemSize | getContentsMemorySize () const override |
| return the memory size of the included associations More... | |
| std::map< tString, tString >::iterator | begin () |
| begin iterator | |
| std::map< tString, tString >::iterator | end () |
| end iterator | |
| std::map< tString, tString >::const_iterator | cbegin () const |
| begin iterator | |
| std::map< tString, tString >::const_iterator | cend () const |
| end iterator | |
| void | setIsOptionsNameCaseSensitive (const tBoolean &isOptNameCS) |
| set if the option name is in lower case More... | |
| const tBoolean & | isOptionsNameCaseSensitive () const |
| set if the option name is in lower case More... | |
| void | clear () |
| clear the options list | |
| CORE_OptionsList & | operator= (const CORE_OptionsList &options) |
| copy the options value More... | |
| void | setManOption (const tString &category, const tString &optName, const tString &man) |
| set man option More... | |
| void | setOptionValue (const tString &optName, const tBoolean &value) |
| set option More... | |
| tString & | operator[] (const tString &optName) |
| string accessor for options list More... | |
| template<typename T > | |
| void | setOptionValue (const tString &optName, const T &value) |
| set option More... | |
| template<typename T > | |
| void | setOptionValue (const tString &optName, const std::initializer_list< T > &values) |
| set option More... | |
| template<typename T > | |
| void | setOptionValue (const tString &optName, const std::valarray< T > &values) |
| set option More... | |
| template<typename T > | |
| void | setOptionValue (const tString &optName, const std::vector< T > &values) |
| set option More... | |
| template<typename T , tIndex N> | |
| void | setOptionValue (const tString &optName, const std::array< T, N > &values) |
| set option More... | |
| tString | operator[] (const tString &optName) const |
| return the value of the option with name More... | |
| tBoolean | removeOption (const tString &optName) |
| remove option More... | |
| tBoolean | getOptionValue (const tString &optName, tString &optValue) const |
| get the option value More... | |
| template<typename T > | |
| requires (functions_type::isRealType< T >) inline tBoolean getOptionValue(const tString &optName | |
| get the option value More... | |
| if (ok) | |
| template<typename T > | |
| requires (functions_type::isIntegerType< T >) inline tBoolean getOptionValue(const tString &optName | |
| get the option value More... | |
| if (ok) | |
| tBoolean | getOptionValue (const tString &optName, tBoolean &optValue) const |
| get the option value More... | |
| template<class T > | |
| tBoolean | getOptionValue (const tString &optName, std::vector< T > &optValues) const |
| get the option value More... | |
| template<class T , tIndex N> | |
| tBoolean | getOptionValue (const tString &optName, std::array< T, N > &optValues) const |
| get the option value More... | |
| template<typename T > | |
| requires ((functions_type::isIntegerType< T >) &&!(functions_type::isBooleanType< T >)) inline static tBoolean ReadOption(int nArgs | |
| read the only the option with optionName in command line More... | |
| if (ReadOption(nArgs, argv, isCaseSensitive, optionName, strValue)) | |
| template<typename T > | |
| requires (functions_type::isRealType< T >) inline static tBoolean ReadOption(int nArgs | |
| read the only the option with optionName in command line More... | |
| if (ReadOption(nArgs, argv, isCaseSensitive, optionName, strValue)) | |
| template<typename T > | |
| requires (functions_type::isBooleanType< T >) inline static tBoolean ReadOption(int nArgs | |
| read the only the option with optionName in command line More... | |
| if (ReadOption(nArgs, argv, isCaseSensitive, optionName, strValue)) | |
| tBoolean | loadFromFile (const tString &fileName) |
| read the options from a file More... | |
| void | loadFromCommandLine (int argc, char *argv[]) |
| read all the options from the command line . The options are of the form '–option_name=option_value" or within the default option file 'input' when no command line More... | |
| tBoolean | saveToFile (const tString &fileName) const |
| save the options to the file by theme More... | |
| tBoolean | saveToFile () const |
| save the options to the file by theme in outputPath/outputPrefix.opt | |
| virtual tString | toString () const override |
| turn the class to string More... | |
Public Member Functions inherited from CORE_Object | |
| template<class T > | |
| std::shared_ptr< T > | getSharedPointer () |
| return the shared pointer for this More... | |
| template<class T > | |
| std::shared_ptr< const T > | getConstSharedPointer () const |
| return a const shared pointer for this More... | |
| template<class T > | |
| tBoolean | isInstanceOf () const |
| test if the clas T is an instance of this class More... | |
| tString | getClassName () const |
| return the name of the class More... | |
| tString | getPointerString () const |
| retrun the pointer of the class as a string More... | |
| tString | getIdentityString () const |
| retrun the string identification of the class More... | |
Static Public Member Functions | |
| static CORE_UniquePointer< SelfClass > | New () |
| create a new unique instance of the class this More... | |
| static tBoolean | ReadOption (int nArgs, char *argv[], const tBoolean &isCaseSensitive, const tString &optionName, tString &optionValue) |
| read the only the option with optionName in command line More... | |
Static Public Member Functions inherited from CORE_Object | |
| static tBoolean | EnableMemoryStack (const tBoolean &isMemoryChecked) |
| enable the memory stack More... | |
| static void | EnableMemoryStack () |
| enable the memory stack | |
| static void | DisableMemoryStack () |
| disable the memory stack | |
| static tBoolean | IsMemoryStackEnabled () |
| return trur if the memory stack is enabled | |
| static tString | MemoryStackToString () |
| get the memory stack in string More... | |
| static tIndex | GetRegisteredClassesNumber () |
| get the memory stack in string More... | |
Public Attributes | |
| T &optValue | const |
| tBoolean | ok =getOptionValue(optName,strValue) |
| return | ok |
| char * | argv [] |
| char const tBoolean & | isCaseSensitive |
| char const tBoolean const tString & | optionName |
| char const tBoolean const tString T & | optionValue |
| return | false |
Additional Inherited Members | |
Protected Member Functions inherited from CORE_Object | |
| CORE_Object () | |
| build an instance of the object | |
| virtual | ~CORE_Object () |
| destroy the instance of object std | |
This class is an list of options.
|
inlineoverridevirtual |
return the memory size of the included associations
Reimplemented from CORE_Object.
|
inlineoverridevirtual |
return the memory size of the class
Reimplemented from CORE_Object.
|
inline |
get the option value
| [in] | optName | name of the option |
| [in,out] | optValues | value of the option. Unchanged if the option does not exists |
|
inline |
get the option value
| [in] | optName | name of the option |
| [in,out] | optValues | value of the option. Unchanged if the option does not exists |
|
inline |
get the option value
| [in] | optName | name of the option |
| [in,out] | optValue | value of the option. Unchanged if the option does not exists |
|
inline |
get the option value
| [in] | optName | name of the option |
| [in,out] | optValue | value of the option. Unchanged if the option does not exists |
|
inline |
set if the option name is in lower case
| void CORE_OptionsList::loadFromCommandLine | ( | int | argc, |
| char * | argv[] | ||
| ) |
read all the options from the command line . The options are of the form '–option_name=option_value" or within the default option file 'input' when no command line
| [in] | argc | number of parameter of the command line |
| [in] | argv | : value of the parameters |
| tBoolean CORE_OptionsList::loadFromFile | ( | const tString & | fileName | ) |
read the options from a file
| [in] | fileName | file name of the options |
|
inlinestatic |
create a new unique instance of the class this
|
inline |
copy the options value
| [in] | options |
|
inline |
string accessor for options list
| [in] | optName |
|
inline |
return the value of the option with name
| [in] | optName | : name of the option |
|
static |
read the only the option with optionName in command line
| [in] | nArgs | number of parameters of the command line |
| [in] | argv | : value of the parameters |
| [in] | isCaseSensitive | : true if the case is sensitive |
| [in] | optionName | value of the option |
| [out] | optionValue | : value of the option |
|
inline |
remove option
| [in] | optName | option name |
| CORE_OptionsList::requires | ( | (functions_type::isIntegerType< T >) &&!(functions_type::isBooleanType< T >) | ) |
read the only the option with optionName in command line
| [in] | nArgs | number of parameters of the command line |
| [in] | argv | : value of the parameters |
| [in] | isCaseSensitive | : true if the case is sensitive |
| [in] | optionName | value of the option |
| [out] | optionValue | : value of the option |
| CORE_OptionsList::requires | ( | functions_type::isBooleanType< T > | ) |
read the only the option with optionName in command line
| [in] | nArgs | number of parameters of the command line |
| [in] | argv | : value of the parameters |
| [in] | isCaseSensitive | : true if the case is sensitive |
| [in] | optionName | value of the option |
| [out] | optionValue | : value of the option |
| CORE_OptionsList::requires | ( | functions_type::isIntegerType< T > | ) | const & |
get the option value
| [in] | optName | name of the option |
| [in,out] | optValue | value of the option. Unchanged if the option does not exists |
| CORE_OptionsList::requires | ( | functions_type::isRealType< T > | ) |
read the only the option with optionName in command line
| [in] | nArgs | number of parameters of the command line |
| [in] | argv | : value of the parameters |
| [in] | isCaseSensitive | : true if the case is sensitive |
| [in] | optionName | value of the option |
| [out] | optionValue | : value of the option |
| CORE_OptionsList::requires | ( | functions_type::isRealType< T > | ) | const & |
get the option value
| [in] | optName | name of the option |
| [in,out] | optValue | value of the option. Unchanged if the option does not exists |
| tBoolean CORE_OptionsList::saveToFile | ( | const tString & | fileName | ) | const |
save the options to the file by theme
| [in] | fileName | the options file to save |
|
inline |
set if the option name is in lower case
| [in] | isOptNameCS | true to set option name case sensitive |
|
inline |
set man option
| [in] | category | : category of the option |
| [in] | optName | : name of the option |
| [in] | man | : man of the option |
|
inline |
set option
| [in] | optName | : name of the option |
| [in] | values | : values of the option |
|
inline |
set option
| [in] | optName | : name of the option |
| [in] | values | : values of the option |
|
inline |
set option
| [in] | optName | : name of the option |
| [in] | values | : values of the option |
|
inline |
set option
| [in] | optName | : name of the option |
| [in] | values | : values of the option |
|
inline |
set option
| [in] | optName | : name of the option |
| [in] | value | : value of the option |
|
inline |
set option
| [in] | optName | : name of the option |
| [in] | value | : value of the option |
|
overridevirtual |
| T &optValue CORE_OptionsList::const |
| char const tBoolean const tString T & CORE_OptionsList::optionValue |