20 #ifndef _PISMCONFIG_H_
21 #define _PISMCONFIG_H_
26 #include "pism/util/ConfigInterface.hh"
27 #include "pism/util/VariableMetadata.hh"
52 const std::vector<double> &values);
56 void set_string_impl(
const std::string &name,
const std::string &value);
75 const std::string &variable_name,
80 typedef std::shared_ptr<DefaultConfig>
Ptr;
81 typedef std::shared_ptr<const DefaultConfig>
ConstPtr;
88 void init(
const Logger &log,
bool use_default_path);
std::map< std::string, std::string > Strings
std::map< std::string, std::vector< double > > Doubles
std::map< std::string, bool > Flags
std::string option(const std::string ¶meter) const
A class for storing and accessing PISM configuration flags and parameters.
DefaultConfig(MPI_Comm com, const std::string &variable_name, const std::string &option, units::System::Ptr unit_system)
Config that respects command-line options and stores data in a NetCDF variable.
void init_with_default(const Logger &log)
Initialize (use default path if no option was set).
std::shared_ptr< DefaultConfig > Ptr
std::shared_ptr< const DefaultConfig > ConstPtr
void init(const Logger &log)
Initialize (leave empty if no option was set).
Default PISM configuration database: uses NetCDF files; can be initialized from a file specified usin...
High-level PISM I/O class.
bool get_flag_impl(const std::string &name) const
void set_numbers_impl(const std::string &name, const std::vector< double > &values)
bool is_set_impl(const std::string &name) const
Doubles all_doubles_impl() const
void set_number_impl(const std::string &name, double value)
NetCDFConfig(MPI_Comm com, const std::string &name, units::System::Ptr unit_system)
void set_flag_impl(const std::string &name, bool value)
Set a value of a flag flag.
std::string get_string_impl(const std::string &name) const
double get_number_impl(const std::string &name) const
void write_impl(const File &nc) const
Write a config variable to a file (with all its attributes).
void set_string_impl(const std::string &name, const std::string &value)
Strings all_strings_impl() const
Flags all_flags_impl() const
std::vector< double > get_numbers_impl(const std::string &name) const
std::string m_config_filename
the name of the file this config database was initialized from
void read_impl(const File &nc)
Read flag flags and double parameters from a NetCDF file.
A class for reading, writing and accessing PISM configuration flags and parameters.
std::shared_ptr< System > Ptr