#include <gr_prefs.h>
The real implementation is in Python, and is accessable from C++ via the magic of SWIG directors.
Public Member Functions | |
virtual | ~gr_prefs () |
virtual bool | has_section (const std::string section) |
Does section exist? | |
virtual bool | has_option (const std::string section, const std::string option) |
Does option exist? | |
virtual const std::string | get_string (const std::string section, const std::string option, const std::string default_val) |
If option exists return associated value; else default_val. | |
virtual bool | get_bool (const std::string section, const std::string option, bool default_val) |
If option exists and value can be converted to bool, return it; else default_val. | |
virtual long | get_long (const std::string section, const std::string option, long default_val) |
If option exists and value can be converted to long, return it; else default_val. | |
virtual double | get_double (const std::string section, const std::string option, double default_val) |
If option exists and value can be converted to double, return it; else default_val. | |
Static Public Member Functions | |
static gr_prefs * | singleton () |
static void | set_singleton (gr_prefs *p) |
gr_prefs::~gr_prefs | ( | ) | [virtual] |
gr_prefs * gr_prefs::singleton | ( | ) | [static] |
void gr_prefs::set_singleton | ( | gr_prefs * | p | ) | [static] |
bool gr_prefs::has_section | ( | const std::string | section | ) | [virtual] |
bool gr_prefs::has_option | ( | const std::string | section, | |
const std::string | option | |||
) | [virtual] |
const std::string gr_prefs::get_string | ( | const std::string | section, | |
const std::string | option, | |||
const std::string | default_val | |||
) | [virtual] |
bool gr_prefs::get_bool | ( | const std::string | section, | |
const std::string | option, | |||
bool | default_val | |||
) | [virtual] |
If option exists and value can be converted to bool, return it; else default_val.
Reimplemented in SwigDirector_gr_prefs.
Referenced by audio_alsa_sink::audio_alsa_sink(), and audio_alsa_source::audio_alsa_source().
long gr_prefs::get_long | ( | const std::string | section, | |
const std::string | option, | |||
long | default_val | |||
) | [virtual] |
If option exists and value can be converted to long, return it; else default_val.
Reimplemented in SwigDirector_gr_prefs.
double gr_prefs::get_double | ( | const std::string | section, | |
const std::string | option, | |||
double | default_val | |||
) | [virtual] |
If option exists and value can be converted to double, return it; else default_val.
Reimplemented in SwigDirector_gr_prefs.