foobar2000 SDK  2015-08-03
Public Member Functions | Private Attributes
_meta_table_enum_wrapper_RG

#include <meta_table_builder.h>

Public Member Functions

 _meta_table_enum_wrapper_RG (file_info &p_info)
 
template<typename t_values >
void operator() (const char *p_name, const t_values &p_values)
 

Private Attributes

file_infom_info
 

Detailed Description

Definition at line 16 of file meta_table_builder.h.

Constructor & Destructor Documentation

_meta_table_enum_wrapper_RG::_meta_table_enum_wrapper_RG ( file_info p_info)
inline

Definition at line 18 of file meta_table_builder.h.

18 : m_info(p_info) {}

Member Function Documentation

template<typename t_values >
void _meta_table_enum_wrapper_RG::operator() ( const char *  p_name,
const t_values &  p_values 
)
inline

Definition at line 20 of file meta_table_builder.h.

20  {
21  if (p_values.get_count() > 0) {
22  if (!m_info.info_set_replaygain(p_name, *p_values.first())) {
23  t_size index = ~0;
24  for(typename t_values::const_iterator iter = p_values.first(); iter.is_valid(); ++iter) {
25  if (index == ~0) index = m_info.__meta_add_unsafe(p_name,*iter);
26  else m_info.meta_add_value(index,*iter);
27  }
28  }
29  }
30  }
void meta_add_value(t_size p_index, const char *p_value)
Definition: file_info.h:159
bool info_set_replaygain(const char *p_name, const char *p_value)
Definition: file_info.h:174
t_size __meta_add_unsafe(const char *p_name, const char *p_value)
Unsafe - does not check whether the field already exists and will result in duplicates if it does - c...
Definition: file_info.h:238
size_t t_size
Definition: int_types.h:48

Field Documentation

file_info& _meta_table_enum_wrapper_RG::m_info
private

Definition at line 32 of file meta_table_builder.h.


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