GNU Radio 3.5.1 C++ API
gr_prefs Class Reference

Base class for representing user preferences a la windows INI files.The real implementation is in Python, and is accessable from C++ via the magic of SWIG directors. More...

#include <gr_prefs.h>

List of all members.

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_prefssingleton ()
static void set_singleton (gr_prefs *p)

Detailed Description

Base class for representing user preferences a la windows INI files.

The real implementation is in Python, and is accessable from C++ via the magic of SWIG directors.


Constructor & Destructor Documentation

virtual gr_prefs::~gr_prefs ( ) [virtual]

Member Function Documentation

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.

virtual 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.

virtual 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.

virtual const std::string gr_prefs::get_string ( const std::string  section,
const std::string  option,
const std::string  default_val 
) [virtual]

If option exists return associated value; else default_val.

virtual bool gr_prefs::has_option ( const std::string  section,
const std::string  option 
) [virtual]

Does option exist?

virtual bool gr_prefs::has_section ( const std::string  section) [virtual]

Does section exist?

static void gr_prefs::set_singleton ( gr_prefs p) [static]
static gr_prefs* gr_prefs::singleton ( ) [static]

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