foobar2000 SDK  2015-08-03
Public Member Functions | Private Attributes
file_info_impl_utils::meta_storage

#include <file_info_impl.h>

Public Member Functions

t_size add_entry (const char *p_name, t_size p_name_length, const char *p_value, t_size p_value_length)
 
void copy_from (const file_info &p_info)
 
t_size get_count () const
 
const char * get_name (t_size p_index) const
 
const char * get_value (t_size p_index, t_size p_value_index) const
 
t_size get_value_count (t_size p_index) const
 
void insert_value (t_size p_index, t_size p_value_index, const char *p_value, t_size p_value_length)
 
void modify_value (t_size p_index, t_size p_value_index, const char *p_value, t_size p_value_length)
 
void remove_mask (const bit_array &p_mask)
 
void remove_values (t_size p_index, const bit_array &p_mask)
 
void reorder (const t_size *p_order)
 

Private Attributes

meta_entry_array m_data
 

Detailed Description

Definition at line 69 of file file_info_impl.h.

Member Function Documentation

t_size file_info_impl_utils::meta_storage::add_entry ( const char *  p_name,
t_size  p_name_length,
const char *  p_value,
t_size  p_value_length 
)

Definition at line 155 of file file_info_impl.cpp.

156 {
157  meta_entry temp(p_name,p_name_length,p_value,p_value_length);
158  return pfc::append_swap_t(m_data,temp);
159 }
t_size append_swap_t(t_array &p_array, T &p_item)
Definition: primitives.h:482
void file_info_impl_utils::meta_storage::copy_from ( const file_info p_info)

Definition at line 222 of file file_info_impl.cpp.

223 {
224  t_size meta_index,meta_count = p_info.meta_get_count();
225  m_data.set_size(meta_count);
226  for(meta_index=0;meta_index<meta_count;meta_index++)
227  {
228  meta_entry & entry = m_data[meta_index];
229  t_size value_index,value_count = p_info.meta_enum_value_count(meta_index);
230  entry.m_name = p_info.meta_enum_name(meta_index);
231  entry.m_values.set_size(value_count);
232  for(value_index=0;value_index<value_count;value_index++)
233  entry.m_values[value_index] = p_info.meta_enum_value(meta_index,value_index);
234  }
235 }
virtual t_size meta_enum_value_count(t_size p_index) const =0
Retrieves count of values in metadata entry of specified index. The value is always equal to or great...
virtual const char * meta_enum_value(t_size p_index, t_size p_value_number) const =0
Retrieves specified value from specified metadata entry. Return value is a null-terminated UTF-8 enco...
size_t t_size
Definition: int_types.h:48
void set_size(t_size p_size)
Definition: array.h:104
virtual t_size meta_get_count() const =0
Retrieves count of metadata entries.
virtual const char * meta_enum_name(t_size p_index) const =0
Retrieves the name of metadata entry of specified index. Return value is a null-terminated UTF-8 enco...
t_size file_info_impl_utils::meta_storage::get_count ( ) const
inline

Definition at line 81 of file file_info_impl.h.

81 {return m_data.get_size();}
t_size get_size() const
Definition: array.h:130
const char* file_info_impl_utils::meta_storage::get_name ( t_size  p_index) const
inline

Definition at line 83 of file file_info_impl.h.

83 {PFC_ASSERT(p_index < m_data.get_size()); return m_data[p_index].get_name();}
t_size get_size() const
Definition: array.h:130
const char* file_info_impl_utils::meta_storage::get_value ( t_size  p_index,
t_size  p_value_index 
) const
inline

Definition at line 84 of file file_info_impl.h.

84 {PFC_ASSERT(p_index < m_data.get_size()); return m_data[p_index].get_value(p_value_index);}
t_size get_size() const
Definition: array.h:130
t_size file_info_impl_utils::meta_storage::get_value_count ( t_size  p_index) const
inline

Definition at line 85 of file file_info_impl.h.

85 {PFC_ASSERT(p_index < m_data.get_size()); return m_data[p_index].get_value_count();}
t_size get_size() const
Definition: array.h:130
void file_info_impl_utils::meta_storage::insert_value ( t_size  p_index,
t_size  p_value_index,
const char *  p_value,
t_size  p_value_length 
)

Definition at line 161 of file file_info_impl.cpp.

162 {
163  m_data[p_index].insert_value(p_value_index,p_value,p_value_length);
164 }
void file_info_impl_utils::meta_storage::modify_value ( t_size  p_index,
t_size  p_value_index,
const char *  p_value,
t_size  p_value_length 
)

Definition at line 166 of file file_info_impl.cpp.

167 {
168  m_data[p_index].modify_value(p_value_index,p_value,p_value_length);
169 }
void file_info_impl_utils::meta_storage::remove_mask ( const bit_array p_mask)

Definition at line 176 of file file_info_impl.cpp.

177 {
178  pfc::remove_mask_t(m_data,p_mask);
179 }
t_size remove_mask_t(t_array &p_array, const bit_array &p_mask)
Definition: primitives.h:719
void file_info_impl_utils::meta_storage::remove_values ( t_size  p_index,
const bit_array p_mask 
)

Definition at line 171 of file file_info_impl.cpp.

172 {
173  m_data[p_index].remove_values(p_mask);
174 }
void file_info_impl_utils::meta_storage::reorder ( const t_size p_order)
inline

Definition at line 207 of file file_info_impl.cpp.

208 {
210 }
void reorder_t(t_container &p_data, const t_size *p_order, t_size p_count)
Definition: sort.h:42
t_size get_size() const
Definition: array.h:130

Field Documentation

meta_entry_array file_info_impl_utils::meta_storage::m_data
private

Definition at line 88 of file file_info_impl.h.


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