foobar2000 SDK  2015-08-03
Public Member Functions | Private Member Functions | Private Attributes
pfc::string_list_impl

#include <string_list.h>

+ Inheritance diagram for pfc::string_list_impl:

Public Member Functions

 string_list_impl ()
 
template<typename t_what >
 string_list_impl (const t_what &p_source)
 
void add_item (const char *p_string)
 
template<typename t_what >
void add_items (const t_what &p_source)
 
t_size get_count () const
 
void get_item_ex (const char *&p_out, t_size n) const
 
template<typename t_what >
string_list_imploperator+= (const t_what &p_source)
 
template<typename t_what >
string_list_imploperator= (const t_what &p_source)
 
const char * operator[] (t_size n) const
 
template<typename t_what >
string_list_imploperator|= (const string_list_impl &p_source)
 
void remove_all ()
 
- Public Member Functions inherited from pfc::list_base_const_t< const char * >
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
 
const char * 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
 
const char * 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
 

Private Member Functions

template<typename t_what >
void _append (const t_what &p_source)
 
template<typename t_what >
void _copy (const t_what &p_source)
 

Private Attributes

pfc::array_t< pfc::string8, pfc::alloc_fastm_data
 

Additional Inherited Members

- Public Types inherited from pfc::list_base_const_t< const char * >
typedef const char * t_item
 
- Static Public Member Functions inherited from pfc::list_base_const_t< const char * >
static bool g_equals (const t_self &item1, const t_self &item2)
 
- Protected Member Functions inherited from pfc::list_base_const_t< const char * >
 list_base_const_t ()
 
 list_base_const_t (const t_self &)
 
 ~list_base_const_t ()
 
void operator= (const t_self &)
 

Detailed Description

Definition at line 8 of file string_list.h.

Constructor & Destructor Documentation

pfc::string_list_impl::string_list_impl ( )
inline

Definition at line 21 of file string_list.h.

21 {}
template<typename t_what >
pfc::string_list_impl::string_list_impl ( const t_what &  p_source)
inline

Definition at line 22 of file string_list.h.

22 {_copy(p_source);}
void _copy(const t_what &p_source)
Definition: string_list.h:34

Member Function Documentation

template<typename t_what >
void pfc::string_list_impl::_append ( const t_what &  p_source)
inlineprivate

Definition at line 28 of file string_list.h.

28  {
29  const t_size toadd = p_source.get_size(), base = m_data.get_size();
30  m_data.set_size(base+toadd);
31  for(t_size n=0;n<toadd;n++) m_data[base+n] = p_source[n];
32  }
pfc::array_t< pfc::string8, pfc::alloc_fast > m_data
Definition: string_list.h:40
size_t t_size
Definition: int_types.h:48
template<typename t_what >
void pfc::string_list_impl::_copy ( const t_what &  p_source)
inlineprivate

Definition at line 34 of file string_list.h.

34  {
35  const t_size newcount = p_source.get_size();
36  m_data.set_size(newcount);
37  for(t_size n=0;n<newcount;n++) m_data[n] = p_source[n];
38  }
pfc::array_t< pfc::string8, pfc::alloc_fast > m_data
Definition: string_list.h:40
size_t t_size
Definition: int_types.h:48
void pfc::string_list_impl::add_item ( const char *  p_string)
inline

Definition at line 15 of file string_list.h.

15 {pfc::append_t(m_data, p_string);}
pfc::array_t< pfc::string8, pfc::alloc_fast > m_data
Definition: string_list.h:40
t_size append_t(t_array &p_array, const T &p_item)
Definition: primitives.h:473
template<typename t_what >
void pfc::string_list_impl::add_items ( const t_what &  p_source)
inline

Definition at line 17 of file string_list.h.

17 {_append(p_source);}
void _append(const t_what &p_source)
Definition: string_list.h:28
t_size pfc::string_list_impl::get_count ( ) const
inlinevirtual

Implements pfc::list_base_const_t< const char * >.

Definition at line 11 of file string_list.h.

11 {return m_data.get_size();}
pfc::array_t< pfc::string8, pfc::alloc_fast > m_data
Definition: string_list.h:40
void pfc::string_list_impl::get_item_ex ( const char *&  p_out,
t_size  n 
) const
inlinevirtual

Implements pfc::list_base_const_t< const char * >.

Definition at line 12 of file string_list.h.

12 {p_out = m_data[n];}
pfc::array_t< pfc::string8, pfc::alloc_fast > m_data
Definition: string_list.h:40
template<typename t_what >
string_list_impl& pfc::string_list_impl::operator+= ( const t_what &  p_source)
inline

Definition at line 25 of file string_list.h.

25 {pfc::append_t(m_data, p_source); return *this;}
pfc::array_t< pfc::string8, pfc::alloc_fast > m_data
Definition: string_list.h:40
t_size append_t(t_array &p_array, const T &p_item)
Definition: primitives.h:473
template<typename t_what >
string_list_impl& pfc::string_list_impl::operator= ( const t_what &  p_source)
inline

Definition at line 23 of file string_list.h.

23 {_copy(p_source); return *this;}
void _copy(const t_what &p_source)
Definition: string_list.h:34
const char* pfc::string_list_impl::operator[] ( t_size  n) const
inline

Definition at line 14 of file string_list.h.

14 {return m_data[n];}
pfc::array_t< pfc::string8, pfc::alloc_fast > m_data
Definition: string_list.h:40
template<typename t_what >
string_list_impl& pfc::string_list_impl::operator|= ( const string_list_impl p_source)
inline

Definition at line 24 of file string_list.h.

24 {_append(p_source); return *this;}
void _append(const t_what &p_source)
Definition: string_list.h:28
void pfc::string_list_impl::remove_all ( )
inline

Definition at line 19 of file string_list.h.

19 {m_data.set_size(0);}
pfc::array_t< pfc::string8, pfc::alloc_fast > m_data
Definition: string_list.h:40

Field Documentation

pfc::array_t<pfc::string8,pfc::alloc_fast> pfc::string_list_impl::m_data
private

Definition at line 40 of file string_list.h.


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