Data Structures | |
struct | XS_String |
string class for TCHAR strings More... | |
struct | FileHolder |
struct | tifstream |
input file stream with ANSI/UNICODE file names More... | |
struct | tofstream |
output file stream with ANSI/UNICODE file names More... | |
struct | XMLError |
XML Error with message and location. More... | |
struct | XMLErrorList |
struct | StyleSheet |
struct | StyleSheetList |
struct | DocType |
struct | XMLFormat |
Management of XML file headers and formating. More... | |
struct | XMLNode |
in memory representation of an XML node More... | |
struct | XMLChildrenFilter |
iterator access to children nodes with name filtering More... | |
struct | const_XMLChildrenFilter |
read only iterator access to children nodes with name filtering More... | |
struct | XMLPos |
iterator for XML trees More... | |
struct | const_XMLPos |
iterator for XML trees More... | |
struct | XMLBool |
type converter for boolean data More... | |
struct | XMLBoolRef |
type converter for boolean data with write access More... | |
struct | XMLInt |
type converter for integer data More... | |
struct | XMLIntRef |
type converter for integer data with write access More... | |
struct | XMLDouble |
type converter for numeric data More... | |
struct | XMLDoubleRef |
type converter for numeric data with write access More... | |
struct | XMLString |
type converter for string data More... | |
struct | XMStringRef |
type converter for string data with write access More... | |
struct | XMLReaderBase |
XML reader base class. More... | |
struct | XMLReader |
XML file reader. More... | |
struct | XMLDoc |
XML document holder. More... | |
struct | XMLMessage |
XML message wrapper. More... | |
struct | XMLMessageFromString |
struct | XMLMessageReader |
Reader for XML Messages. More... | |
struct | XMLWriter |
Typedefs | |
typedef std::filebuf | STDIO_FILEBUF |
Enumerations | |
enum | PRETTY_FLAGS { PRETTY_PLAIN = 0, PRETTY_LINEFEED = 1, PRETTY_INDENT = 2 } |
enum | WRITE_MODE { FORMAT_PLAIN, FORMAT_SMART, FORMAT_ORIGINAL, FORMAT_PRETTY } |
Functions | |
int | isxmlsym (unsigned char c) |
void | assign_utf8 (XS_String &s, const char *str, int lutf8) |
void | assign_utf8 (XS_String &s, const char *str) |
std::string | get_utf8 (LPCTSTR s, size_t l) |
std::string | get_utf8 (const XS_String &s) |
std::string | EncodeXMLString (const XS_String &str) |
XS_String | DecodeXMLString (const XS_String &str) |
template<typename T> | |
void | read_option (T &var, const_XMLPos &cfg, LPCXSSTR key) |
template<> | |
void | read_option (int &var, const_XMLPos &cfg, LPCXSSTR key) |
typedef std::filebuf XMLStorage::STDIO_FILEBUF |
Definition at line 419 of file xmlstorage.h.
Definition at line 590 of file xmlstorage.h.
00590 { 00591 PRETTY_PLAIN = 0, 00592 PRETTY_LINEFEED = 1, 00593 PRETTY_INDENT = 2 00594 };
Definition at line 674 of file xmlstorage.h.
00674 { 00675 FORMAT_PLAIN, /// write XML without any white space 00676 FORMAT_SMART, /// preserve original white space and comments if present; pretty print otherwise 00677 FORMAT_ORIGINAL, /// write XML stream preserving original white space and comments 00678 FORMAT_PRETTY /// pretty print node to stream without preserving original white space 00679 };
void XMLStorage::assign_utf8 | ( | XS_String & | s, | |
const char * | str | |||
) | [inline] |
Definition at line 367 of file xmlstorage.h.
References assign_utf8().
00368 { 00369 assign_utf8(s, str, strlen(str)); 00370 }
void XMLStorage::assign_utf8 | ( | XS_String & | s, | |
const char * | str, | |||
int | lutf8 | |||
) | [inline] |
Definition at line 350 of file xmlstorage.h.
References XMLStorage::XS_String::assign().
Referenced by assign_utf8(), and XMLStorage::XMLNode::get_content().
00351 { 00352 #ifdef UNICODE 00353 LPTSTR buffer = (LPTSTR)alloca(sizeof(TCHAR)*lutf8); 00354 int l = MultiByteToWideChar(CP_UTF8, 0, str, lutf8, buffer, lutf8); 00355 #else 00356 LPWSTR wbuffer = (LPWSTR)alloca(sizeof(WCHAR)*lutf8); 00357 int l = MultiByteToWideChar(CP_UTF8, 0, str, lutf8, wbuffer, lutf8); 00358 00359 int bl=2*l; LPSTR buffer = (LPSTR)alloca(bl); 00360 l = WideCharToMultiByte(CP_ACP, 0, wbuffer, l, buffer, bl, 0, 0); 00361 #endif 00362 00363 s.assign(buffer, l); 00364 }
XS_String XMLStorage::DecodeXMLString | ( | const XS_String & | str | ) |
std::string XMLStorage::EncodeXMLString | ( | const XS_String & | str | ) |
Referenced by XMLStorage::XMLWriter::set_content(), XMLStorage::XMLNode::set_content(), XMLStorage::XMLWriter::write_attributes(), XMLStorage::XMLWriter::write_post(), and XMLStorage::XMLWriter::write_pre().
std::string XMLStorage::get_utf8 | ( | const XS_String & | s | ) | [inline] |
Definition at line 404 of file xmlstorage.h.
References get_utf8().
00405 { 00406 return get_utf8(s.c_str(), s.length()); 00407 }
std::string XMLStorage::get_utf8 | ( | LPCTSTR | s, | |
size_t | l | |||
) | [inline] |
Definition at line 373 of file xmlstorage.h.
Referenced by get_utf8().
00374 { 00375 #ifdef UNICODE 00376 size_t bl=2*l; LPSTR buffer = (LPSTR)alloca(bl); 00377 l = WideCharToMultiByte(CP_UTF8, 0, s, (int)l, buffer, (int)bl, 0, 0); 00378 #else 00379 LPWSTR wbuffer = (LPWSTR)alloca(sizeof(WCHAR)*l); 00380 l = MultiByteToWideChar(CP_ACP, 0, s, (int)l, wbuffer, (int)l); 00381 00382 size_t bl=2*l; LPSTR buffer = (LPSTR)alloca(bl); 00383 l = WideCharToMultiByte(CP_UTF8, 0, wbuffer, (int)l, buffer, (int)bl, 0, 0); 00384 #endif 00385 00386 return std::string(buffer, l); 00387 }
int XMLStorage::isxmlsym | ( | unsigned char | c | ) | [inline] |
void XMLStorage::read_option | ( | int & | var, | |
const_XMLPos & | cfg, | |||
LPCXSSTR | key | |||
) | [inline] |
Definition at line 1926 of file xmlstorage.h.
References XMLStorage::const_XMLPos::get(), and XS_toi.
01927 { 01928 const XS_String& val = cfg.get(key); 01929 01930 if (!val.empty()) 01931 var = XS_toi(val.c_str()); 01932 }
void XMLStorage::read_option | ( | T & | var, | |
const_XMLPos & | cfg, | |||
LPCXSSTR | key | |||
) | [inline] |
Definition at line 1917 of file xmlstorage.h.
References XMLStorage::const_XMLPos::get().
01918 { 01919 const XS_String& val = cfg.get(key); 01920 01921 if (!val.empty()) 01922 var = val; 01923 }
IBrowser Source Code Documentation
generated on 18.09.2008 by ![]() |