XMLStorage header file. More...
#include <wchar.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <alloca.h>
#include <assert.h>
#include <fstream>
#include <sstream>
#include <string>
#include <stack>
#include <list>
#include <map>
Go to the source code of this file.
Classes | |
struct | XMLStorage::TmpHeap |
struct | XMLStorage::XS_String |
string class for TCHAR strings More... | |
struct | XMLStorage::tifstream |
struct | XMLStorage::tofstream |
struct | XMLStorage::XMLLocation |
location of XML Node including XML file name More... | |
struct | XMLStorage::XMLError |
XML Error with message and location. More... | |
struct | XMLStorage::XMLErrorList |
list of XMLError entries More... | |
struct | XMLStorage::StyleSheet |
XML Stylesheet entry. More... | |
struct | XMLStorage::StyleSheetList |
list of StyleSheet entries More... | |
struct | XMLStorage::DocType |
XML document type description. More... | |
struct | XMLStorage::XMLFormat |
Management of XML file headers and formating. More... | |
struct | XMLStorage::HeaderlessXMLFormat |
struct | XMLStorage::XS_SMNode |
struct | XMLStorage::XS_StringMap |
struct | XMLStorage::XS_StringMap::iterator |
struct | XMLStorage::XS_StringMap::const_iterator |
struct | XMLStorage::XPathElement |
struct | XMLStorage::XPath |
struct | XMLStorage::XMLNode |
in memory representation of an XML node More... | |
struct | XMLStorage::XMLNode::AttributeMap |
map of XML node attributes More... | |
struct | XMLStorage::XMLNode::Children |
internal children node list More... | |
struct | XMLStorage::XMLChildrenFilter |
iterator access to children nodes with name filtering More... | |
struct | XMLStorage::XMLChildrenFilter::iterator |
internal iterator class More... | |
struct | XMLStorage::const_XMLChildrenFilter |
read only iterator access to children nodes with name filtering More... | |
struct | XMLStorage::const_XMLChildrenFilter::const_iterator |
internal iterator class More... | |
struct | XMLStorage::XMLPos |
iterator for XML trees More... | |
struct | XMLStorage::const_XMLPos |
iterator for XML trees More... | |
struct | XMLStorage::XMLReaderBase |
XML reader base class. More... | |
struct | XMLStorage::XMLReader |
XML file reader. More... | |
struct | XMLStorage::ReadBuffer |
struct | XMLStorage::ParseContext |
struct | XMLStorage::XMLDoc |
XML document holder. More... | |
struct | XMLStorage::XMLStateReader |
struct | XMLStorage::XMLStreamReader |
struct | XMLStorage::XMLStreamChildrenIterator |
read only iterator access to XMLStreamReader nodes More... | |
struct | XMLStorage::XMLStreamChildrenIterator::const_iterator |
internal iterator class More... | |
struct | XMLStorage::XMLStreamChildrenFilter |
read only iterator access to children nodes to XMLStreamReader nodes with name filtering More... | |
struct | XMLStorage::XMLStreamChildrenFilter::const_iterator |
internal iterator class More... | |
struct | XMLStorage::XMLBool |
type converter for boolean data More... | |
struct | XMLStorage::XMLBoolRef |
type converter for boolean data with write access More... | |
struct | XMLStorage::XMLInt |
type converter for integer data More... | |
struct | XMLStorage::XMLIntRef |
type converter for integer data with write access More... | |
struct | XMLStorage::XMLInt64 |
type converter for integer data More... | |
struct | XMLStorage::XMLInt64Ref |
type converter for integer data with write access More... | |
struct | XMLStorage::XMLDouble |
type converter for numeric data More... | |
struct | XMLStorage::XMLDoubleRef |
type converter for numeric data with write access More... | |
struct | XMLStorage::XMLString |
type converter for string data More... | |
struct | XMLStorage::XMLStringRef |
type converter for string data with write access More... | |
struct | XMLStorage::XMLProperty |
a key/value pair for property data access More... | |
struct | XMLStorage::XMLPropertyReader |
utility class to read property settings from a XML tree More... | |
struct | XMLStorage::XMLPropertyReader::const_iterator |
internal iterator class More... | |
struct | XMLStorage::XMLMessage |
XML message wrapper. More... | |
struct | XMLStorage::XMLMessageFromString |
helper structure to read XML messages from strings More... | |
struct | XMLStorage::XMLMessageReader |
Reader for XML Messages. More... | |
struct | XMLStorage::XMLWriter |
on the fly XML writer More... | |
struct | XMLStorage::XMLWriter::StackEntry |
container for XMLWriter state information More... | |
Namespaces | |
namespace | XMLStorage |
Defines | |
#define | XS_STRING_UTF8 |
#define | XS_NATIVE |
#define | TEXT(x) x |
#define | _ttoi atoi |
#define | _tfopen fopen |
#define | _tcstod strtod |
#define | _tcslen strlen |
#define | _tcschr strchr |
#define | _tcsstr strstr |
#define | _snprintf snprintf |
#define | _sntprintf snprintf |
#define | _vsnprintf vsnprintf |
#define | _vsntprintf vsnprintf |
#define | _stricmp strcasecmp |
#define | _tcsicmp strcasecmp |
#define | strnicmp strncasecmp |
#define | _tcsnicmp strncasecmp |
#define | BUFFER_LEN 2048 |
#define | BUFFER_HUGE 0x7F80 |
#define | ALLOCA_MAX 0x10000 |
#define | XS_CHAR char |
#define | XS_TEXT(x) x |
#define | LPXSSTR LPSTR |
#define | LPCXSSTR LPCSTR |
#define | XS_cmp strcmp |
#define | XS_icmp _stricmp |
#define | XS_ncmp strncmp |
#define | XS_nicmp strnicmp |
#define | XS_toi atoi |
#define | XS_toi64 _atoi64 |
#define | XS_tod strtod |
#define | XS_len strlen |
#define | XS_snprintf _snprintf |
#define | XS_vsnprintf _vsnprintf |
#define | XS_vsnprintf_s _vsnprintf_s |
#define | XS_strstr strstr |
#define | COUNTOF(b) (sizeof(b)/sizeof(b[0])) |
#define | _atoi64 atoll |
#define | TMP_ALLOC(T, b, h, l) |
#define | XS_EMPTY_STR XS_TEXT("") |
#define | XS_TRUE_STR XS_TEXT("true") |
#define | XS_FALSE_STR XS_TEXT("false") |
#define | XS_INTFMT_STR XS_TEXT("%d") |
#define | XS_INT64FMT_STR XS_TEXT("%I64d") |
#define | XS_FLOATFMT_STR XS_TEXT("%f") |
#define | XS_KEY_STR XS_TEXT("key") |
#define | XS_VALUE_STR XS_TEXT("value") |
#define | XS_PROPERTY_STR XS_TEXT("property") |
#define | XS_EMPTY XS_EMPTY_STR |
#define | XS_TRUE XS_TRUE_STR |
#define | XS_FALSE XS_FALSE_STR |
#define | XS_INTFMT XS_INTFMT_STR |
#define | XS_INT64FMT XS_INT64FMT_STR |
#define | XS_FLOATFMT XS_FLOATFMT_STR |
#define | CDATA_START "<![CDATA[" |
#define | CDATA_END "]]>" |
#define | XML_INDENT_SPACE " " |
#define | _XMLSTORAGE_H |
Typedefs | |
typedef char | CHAR |
typedef __wchar_t | WCHAR |
typedef unsigned char | UCHAR |
typedef char * | LPSTR |
typedef const char * | LPCSTR |
typedef WCHAR * | LPWSTR |
typedef const WCHAR * | LPCWSTR |
typedef char | TCHAR |
typedef unsigned char | _TUCHAR |
typedef CHAR * | PTSTR |
typedef CHAR * | LPTSTR |
typedef const CHAR * | LPCTSTR |
typedef long long | XMLStorage::INT64 |
typedef unsigned long long | XMLStorage::UINT64 |
typedef std::ostringstream | XMLStorage::fast_ostringstream |
Enumerations | |
enum | XMLStorage::PRETTY_FLAGS { XMLStorage::PRETTY_PLAIN = 0, XMLStorage::PRETTY_LINEFEED = 1, XMLStorage::PRETTY_INDENT = 2 } |
enum | XMLStorage::WRITE_MODE { XMLStorage::FORMAT_PLAIN, XMLStorage::FORMAT_SMART, XMLStorage::FORMAT_ORIGINAL, XMLStorage::FORMAT_PRETTY } |
Functions | |
const char * | XMLStorage::get_xmlsym_end_utf8 (const char *p) |
int | XMLStorage::_istspace (TCHAR c) |
LPCXSSTR | XMLStorage::safe_skip_space (LPCXSSTR s) |
template<typename T > | |
XS_String | XMLStorage::from_utf8 (const T &s) |
XS_String | XMLStorage::from_utf8 (const char *s, size_t l) |
std::string | XMLStorage::EncodeXMLString (const XS_String &str, bool cdata) |
encode XML string literals | |
XS_String | XMLStorage::DecodeXMLString (const std::string &str_utf8) |
decode XML string literals | |
template<typename T > | |
void | XMLStorage::read_option (T &var, const_XMLPos &cfg, LPCXSSTR key) |
template<> | |
void | XMLStorage::read_option (int &var, const_XMLPos &cfg, LPCXSSTR key) |
XMLStorage header file.
Definition in file xmlstorage.h.
#define _atoi64 atoll |
Definition at line 307 of file xmlstorage.h.
#define _snprintf snprintf |
Definition at line 217 of file xmlstorage.h.
#define _sntprintf snprintf |
Definition at line 218 of file xmlstorage.h.
#define _stricmp strcasecmp |
Definition at line 221 of file xmlstorage.h.
Referenced by HttpServer::handle_request(), XMLStorage::XMLFormat::print_header(), and XMLStorage::ParseContext::process_next().
#define _tcschr strchr |
Definition at line 215 of file xmlstorage.h.
Referenced by XMLStorage::XPathElement::parse().
#define _tcsicmp strcasecmp |
Definition at line 222 of file xmlstorage.h.
#define _tcslen strlen |
Definition at line 214 of file xmlstorage.h.
Referenced by XMLStorage::XPathElement::parse(), and XMLStorage::unescape().
#define _tcsnicmp strncasecmp |
Definition at line 224 of file xmlstorage.h.
Referenced by XMLStorage::XPathElement::parse().
#define _tcsstr strstr |
Definition at line 216 of file xmlstorage.h.
#define _tcstod strtod |
Definition at line 213 of file xmlstorage.h.
#define _tfopen fopen |
Definition at line 212 of file xmlstorage.h.
#define _ttoi atoi |
Definition at line 211 of file xmlstorage.h.
Referenced by XMLStorage::XPathElement::parse().
#define _vsnprintf vsnprintf |
Definition at line 219 of file xmlstorage.h.
#define _vsntprintf vsnprintf |
Definition at line 220 of file xmlstorage.h.
#define _XMLSTORAGE_H |
Definition at line 4292 of file xmlstorage.h.
#define ALLOCA_MAX 0x10000 |
Definition at line 251 of file xmlstorage.h.
#define BUFFER_HUGE 0x7F80 |
Definition at line 248 of file xmlstorage.h.
Referenced by XMLStorage::XS_String::vappendf(), and XMLStorage::XS_String::vprintf().
#define BUFFER_LEN 2048 |
Definition at line 245 of file xmlstorage.h.
Referenced by XMLStorage::EncodeXMLString(), SocketReader::fetch(), HttpServer::handle_request(), XMLStorage::ReadBuffer::ReadBuffer(), SocketReader::receive_all(), HttpServer::send_error(), XMLStorage::XS_String::vappendf(), XMLStorage::XS_String::vprintf(), and XMLRPC::XMLRPCClient::XMLRPCClient().
#define CDATA_END "]]>" |
Definition at line 544 of file xmlstorage.h.
Referenced by XMLStorage::DecodeXMLString(), XMLStorage::EncodeXMLString(), XMLStorage::XMLReaderBase::EndElementHandler(), and XMLStorage::ReadBuffer::has_CDEnd().
#define CDATA_START "<![CDATA[" |
Definition at line 543 of file xmlstorage.h.
Referenced by XMLStorage::EncodeXMLString(), and XMLStorage::XMLReaderBase::EndElementHandler().
#define COUNTOF | ( | b ) | (sizeof(b)/sizeof(b[0])) |
Definition at line 300 of file xmlstorage.h.
Referenced by XMLStorage::XMLDoubleRef::assign(), XMLStorage::XMLInt64Ref::assign(), XMLStorage::XMLIntRef::assign(), XMLStorage::XMLDouble::operator XS_String(), XMLStorage::XMLInt64::operator XS_String(), XMLStorage::XMLInt::operator XS_String(), XMLStorage::XS_String::vappendf(), and XMLStorage::XS_String::vprintf().
#define LPCXSSTR LPCSTR |
Definition at line 264 of file xmlstorage.h.
Referenced by XMLStorage::DecodeXMLString(), XMLStorage::EncodeXMLString(), XMLStorage::XPathElement::parse(), XMLStorage::unescape(), XMLStorage::XMLBool::XMLBool(), XMLStorage::XMLDouble::XMLDouble(), XMLStorage::XMLInt::XMLInt(), and XMLStorage::XMLInt64::XMLInt64().
#define LPXSSTR LPSTR |
Definition at line 263 of file xmlstorage.h.
Referenced by XMLStorage::DecodeXMLString(), and XMLStorage::EncodeXMLString().
#define strnicmp strncasecmp |
Definition at line 223 of file xmlstorage.h.
#define TEXT | ( | x ) | x |
Definition at line 204 of file xmlstorage.h.
Referenced by XMLStorage::XPathElement::parse(), test_read(), test_write(), and XMLStorage::unescape().
#define TMP_ALLOC | ( | T, | |
b, | |||
h, | |||
l | |||
) |
TmpHeap h; T* b; \ if (l <= ALLOCA_MAX) b = (T*)alloca(sizeof(T)*l); \ else h = b = (T*)malloc(sizeof(T)*l)
Definition at line 335 of file xmlstorage.h.
Referenced by XMLStorage::DecodeXMLString().
#define XML_INDENT_SPACE " " |
Definition at line 814 of file xmlstorage.h.
#define XS_CHAR char |
Definition at line 261 of file xmlstorage.h.
Referenced by XMLStorage::XMLDoubleRef::assign(), XMLStorage::XMLInt64Ref::assign(), XMLStorage::XMLIntRef::assign(), XMLStorage::DecodeXMLString(), XMLStorage::EncodeXMLString(), XMLStorage::XMLDouble::operator XS_String(), XMLStorage::XMLInt64::operator XS_String(), XMLStorage::XMLInt::operator XS_String(), XMLStorage::XS_String::vappendf(), and XMLStorage::XS_String::vprintf().
#define XS_cmp strcmp |
Definition at line 265 of file xmlstorage.h.
#define XS_EMPTY XS_EMPTY_STR |
Definition at line 531 of file xmlstorage.h.
#define XS_EMPTY_STR XS_TEXT("") |
Definition at line 511 of file xmlstorage.h.
Referenced by XMLStorage::XMLNode::get_sub_content(), and XMLStorage::safe_skip_space().
#define XS_FALSE XS_FALSE_STR |
Definition at line 533 of file xmlstorage.h.
Referenced by XMLStorage::XMLBoolRef::assign(), and XMLStorage::XMLBool::operator LPCXSSTR().
#define XS_FALSE_STR XS_TEXT("false") |
Definition at line 513 of file xmlstorage.h.
#define XS_FLOATFMT XS_FLOATFMT_STR |
Definition at line 536 of file xmlstorage.h.
Referenced by XMLStorage::XMLDoubleRef::assign(), and XMLStorage::XMLDouble::operator XS_String().
#define XS_FLOATFMT_STR XS_TEXT("%f") |
Definition at line 516 of file xmlstorage.h.
#define XS_icmp _stricmp |
Definition at line 266 of file xmlstorage.h.
Referenced by XMLStorage::XMLBoolRef::operator bool(), XMLStorage::XMLBoolRef::operator!(), XMLStorage::ParseContext::process_next(), and XMLStorage::XMLBool::XMLBool().
#define XS_INT64FMT XS_INT64FMT_STR |
Definition at line 535 of file xmlstorage.h.
Referenced by XMLStorage::XMLInt64Ref::assign(), and XMLStorage::XMLInt64::operator XS_String().
#define XS_INT64FMT_STR XS_TEXT("%I64d") |
Definition at line 515 of file xmlstorage.h.
#define XS_INTFMT XS_INTFMT_STR |
Definition at line 534 of file xmlstorage.h.
Referenced by XMLStorage::XMLIntRef::assign(), and XMLStorage::XMLInt::operator XS_String().
#define XS_INTFMT_STR XS_TEXT("%d") |
Definition at line 514 of file xmlstorage.h.
#define XS_KEY_STR XS_TEXT("key") |
Definition at line 518 of file xmlstorage.h.
#define XS_len strlen |
Definition at line 272 of file xmlstorage.h.
Referenced by XMLStorage::DecodeXMLString(), and XMLStorage::EncodeXMLString().
#define XS_NATIVE |
Definition at line 101 of file xmlstorage.h.
#define XS_ncmp strncmp |
Definition at line 267 of file xmlstorage.h.
#define XS_nicmp strnicmp |
Definition at line 268 of file xmlstorage.h.
Referenced by XMLStorage::DecodeXMLString(), and XMLStorage::XMLBool::XMLBool().
#define XS_PROPERTY_STR XS_TEXT("property") |
Definition at line 520 of file xmlstorage.h.
#define XS_snprintf _snprintf |
#define XS_STRING_UTF8 |
Definition at line 62 of file xmlstorage.h.
#define XS_strstr strstr |
Definition at line 276 of file xmlstorage.h.
Referenced by XMLStorage::DecodeXMLString().
#define XS_TEXT | ( | x ) | x |
Definition at line 262 of file xmlstorage.h.
Referenced by XMLStorage::DecodeXMLString(), XMLStorage::XPathElement::matches(), XMLStorage::XPathElement::parse(), and XMLStorage::ParseContext::process_next().
#define XS_tod strtod |
Definition at line 271 of file xmlstorage.h.
Referenced by XMLStorage::XMLDoubleRef::operator double(), and XMLStorage::XMLDouble::XMLDouble().
#define XS_toi atoi |
Definition at line 269 of file xmlstorage.h.
Referenced by XMLStorage::XMLIntRef::operator int(), XMLStorage::read_option(), and XMLStorage::XMLInt::XMLInt().
#define XS_toi64 _atoi64 |
Definition at line 270 of file xmlstorage.h.
Referenced by XMLStorage::XMLInt64Ref::operator INT64(), and XMLStorage::XMLInt64::XMLInt64().
#define XS_TRUE XS_TRUE_STR |
Definition at line 532 of file xmlstorage.h.
Referenced by XMLStorage::XMLBoolRef::assign(), XMLStorage::XMLBoolRef::operator bool(), XMLStorage::XMLBool::operator LPCXSSTR(), XMLStorage::XMLBoolRef::operator!(), and XMLStorage::XMLBool::XMLBool().
#define XS_TRUE_STR XS_TEXT("true") |
Definition at line 512 of file xmlstorage.h.
#define XS_VALUE_STR XS_TEXT("value") |
Definition at line 519 of file xmlstorage.h.
#define XS_vsnprintf _vsnprintf |
Definition at line 274 of file xmlstorage.h.
Referenced by XMLStorage::XS_String::vappendf(), and XMLStorage::XS_String::vprintf().
#define XS_vsnprintf_s _vsnprintf_s |
Definition at line 275 of file xmlstorage.h.
Referenced by XMLStorage::XS_String::vappendf(), and XMLStorage::XS_String::vprintf().
typedef unsigned char _TUCHAR |
Definition at line 206 of file xmlstorage.h.
typedef char CHAR |
Definition at line 191 of file xmlstorage.h.
typedef const char* LPCSTR |
Definition at line 199 of file xmlstorage.h.
Definition at line 209 of file xmlstorage.h.
Definition at line 201 of file xmlstorage.h.
typedef char* LPSTR |
Definition at line 198 of file xmlstorage.h.
Definition at line 208 of file xmlstorage.h.
Definition at line 200 of file xmlstorage.h.
Definition at line 207 of file xmlstorage.h.
typedef char TCHAR |
Definition at line 205 of file xmlstorage.h.
typedef unsigned char UCHAR |
Definition at line 197 of file xmlstorage.h.
typedef __wchar_t WCHAR |
Definition at line 196 of file xmlstorage.h.