foobar2000 SDK  2015-08-03
Functions | Variables
file_info_const_impl.cpp File Reference

Go to the source code of this file.

Functions

static const char * optimize_fieldname (const char *p_string)
 
static const char * optimize_infoname (const char *p_string)
 
static char * stringbuffer_append (char *&buffer, const char *value)
 

Variables

static const char *const standard_fieldnames []
 
static const char *const standard_infonames []
 

Function Documentation

static const char* optimize_fieldname ( const char *  p_string)
static

Definition at line 15 of file file_info_const_impl.cpp.

15  {
16  t_size index;
17  if (!pfc::binarySearch<pfc::comparator_strcmp>::run(standard_fieldnames,0,PFC_TABSIZE(standard_fieldnames),p_string,index)) return NULL;
18  return standard_fieldnames[index];
19 }
static const char *const standard_fieldnames[]
size_t t_size
Definition: int_types.h:48
static const char* optimize_infoname ( const char *  p_string)
static

Definition at line 21 of file file_info_const_impl.cpp.

21  {
22  t_size index;
23  if (!pfc::binarySearch<pfc::comparator_strcmp>::run(standard_infonames,0,PFC_TABSIZE(standard_infonames),p_string,index)) return NULL;
24  return standard_infonames[index];
25 }
size_t t_size
Definition: int_types.h:48
static const char *const standard_infonames[]
static char* stringbuffer_append ( char *&  buffer,
const char *  value 
)
inlinestatic

Definition at line 37 of file file_info_const_impl.cpp.

38 {
39  char * ret = buffer;
40  while(*value) *(buffer++) = *(value++);
41  *(buffer++) = 0;
42  return ret;
43 }

Variable Documentation

const char* const standard_fieldnames[]
static
Initial value:
= {
"ALBUM","ALBUM ARTIST","ARTIST","Album","Album Artist","Artist","COMMENT","Comment","DATE","DISCNUMBER","Date",
"Discnumber","GENRE","Genre","TITLE","TOTALTRACKS","TRACKNUMBER","Title","TotalTracks","Totaltracks","TrackNumber",
"Tracknumber","album","album artist","artist","comment","date","discnumber","genre","title","totaltracks","tracknumber",
}

Definition at line 4 of file file_info_const_impl.cpp.

const char* const standard_infonames[]
static
Initial value:
= {
"bitrate","bitspersample","channels","codec","codec_profile","encoding","samplerate","tagtype","tool",
}

Definition at line 11 of file file_info_const_impl.cpp.