foobar2000 SDK  2015-08-03
Public Types | Public Member Functions
cfg_objListEx< TList >

#include <cfg_var.h>

+ Inheritance diagram for cfg_objListEx< TList >:

Public Types

typedef cfg_objListEx< TListt_self
 

Public Member Functions

 cfg_objListEx (const GUID &guid)
 
void get_data_raw (stream_writer *p_stream, abort_callback &p_abort)
 
template<typename t_in >
t_selfoperator+= (t_in const &p_source)
 
template<typename t_in >
t_selfoperator= (t_in const &source)
 
template<typename t_in >
t_selfoperator|= (t_in const &p_source)
 
void set_data_raw (stream_reader *p_stream, t_size p_sizehint, abort_callback &p_abort)
 
- Public Member Functions inherited from cfg_var
GUID get_guid () const
 
- Public Member Functions inherited from cfg_var_reader
 cfg_var_reader (const GUID &guid)
 
 ~cfg_var_reader ()
 
- Public Member Functions inherited from cfg_var_writer
 cfg_var_writer (const GUID &guid)
 
 ~cfg_var_writer ()
 

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
 
- Protected Member Functions inherited from cfg_var
 cfg_var (const GUID &p_guid)
 

Detailed Description

template<typename TList>
class cfg_objListEx< TList >

Definition at line 201 of file cfg_var.h.

Member Typedef Documentation

template<typename TList >
typedef cfg_objListEx<TList> cfg_objListEx< TList >::t_self

Definition at line 203 of file cfg_var.h.

Constructor & Destructor Documentation

template<typename TList >
cfg_objListEx< TList >::cfg_objListEx ( const GUID guid)
inline

Definition at line 204 of file cfg_var.h.

204 : cfg_var(guid) {}
cfg_var(const GUID &p_guid)
Definition: cfg_var.h:57

Member Function Documentation

template<typename TList >
void cfg_objListEx< TList >::get_data_raw ( stream_writer p_stream,
abort_callback p_abort 
)
inlinevirtual

Retrieves state of the variable. Called only from main thread, when writing configuration file.

Parameters
p_streamStream receiving state of the variable.

Implements cfg_var_writer.

Definition at line 205 of file cfg_var.h.

205  {
206  stream_writer_formatter<> out(*p_stream,p_abort);
207  out << pfc::downcast_guarded<t_uint32>(this->get_count());
208  for(typename TList::const_iterator walk = this->first(); walk.is_valid(); ++walk) out << *walk;
209  }
template<typename TList >
template<typename t_in >
t_self& cfg_objListEx< TList >::operator+= ( t_in const &  p_source)
inline

Definition at line 219 of file cfg_var.h.

219 {this->add_item(p_source); return *this;}
template<typename TList >
template<typename t_in >
t_self& cfg_objListEx< TList >::operator= ( t_in const &  source)
inline

Definition at line 218 of file cfg_var.h.

218 {this->remove_all(); this->add_items(source); return *this;}
template<typename TList >
template<typename t_in >
t_self& cfg_objListEx< TList >::operator|= ( t_in const &  p_source)
inline

Definition at line 220 of file cfg_var.h.

220 {this->add_items(p_source); return *this;}
template<typename TList >
void cfg_objListEx< TList >::set_data_raw ( stream_reader p_stream,
t_size  p_sizehint,
abort_callback p_abort 
)
inlinevirtual

Sets state of the variable. Called only from main thread, when reading configuration file.

Parameters
p_streamStream containing new state of the variable.
p_sizehintNumber of bytes contained in the stream; reading past p_sizehint bytes will fail (EOF).

Implements cfg_var_reader.

Definition at line 210 of file cfg_var.h.

210  {
211  this->remove_all();
212  stream_reader_formatter<> in(*p_stream,p_abort);
213  t_uint32 count; in >> count;
214  for(t_uint32 walk = 0; walk < count; ++walk) {
215  typename TList::t_item item; in >> item; this->add_item(item);
216  }
217  }
uint32_t t_uint32
Definition: int_types.h:5

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