adchpp::Text Class Reference

Text handling routines for ADCH++. More...

#include <Text.h>

List of all members.

Static Public Member Functions

static ADCHPP_DLL string acpToUtf8 (const string &str) throw ()
static const stringacpToUtf8 (const string &str, string &tmp) throw ()
static ADCHPP_DLL wstring acpToWide (const string &str) throw ()
static const wstringacpToWide (const string &str, wstring &tmp) throw ()
static ADCHPP_DLL string utf8ToAcp (const string &str) throw ()
static const stringutf8ToAcp (const string &str, string &tmp) throw ()
static ADCHPP_DLL wstring utf8ToWide (const string &str) throw ()
static const wstringutf8ToWide (const string &str, wstring &tmp) throw ()
static ADCHPP_DLL bool validateUtf8 (const string &str) throw ()
static ADCHPP_DLL string wideToAcp (const wstring &str) throw ()
static const stringwideToAcp (const wstring &str, string &tmp) throw ()
static ADCHPP_DLL string wideToUtf8 (const wstring &str) throw ()
static const stringwideToUtf8 (const wstring &str, string &tmp) throw ()

Private Types

typedef std::string string
typedef std::wstring wstring

Static Private Member Functions

static int utf8ToWc (const char *str, wchar_t &c)
static void wcToUtf8 (wchar_t c, string &str)

Detailed Description

Text handling routines for ADCH++.

ADCH++ internally uses UTF-8 for (almost) all string:s, hence all foreign text must be converted appropriately... acp - ANSI code page used by the system wide - wide unicode string utf8 - UTF-8 representation of the string string - UTF-8 string (most of the time) wstring - Wide string

Taken from DC++.

Definition at line 36 of file Text.h.


Member Typedef Documentation

typedef std::string adchpp::Text::string [private]

Definition at line 37 of file Text.h.

typedef std::wstring adchpp::Text::wstring [private]

Definition at line 38 of file Text.h.


Member Function Documentation

string adchpp::Text::acpToUtf8 ( const string str  )  throw () [static]

Definition at line 233 of file Text.cpp.

const string & adchpp::Text::acpToUtf8 ( const string str,
string tmp 
) throw () [static]

Definition at line 108 of file Text.cpp.

wstring adchpp::Text::acpToWide ( const string str  )  throw () [static]

Definition at line 238 of file Text.cpp.

const wstring & adchpp::Text::acpToWide ( const string str,
wstring tmp 
) throw () [static]

Definition at line 113 of file Text.cpp.

References adchpp::Util::emptyStringW.

string adchpp::Text::utf8ToAcp ( const string str  )  throw () [static]

Definition at line 243 of file Text.cpp.

const string & adchpp::Text::utf8ToAcp ( const string str,
string tmp 
) throw () [static]

Definition at line 211 of file Text.cpp.

Referenced by adchpp::PluginManager::loadPlugin().

Here is the caller graph for this function:

int adchpp::Text::utf8ToWc ( const char *  str,
wchar_t &  c 
) [static, private]

Definition at line 29 of file Text.cpp.

References dcassert.

wstring adchpp::Text::utf8ToWide ( const string str  )  throw () [static]

Definition at line 248 of file Text.cpp.

const wstring & adchpp::Text::utf8ToWide ( const string str,
wstring tmp 
) throw () [static]

Definition at line 216 of file Text.cpp.

References c.

bool adchpp::Text::validateUtf8 ( const string str  )  throw () [static]

Definition at line 199 of file Text.cpp.

Referenced by adchpp::AdcCommand::parse().

Here is the caller graph for this function:

void adchpp::Text::wcToUtf8 ( wchar_t  c,
string str 
) [static, private]

Definition at line 95 of file Text.cpp.

string adchpp::Text::wideToAcp ( const wstring str  )  throw () [static]

Definition at line 253 of file Text.cpp.

const string & adchpp::Text::wideToAcp ( const wstring str,
string tmp 
) throw () [static]

Definition at line 168 of file Text.cpp.

References adchpp::Util::emptyString.

string adchpp::Text::wideToUtf8 ( const wstring str  )  throw () [static]

Definition at line 258 of file Text.cpp.

const string & adchpp::Text::wideToUtf8 ( const wstring str,
string tmp 
) throw () [static]

Definition at line 155 of file Text.cpp.

References adchpp::Util::emptyString.

Generated on Sat Nov 27 23:38:54 2010 for adchpp by  doxygen 1.6.3