foobar2000 SDK  2015-01-14
Public Member Functions | Static Public Member Functions
titleformat_text_filter_nontext_chars

#include <titleformat.h>

+ Inheritance diagram for titleformat_text_filter_nontext_chars:

Public Member Functions

void write (const GUID &p_inputtype, pfc::string_receiver &p_out, const char *p_data, t_size p_data_length)
 

Static Public Member Functions

static bool isReserved (char c)
 

Additional Inherited Members

- Protected Member Functions inherited from titleformat_text_filter
 titleformat_text_filter ()
 
 ~titleformat_text_filter ()
 

Detailed Description

Definition at line 160 of file titleformat.h.

Member Function Documentation

static bool titleformat_text_filter_nontext_chars::isReserved ( char  c)
inlinestatic

Definition at line 162 of file titleformat.h.

162 { return c >= 0 && c < 0x20; }
void titleformat_text_filter_nontext_chars::write ( const GUID p_inputtype,
pfc::string_receiver p_out,
const char *  p_data,
t_size  p_data_length 
)
virtual

Implements titleformat_text_filter.

Definition at line 181 of file titleformat.cpp.

181  {
182  for(t_size walk = 0;;) {
183  t_size base = walk;
184  while(walk < p_data_length && !isReserved(p_data[walk]) && p_data[walk] != 0) walk++;
185  p_out.add_string(p_data+base,walk-base);
186  if (walk >= p_data_length || p_data[walk] == 0) break;
187  p_out.add_byte('_'); walk++;
188  }
189 }
virtual void add_string(const char *p_string, t_size p_string_size=~0)=0
size_t t_size
Definition: int_types.h:48
void add_byte(char c)
Definition: string_base.h:42

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