foobar2000 SDK
2015-08-03
|
#include <cfg_var.h>
Public Member Functions | |
cfg_int_t (const GUID &p_guid, t_inttype p_default) | |
t_inttype | get_value () const |
operator t_inttype () const | |
const cfg_int_t< t_inttype > & | operator= (const cfg_int_t< t_inttype > &p_val) |
t_inttype | operator= (t_inttype p_val) |
![]() | |
GUID | get_guid () const |
![]() | |
cfg_var_reader (const GUID &guid) | |
~cfg_var_reader () | |
![]() | |
cfg_var_writer (const GUID &guid) | |
~cfg_var_writer () | |
Protected Member Functions | |
void | get_data_raw (stream_writer *p_stream, abort_callback &p_abort) |
void | set_data_raw (stream_reader *p_stream, t_size p_sizehint, abort_callback &p_abort) |
![]() | |
cfg_var (const GUID &p_guid) | |
Private Attributes | |
t_inttype | m_val |
Additional Inherited Members | |
![]() | |
static void | config_read_file (stream_reader *p_stream, abort_callback &p_abort) |
![]() | |
static void | config_write_file (stream_writer *p_stream, abort_callback &p_abort) |
![]() | |
const GUID | m_guid |
![]() | |
const GUID | m_guid |
Generic integer config variable class. Template parameter can be used to specify integer type to use.
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).
|
inlineexplicit |
p_guid | GUID 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. |
p_default | Default value of the variable. |
Definition at line 79 of file cfg_var.h.
|
inlineprotectedvirtual |
Retrieves state of the variable. Called only from main thread, when writing configuration file.
p_stream | Stream receiving state of the variable. |
Implements cfg_var_writer.
Definition at line 69 of file cfg_var.h.
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineprotectedvirtual |
Sets state of the variable. Called only from main thread, when reading configuration file.
p_stream | Stream containing new state of the variable. |
p_sizehint | Number of bytes contained in the stream; reading past p_sizehint bytes will fail (EOF). |
Implements cfg_var_reader.
|
private |