foobar2000 SDK  2015-01-14
Public Member Functions
cfg_guidlist

#include <cfg_guidlist.h>

+ Inheritance diagram for cfg_guidlist:

Public Member Functions

 cfg_guidlist (const GUID &p_guid)
 
void get_data_raw (stream_writer *p_stream, abort_callback &p_abort)
 
bool have_item_bsearch (const GUID &p_item)
 
void set_data_raw (stream_reader *p_stream, t_size p_sizehint, abort_callback &p_abort)
 
void sort ()
 
- 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 ()
 
- Public Member Functions inherited from pfc::list_t< GUID >
t_selfoperator+= (t_in const &p_source)
 
t_selfoperator= (t_in const &source)
 
t_selfoperator|= (t_in const &p_source)
 
- Public Member Functions inherited from pfc::list_impl_t< GUID, array_t< GUID, alloc_fast > >
 list_impl_t ()
 
 list_impl_t (const t_self &p_source)
 
t_size _insert_item_t (const t_in &item, t_size idx)
 
t_size _insert_items_v (const list_base_const_t< GUID > &source, t_size base)
 
t_size add_item (const GUID &item)
 
t_size add_item (const t_in &item)
 
void add_items (const t_in &in)
 
void filter_mask (const bit_array &mask)
 
void filter_mask (const bool *mask)
 
t_size find_duplicates_sorted_permutation_t (t_compare p_compare, t_permutation p_permutation, bit_array_var &p_out)
 
t_size find_duplicates_sorted_t (t_compare p_compare, bit_array_var &p_out) const
 
t_size find_item (const t_search &p_item) const
 
t_size get_count () const
 
GUID get_item (t_size n) const
 
void get_item_ex (GUID &p_out, t_size n) const
 
const GUIDget_item_ref (t_size n) const
 
void get_items_mask (list_impl_t< GUID, array_t< GUID, alloc_fast > > &out, const bit_array &mask)
 
const GUIDget_ptr () const
 
GUIDget_ptr ()
 
t_size get_size () const
 
bool have_item (const t_search &p_item) const
 
t_size insert_item (const t_in &item, t_size idx)
 
t_size insert_item (const GUID &item, t_size idx)
 
t_size insert_items (const list_base_const_t< GUID > &source, t_size base)
 
t_size insert_items (const list_base_t< GUID > &source, t_size base)
 
t_size insert_items (const t_in &source, t_size base)
 
void move_from (t_self &other)
 
t_selfoperator+= (t_in const &p_source)
 
t_selfoperator= (t_in const &source)
 
const GUIDoperator[] (t_size n) const
 
GUIDoperator[] (t_size n)
 
t_selfoperator|= (t_in const &p_source)
 
void prealloc (t_size count)
 
void remove_all ()
 
GUID remove_by_idx (t_size idx)
 
void remove_from_idx (t_size idx, t_size num)
 
void remove_item (const GUID &item)
 
void remove_mask (const bit_array &mask)
 
void remove_mask (const bool *mask)
 
void reorder_partial (t_size p_base, const t_size *p_order, t_size p_count)
 
void replace_item (t_size idx, const GUID &item)
 
void set_count (t_size p_count)
 
void set_size (t_size p_count)
 
void sort ()
 
void sort (typename t_base::sort_callback &p_callback)
 
void sort_stable (typename t_base::sort_callback &p_callback)
 
void sort_stable_t (t_compare p_compare)
 
void sort_t (t_compare p_compare)
 
void swap_item_with (t_size p_index, GUID &p_item)
 
void swap_items (t_size p_index1, t_size p_index2)
 
- Public Member Functions inherited from pfc::list_base_t< GUID >
t_size add_item (const GUID &item)
 
t_size add_items (const list_base_const_t< GUID > &items)
 
t_size add_items_fromptr (const GUID *source, t_size num)
 
t_size add_items_repeat (GUIDitem, t_size num)
 
void for_each (t_func p_func)
 
void for_each (t_func p_func, const bit_array &p_mask)
 
t_size insert_item (const GUID &item, t_size base)
 
t_size insert_items_fromptr (const GUID *source, t_size num, t_size base)
 
t_size insert_items_repeat (const GUID &item, t_size num, t_size base)
 
t_selfoperator+= (t_in const &p_source)
 
t_selfoperator= (t_in const &source)
 
GUID operator[] (t_size n) const
 
t_selfoperator|= (t_in const &p_source)
 
void remove_all ()
 
void remove_all_ex (t_releasefunc p_func)
 
void remove_duplicates_t (t_compare p_compare)
 
void remove_mask (const bit_array &mask)
 
void remove_mask_ex (const bit_array &p_mask, t_releasefunc p_func)
 
void reorder (const t_size *p_data)
 
GUID replace_item_ex (t_size p_index, const GUID &p_item)
 
virtual void sort (sort_callback &p_callback)=0
 
void sort ()
 
void sort_remove_duplicates_t (t_compare p_compare)
 
virtual void sort_stable (sort_callback &p_callback)=0
 
void sort_stable_remove_duplicates_t (t_compare p_compare)
 
void sort_stable_t (t_compare p_compare)
 
void sort_t (t_compare p_compare)
 
void truncate (t_size val)
 
- Public Member Functions inherited from pfc::list_base_const_t< GUID >
bool bsearch_permutation_t (t_compare p_compare, t_param const &p_param, const t_permutation &p_permutation, t_size &p_index) const
 
bool bsearch_t (t_compare p_compare, t_param const &p_param, t_size &p_index) const
 
void enumerate (t_callback &p_callback) const
 
t_size find_duplicates_sorted_permutation_t (t_compare p_compare, t_permutation const &p_permutation, bit_array_var &p_out)
 
t_size find_duplicates_sorted_t (t_compare p_compare, bit_array_var &p_out) const
 
t_size find_item (const t_search &p_item) const
 
GUID get_item (t_size n) const
 
t_size get_size () const
 
bool have_item (const t_search &p_item) const
 
bool operator!= (const t_self &item2) const
 
bool operator== (const t_self &item2) const
 
GUID operator[] (t_size n) const
 
void sort_get_permutation_t (t_compare p_compare, t_permutation const &p_permutation) const
 
void sort_stable_get_permutation_t (t_compare p_compare, t_permutation const &p_permutation) const
 

Additional Inherited Members

- Public Types inherited from pfc::list_t< GUID >
typedef list_t< GUID, alloc_fastt_self
 
- Public Types inherited from pfc::list_impl_t< GUID, array_t< GUID, alloc_fast > >
typedef list_base_t< GUIDt_base
 
typedef list_impl_t< GUID, array_t< GUID, alloc_fast > > t_self
 
- Public Types inherited from pfc::list_base_const_t< GUID >
typedef GUID t_item
 
- 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)
 
- Static Public Member Functions inherited from pfc::list_impl_t< GUID, array_t< GUID, alloc_fast > >
static void g_swap (list_impl_t< GUID, array_t< GUID, alloc_fast > > &p_item1, list_impl_t< GUID, array_t< GUID, alloc_fast > > &p_item2)
 
- Static Public Member Functions inherited from pfc::list_base_const_t< GUID >
static bool g_equals (const t_self &item1, const t_self &item2)
 
- 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)
 
- Protected Member Functions inherited from pfc::list_base_t< GUID >
 list_base_t ()
 
 list_base_t (const t_self &)
 
 ~list_base_t ()
 
void operator= (const t_self &)
 
- Protected Member Functions inherited from pfc::list_base_const_t< GUID >
 list_base_const_t ()
 
 list_base_const_t (const t_self &)
 
 ~list_base_const_t ()
 
void operator= (const t_self &)
 
- Protected Attributes inherited from pfc::list_impl_t< GUID, array_t< GUID, alloc_fast > >
array_t< GUID, alloc_fastm_buffer
 

Detailed Description

Definition at line 1 of file cfg_guidlist.h.

Constructor & Destructor Documentation

cfg_guidlist::cfg_guidlist ( const GUID p_guid)
inline

Definition at line 28 of file cfg_guidlist.h.

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

Member Function Documentation

void cfg_guidlist::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 4 of file cfg_guidlist.h.

4  {
5  t_uint32 n, m = pfc::downcast_guarded<t_uint32>(get_count());
6  p_stream->write_lendian_t(m,p_abort);
7  for(n=0;n<m;n++) p_stream->write_lendian_t(get_item(n),p_abort);
8  }
uint32_t t_uint32
Definition: int_types.h:5
bool cfg_guidlist::have_item_bsearch ( const GUID p_item)
inline

Definition at line 22 of file cfg_guidlist.h.

22  {
23  t_size dummy;
24  return bsearch_t(pfc::guid_compare,p_item,dummy);
25  }
bool bsearch_t(t_compare p_compare, t_param const &p_param, t_size &p_index) const
Definition: list.h:45
int guid_compare(const GUID &g1, const GUID &g2)
Definition: guid.h:18
size_t t_size
Definition: int_types.h:48
void cfg_guidlist::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 9 of file cfg_guidlist.h.

9  {
10  t_uint32 n,count;
11  p_stream->read_lendian_t(count,p_abort);
12  m_buffer.set_size(count);
13  for(n=0;n<count;n++) {
14  try {
15  p_stream->read_lendian_t(m_buffer[n],p_abort);
16  } catch(...) {m_buffer.set_size(0); throw;}
17  }
18  }
void set_size(t_size p_size)
Definition: array.h:104
uint32_t t_uint32
Definition: int_types.h:5
void cfg_guidlist::sort ( )
inline

Definition at line 20 of file cfg_guidlist.h.

int guid_compare(const GUID &g1, const GUID &g2)
Definition: guid.h:18

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