PISM, A Parallel Ice Sheet Model
stable v2.1.1 committed by Constantine Khrulev on 2024-12-04 13:36:58 -0900
|
The JSON-based Config implementation. More...
#include <ConfigJSON.hh>
Public Member Functions | |
ConfigJSON (units::System::Ptr unit_system) | |
virtual | ~ConfigJSON () |
void | init_from_file (const std::string &filename) |
void | init_from_string (const std::string &string) |
std::string | dump () const |
Public Member Functions inherited from pism::Config | |
Config (units::System::Ptr unit_system) | |
virtual | ~Config () |
void | import_from (const Config &other) |
void | resolve_filenames () |
const std::set< std::string > & | parameters_set_by_user () const |
const std::set< std::string > & | parameters_used () const |
void | read (MPI_Comm com, const std::string &filename) |
void | write (MPI_Comm com, const std::string &filename, bool append=true) const |
std::string | filename () const |
Returns the name of the file used to initialize the database. More... | |
void | read (const File &file) |
void | write (const File &file) const |
bool | is_set (const std::string &name) const |
Doubles | all_doubles () const |
double | get_number (const std::string &name, UseFlag flag=REMEMBER_THIS_USE) const |
double | get_number (const std::string &name, const std::string &units, UseFlag flag=REMEMBER_THIS_USE) const |
std::vector< double > | get_numbers (const std::string &name, UseFlag flag=REMEMBER_THIS_USE) const |
std::vector< double > | get_numbers (const std::string &name, const std::string &units, UseFlag flag=REMEMBER_THIS_USE) const |
void | set_number (const std::string &name, double value, ConfigSettingFlag flag=CONFIG_FORCE) |
void | set_numbers (const std::string &name, const std::vector< double > &values, ConfigSettingFlag flag=CONFIG_FORCE) |
Strings | all_strings () const |
std::string | get_string (const std::string &name, UseFlag flag=REMEMBER_THIS_USE) const |
void | set_string (const std::string &name, const std::string &value, ConfigSettingFlag flag=CONFIG_FORCE) |
Flags | all_flags () const |
std::set< std::string > | keys () const |
bool | get_flag (const std::string &name, UseFlag flag=REMEMBER_THIS_USE) const |
void | set_flag (const std::string &name, bool value, ConfigSettingFlag flag=CONFIG_FORCE) |
std::string | doc (const std::string ¶meter) const |
std::string | units (const std::string ¶meter) const |
std::string | type (const std::string ¶meter) const |
std::string | option (const std::string ¶meter) const |
std::string | choices (const std::string ¶meter) const |
Private Member Functions | |
virtual void | read_impl (const File &nc) |
virtual void | write_impl (const File &nc) const |
virtual bool | is_set_impl (const std::string &name) const |
virtual Doubles | all_doubles_impl () const |
virtual double | get_number_impl (const std::string &name) const |
virtual std::vector< double > | get_numbers_impl (const std::string &name) const |
virtual void | set_number_impl (const std::string &name, double value) |
virtual void | set_numbers_impl (const std::string &name, const std::vector< double > &values) |
virtual Strings | all_strings_impl () const |
virtual std::string | get_string_impl (const std::string &name) const |
virtual void | set_string_impl (const std::string &name, const std::string &value) |
virtual Flags | all_flags_impl () const |
virtual bool | get_flag_impl (const std::string &name) const |
virtual void | set_flag_impl (const std::string &name, bool value) |
Private Attributes | |
json_t * | m_data |
Additional Inherited Members | |
Public Types inherited from pism::Config | |
enum | UseFlag { REMEMBER_THIS_USE = 0 , FORGET_THIS_USE = 1 } |
Flag used by get_...() methods. More... | |
typedef std::shared_ptr< Config > | Ptr |
typedef std::shared_ptr< const Config > | ConstPtr |
typedef std::map< std::string, std::vector< double > > | Doubles |
typedef std::map< std::string, std::string > | Strings |
typedef std::map< std::string, bool > | Flags |
The JSON-based Config implementation.
Definition at line 32 of file ConfigJSON.hh.