Psi4
Public Member Functions | Private Types | Private Attributes | List of all members
psi::Options Class Reference

#include <liboptions.h>

Public Member Functions

 Options ()
 
Optionsoperator= (const Options &rhs)
 
bool read_globals () const
 
void set_read_globals (bool _b)
 
void set_current_module (const std::string s)
 
void to_upper (std::string &str)
 
void validate_options ()
 
void add (std::string key, DataType *data)
 
void add (std::string key, bool b)
 
void add (std::string key, int i)
 
void add (std::string key, double d)
 
void add (std::string key, std::string s, std::string c="")
 
void add_i (std::string key, std::string s, std::string c="")
 
void add_bool (std::string key, bool b)
 
void add_int (std::string key, int i)
 
void add_double (std::string key, double d)
 
void add_str (std::string key, std::string s, std::string c="")
 
void add_str_i (std::string key, std::string s, std::string c="")
 
void add_array (std::string key)
 
void set_bool (const std::string &module, const std::string &key, bool b)
 
void set_int (const std::string &module, const std::string &key, int i)
 
void set_double (const std::string &module, const std::string &key, double d)
 
void set_str (const std::string &module, const std::string &key, std::string s)
 
void set_str_i (const std::string &module, const std::string &key, std::string s)
 
void set_python (const std::string &module, const std::string &key, const py::object &p)
 
void set_array (const std::string &module, const std::string &key)
 
void set_global_bool (const std::string &key, bool b)
 
void set_global_int (const std::string &key, int i)
 
void set_global_double (const std::string &key, double d)
 
void set_global_str (const std::string &key, const std::string &s)
 
void set_global_python (const std::string &key, const py::object &p)
 
void set_global_array (const std::string &key)
 
DataTypeset_global_array_entry (const std::string &key, DataType *entry, DataType *loc)
 
void set_global_array_double (std::string key, double val, DataType *entry)
 
void set_global_array_string (std::string key, std::string val, DataType *entry)
 
void set_global_array_int (std::string key, int val, DataType *entry)
 
DataTypeset_global_array_array (std::string key, DataType *entry)
 
DataTypeset_local_array_entry (const std::string &module, const std::string &key, DataType *entry, DataType *loc)
 
void set_local_array_double (const std::string &module, const std::string &key, double val, DataType *entry)
 
void set_local_array_string (const std::string &module, const std::string &key, std::string val, DataType *entry)
 
void set_local_array_int (const std::string &module, const std::string &key, int val, DataType *entry)
 
DataTypeset_local_array_array (const std::string &module, const std::string &key, DataType *entry)
 
void clear (void)
 
bool exists_in_active (std::string key)
 
bool exists_in_global (std::string key)
 
bool exists (std::string key)
 
Dataget (std::string key)
 
Dataget (std::map< std::string, Data > &m, std::string &key)
 
Dataget_global (std::string key)
 
Dataget_local (std::string &key)
 
Datause (std::string &key)
 
Datause_local (std::string &key)
 
bool get_bool (std::string key)
 
int get_int (std::string key)
 
double get_double (std::string key)
 
std::string get_str (std::string key)
 
int * get_int_array (std::string key)
 
void fill_int_array (std::string key, int *empty_array)
 
std::vector< int > get_int_vector (std::string key)
 
double * get_double_array (std::string key)
 
std::vector< double > get_double_vector (std::string key)
 
const char * get_cstr (std::string key)
 
Dataoperator[] (std::string key)
 
std::string to_string () const
 
std::string globals_to_string () const
 
void print ()
 
void print_globals ()
 
std::vector< std::string > list_globals ()
 

Private Types

typedef std::map< std::string,
Data >::iterator 
iterator
 
typedef std::map< std::string,
Data >::const_iterator 
const_iterator
 
typedef std::map< std::string,
std::map< std::string, Data >
>::const_iterator 
const_mod_iterator
 

Private Attributes

bool edit_globals_
 
std::map< std::string, Dataall_local_options_
 A temporary map used for validation of local options. More...
 
std::string current_module_
 The module that's active right now. More...
 
std::map< std::string,
std::map< std::string, Data > > 
locals_
 "Active" set of options More...
 
std::map< std::string, Dataglobals_
 "Global" set of options More...
 

Member Typedef Documentation

typedef std::map<std::string, Data>::const_iterator psi::Options::const_iterator
private
typedef std::map<std::string, std::map<std::string, Data> >::const_iterator psi::Options::const_mod_iterator
private
typedef std::map<std::string, Data>::iterator psi::Options::iterator
private

Constructor & Destructor Documentation

psi::Options::Options ( )

Member Function Documentation

void psi::Options::add ( std::string  key,
DataType data 
)
void psi::Options::add ( std::string  key,
bool  b 
)
void psi::Options::add ( std::string  key,
int  i 
)
void psi::Options::add ( std::string  key,
double  d 
)
void psi::Options::add ( std::string  key,
std::string  s,
std::string  c = "" 
)
void psi::Options::add_array ( std::string  key)
void psi::Options::add_bool ( std::string  key,
bool  b 
)
void psi::Options::add_double ( std::string  key,
double  d 
)
void psi::Options::add_i ( std::string  key,
std::string  s,
std::string  c = "" 
)
void psi::Options::add_int ( std::string  key,
int  i 
)
void psi::Options::add_str ( std::string  key,
std::string  s,
std::string  c = "" 
)
void psi::Options::add_str_i ( std::string  key,
std::string  s,
std::string  c = "" 
)
void psi::Options::clear ( void  )
bool psi::Options::exists ( std::string  key)
bool psi::Options::exists_in_active ( std::string  key)
bool psi::Options::exists_in_global ( std::string  key)
void psi::Options::fill_int_array ( std::string  key,
int *  empty_array 
)
Data & psi::Options::get ( std::string  key)
Data & psi::Options::get ( std::map< std::string, Data > &  m,
std::string &  key 
)
bool psi::Options::get_bool ( std::string  key)
const char * psi::Options::get_cstr ( std::string  key)
double psi::Options::get_double ( std::string  key)
double * psi::Options::get_double_array ( std::string  key)
std::vector< double > psi::Options::get_double_vector ( std::string  key)
Data & psi::Options::get_global ( std::string  key)
int psi::Options::get_int ( std::string  key)
int * psi::Options::get_int_array ( std::string  key)
std::vector< int > psi::Options::get_int_vector ( std::string  key)
Data & psi::Options::get_local ( std::string &  key)
std::string psi::Options::get_str ( std::string  key)
std::string psi::Options::globals_to_string ( ) const
std::vector< std::string > psi::Options::list_globals ( )
Options & psi::Options::operator= ( const Options rhs)
Data & psi::Options::operator[] ( std::string  key)
void psi::Options::print ( void  )
void psi::Options::print_globals ( )
bool psi::Options::read_globals ( ) const
void psi::Options::set_array ( const std::string &  module,
const std::string &  key 
)
void psi::Options::set_bool ( const std::string &  module,
const std::string &  key,
bool  b 
)
void psi::Options::set_current_module ( const std::string  s)
void psi::Options::set_double ( const std::string &  module,
const std::string &  key,
double  d 
)
void psi::Options::set_global_array ( const std::string &  key)
DataType * psi::Options::set_global_array_array ( std::string  key,
DataType entry 
)
void psi::Options::set_global_array_double ( std::string  key,
double  val,
DataType entry 
)
DataType * psi::Options::set_global_array_entry ( const std::string &  key,
DataType entry,
DataType loc 
)
void psi::Options::set_global_array_int ( std::string  key,
int  val,
DataType entry 
)
void psi::Options::set_global_array_string ( std::string  key,
std::string  val,
DataType entry 
)
void psi::Options::set_global_bool ( const std::string &  key,
bool  b 
)
void psi::Options::set_global_double ( const std::string &  key,
double  d 
)
void psi::Options::set_global_int ( const std::string &  key,
int  i 
)
void psi::Options::set_global_python ( const std::string &  key,
const py::object &  p 
)
void psi::Options::set_global_str ( const std::string &  key,
const std::string &  s 
)
void psi::Options::set_int ( const std::string &  module,
const std::string &  key,
int  i 
)
DataType * psi::Options::set_local_array_array ( const std::string &  module,
const std::string &  key,
DataType entry 
)
void psi::Options::set_local_array_double ( const std::string &  module,
const std::string &  key,
double  val,
DataType entry 
)
DataType * psi::Options::set_local_array_entry ( const std::string &  module,
const std::string &  key,
DataType entry,
DataType loc 
)
void psi::Options::set_local_array_int ( const std::string &  module,
const std::string &  key,
int  val,
DataType entry 
)
void psi::Options::set_local_array_string ( const std::string &  module,
const std::string &  key,
std::string  val,
DataType entry 
)
void psi::Options::set_python ( const std::string &  module,
const std::string &  key,
const py::object &  p 
)
void psi::Options::set_read_globals ( bool  _b)
void psi::Options::set_str ( const std::string &  module,
const std::string &  key,
std::string  s 
)
void psi::Options::set_str_i ( const std::string &  module,
const std::string &  key,
std::string  s 
)
std::string psi::Options::to_string ( ) const
void psi::Options::to_upper ( std::string &  str)
Data & psi::Options::use ( std::string &  key)

"Active" set of options

"Global" set of options

Data & psi::Options::use_local ( std::string &  key)
void psi::Options::validate_options ( )

Member Data Documentation

std::map<std::string, Data> psi::Options::all_local_options_
private

A temporary map used for validation of local options.

std::string psi::Options::current_module_
private

The module that's active right now.

bool psi::Options::edit_globals_
private
std::map<std::string, Data> psi::Options::globals_
private

"Global" set of options

std::map<std::string, std::map<std::string, Data> > psi::Options::locals_
private

"Active" set of options


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