foobar2000 SDK  2015-08-03
Public Member Functions | Protected Member Functions
cfg_var

#include <cfg_var.h>

+ Inheritance diagram for cfg_var:

Public Member Functions

GUID get_guid () const
 
- Public Member Functions inherited from cfg_var_reader
 cfg_var_reader (const GUID &guid)
 
 ~cfg_var_reader ()
 
virtual void set_data_raw (stream_reader *p_stream, t_size p_sizehint, abort_callback &p_abort)=0
 
- Public Member Functions inherited from cfg_var_writer
 cfg_var_writer (const GUID &guid)
 
 ~cfg_var_writer ()
 
virtual void get_data_raw (stream_writer *p_stream, abort_callback &p_abort)=0
 

Protected Member Functions

 cfg_var (const GUID &p_guid)
 

Additional Inherited Members

- Static Public Member Functions inherited from cfg_var_reader
static void config_read_file (stream_reader *p_stream, abort_callback &p_abort)
 
- Static Public Member Functions inherited from cfg_var_writer
static void config_write_file (stream_writer *p_stream, abort_callback &p_abort)
 
- Data Fields inherited from cfg_var_reader
const GUID m_guid
 
- Data Fields inherited from cfg_var_writer
const GUID m_guid
 

Detailed Description

Base class for configuration variable classes; provides self-registration mechaisms and methods to set/retrieve configuration data; those methods are automatically called for all registered instances by backend when configuration file is being read or written.
Note that cfg_var class and its derivatives may be only instantiated statically (as static objects or members of other static objects), NEVER dynamically (operator new, local variables, members of objects instantiated as such).

Definition at line 54 of file cfg_var.h.

Constructor & Destructor Documentation

cfg_var::cfg_var ( const GUID p_guid)
inlineprotected
Parameters
p_guidGUID of the variable, used to identify variable implementations owning specific configuration file entries when reading the configuration file back. You must generate a new GUID every time you declare a new cfg_var.

Definition at line 57 of file cfg_var.h.

57 : cfg_var_reader(p_guid), cfg_var_writer(p_guid) {}
cfg_var_writer(const GUID &guid)
Definition: cfg_var.h:34
cfg_var_reader(const GUID &guid)
Definition: cfg_var.h:11

Member Function Documentation

GUID cfg_var::get_guid ( ) const
inline

Definition at line 59 of file cfg_var.h.

59 {return cfg_var_reader::m_guid;}
const GUID m_guid
Definition: cfg_var.h:22

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