From 767bb3951c65e38627cb0bbad9a3756e1cda2520 Mon Sep 17 00:00:00 2001 From: Daniel Wilhelm Date: Fri, 18 Apr 2014 17:30:42 +0200 Subject: 6.1 --- zenxml/doc/annotated.html | 54 +- zenxml/doc/bc_s.png | Bin 705 -> 676 bytes zenxml/doc/bdwn.png | Bin 147 -> 147 bytes zenxml/doc/bind_8h_source.html | 498 ++++---- zenxml/doc/classes.html | 35 +- zenxml/doc/classzen_1_1_xml_doc-members.html | 67 +- zenxml/doc/classzen_1_1_xml_doc.html | 143 ++- zenxml/doc/classzen_1_1_xml_element-members.html | 77 +- zenxml/doc/classzen_1_1_xml_element.html | 226 ++-- zenxml/doc/classzen_1_1_xml_in-members.html | 69 +- zenxml/doc/classzen_1_1_xml_in.html | 248 ++-- zenxml/doc/classzen_1_1_xml_out-members.html | 59 +- zenxml/doc/classzen_1_1_xml_out.html | 170 ++- zenxml/doc/closed.png | Bin 126 -> 132 bytes zenxml/doc/cvrt__struc_8h_source.html | 444 ++++--- zenxml/doc/cvrt__text_8h_source.html | 383 +++--- zenxml/doc/dom_8h_source.html | 565 ++++----- zenxml/doc/doxygen.css | 608 ++++++++-- zenxml/doc/doxygen.png | Bin 3942 -> 3779 bytes zenxml/doc/error_8h_source.html | 83 +- zenxml/doc/files.html | 118 -- zenxml/doc/functions.html | 49 +- zenxml/doc/functions_func.html | 47 +- zenxml/doc/functions_vars.html | 35 +- zenxml/doc/hierarchy.html | 57 +- zenxml/doc/index.html | 739 ++++++------ zenxml/doc/io_8h_source.html | 262 ++--- zenxml/doc/jquery.js | 81 +- zenxml/doc/namespacemembers.html | 39 +- zenxml/doc/namespacemembers_func.html | 39 +- zenxml/doc/namespaces.html | 41 +- zenxml/doc/namespacezen.html | 239 ++-- zenxml/doc/nav_f.png | Bin 159 -> 153 bytes zenxml/doc/nav_h.png | Bin 97 -> 98 bytes zenxml/doc/open.png | Bin 118 -> 123 bytes zenxml/doc/parser_8h_source.html | 1231 ++++++++++---------- zenxml/doc/search/all_61.html | 25 - zenxml/doc/search/all_61.js | 5 - zenxml/doc/search/all_63.html | 25 - zenxml/doc/search/all_63.js | 4 - zenxml/doc/search/all_65.html | 25 - zenxml/doc/search/all_65.js | 4 - zenxml/doc/search/all_67.html | 25 - zenxml/doc/search/all_67.js | 13 - zenxml/doc/search/all_6c.html | 25 - zenxml/doc/search/all_6c.js | 6 - zenxml/doc/search/all_6e.html | 25 - zenxml/doc/search/all_6e.js | 4 - zenxml/doc/search/all_6f.html | 25 - zenxml/doc/search/all_6f.js | 6 - zenxml/doc/search/all_70.html | 25 - zenxml/doc/search/all_70.js | 5 - zenxml/doc/search/all_72.html | 25 - zenxml/doc/search/all_72.js | 9 - zenxml/doc/search/all_73.html | 25 - zenxml/doc/search/all_73.js | 11 - zenxml/doc/search/all_77.html | 25 - zenxml/doc/search/all_77.js | 5 - zenxml/doc/search/all_78.html | 25 - zenxml/doc/search/all_78.js | 13 - zenxml/doc/search/all_7a.html | 25 - zenxml/doc/search/all_7a.js | 4 - zenxml/doc/search/classes_78.html | 25 - zenxml/doc/search/classes_78.js | 10 - zenxml/doc/search/functions_61.html | 25 - zenxml/doc/search/functions_61.js | 5 - zenxml/doc/search/functions_65.html | 25 - zenxml/doc/search/functions_65.js | 4 - zenxml/doc/search/functions_67.html | 25 - zenxml/doc/search/functions_67.js | 13 - zenxml/doc/search/functions_6c.html | 25 - zenxml/doc/search/functions_6c.js | 5 - zenxml/doc/search/functions_6e.html | 25 - zenxml/doc/search/functions_6e.js | 4 - zenxml/doc/search/functions_6f.html | 25 - zenxml/doc/search/functions_6f.js | 6 - zenxml/doc/search/functions_70.html | 25 - zenxml/doc/search/functions_70.js | 5 - zenxml/doc/search/functions_72.html | 25 - zenxml/doc/search/functions_72.js | 8 - zenxml/doc/search/functions_73.html | 25 - zenxml/doc/search/functions_73.js | 11 - zenxml/doc/search/functions_77.html | 25 - zenxml/doc/search/functions_77.js | 5 - zenxml/doc/search/functions_78.html | 25 - zenxml/doc/search/functions_78.js | 6 - zenxml/doc/search/namespaces_7a.html | 25 - zenxml/doc/search/namespaces_7a.js | 4 - zenxml/doc/search/search.css | 35 +- zenxml/doc/search/search.js | 30 +- zenxml/doc/search/variables_63.html | 25 - zenxml/doc/search/variables_63.js | 4 - zenxml/doc/search/variables_6c.html | 25 - zenxml/doc/search/variables_6c.js | 4 - zenxml/doc/search/variables_72.html | 25 - zenxml/doc/search/variables_72.js | 4 - zenxml/doc/structzen_1_1_xml_error-members.html | 47 +- zenxml/doc/structzen_1_1_xml_error.html | 53 +- zenxml/doc/structzen_1_1_xml_error.png | Bin 668 -> 849 bytes .../doc/structzen_1_1_xml_file_error-members.html | 49 +- zenxml/doc/structzen_1_1_xml_file_error.html | 55 +- zenxml/doc/structzen_1_1_xml_file_error.png | Bin 447 -> 524 bytes .../structzen_1_1_xml_parsing_error-members.html | 51 +- zenxml/doc/structzen_1_1_xml_parsing_error.html | 56 +- zenxml/doc/structzen_1_1_xml_parsing_error.png | Bin 500 -> 579 bytes zenxml/doc/tab_a.png | Bin 140 -> 142 bytes zenxml/doc/tab_b.png | Bin 178 -> 169 bytes zenxml/doc/tab_h.png | Bin 192 -> 177 bytes zenxml/doc/tab_s.png | Bin 189 -> 184 bytes zenxml/doc/tabs.css | 1 + zenxml/doc/xml_8h_source.html | 74 +- 111 files changed, 3521 insertions(+), 4548 deletions(-) delete mode 100644 zenxml/doc/files.html delete mode 100644 zenxml/doc/search/all_61.html delete mode 100644 zenxml/doc/search/all_61.js delete mode 100644 zenxml/doc/search/all_63.html delete mode 100644 zenxml/doc/search/all_63.js delete mode 100644 zenxml/doc/search/all_65.html delete mode 100644 zenxml/doc/search/all_65.js delete mode 100644 zenxml/doc/search/all_67.html delete mode 100644 zenxml/doc/search/all_67.js delete mode 100644 zenxml/doc/search/all_6c.html delete mode 100644 zenxml/doc/search/all_6c.js delete mode 100644 zenxml/doc/search/all_6e.html delete mode 100644 zenxml/doc/search/all_6e.js delete mode 100644 zenxml/doc/search/all_6f.html delete mode 100644 zenxml/doc/search/all_6f.js delete mode 100644 zenxml/doc/search/all_70.html delete mode 100644 zenxml/doc/search/all_70.js delete mode 100644 zenxml/doc/search/all_72.html delete mode 100644 zenxml/doc/search/all_72.js delete mode 100644 zenxml/doc/search/all_73.html delete mode 100644 zenxml/doc/search/all_73.js delete mode 100644 zenxml/doc/search/all_77.html delete mode 100644 zenxml/doc/search/all_77.js delete mode 100644 zenxml/doc/search/all_78.html delete mode 100644 zenxml/doc/search/all_78.js delete mode 100644 zenxml/doc/search/all_7a.html delete mode 100644 zenxml/doc/search/all_7a.js delete mode 100644 zenxml/doc/search/classes_78.html delete mode 100644 zenxml/doc/search/classes_78.js delete mode 100644 zenxml/doc/search/functions_61.html delete mode 100644 zenxml/doc/search/functions_61.js delete mode 100644 zenxml/doc/search/functions_65.html delete mode 100644 zenxml/doc/search/functions_65.js delete mode 100644 zenxml/doc/search/functions_67.html delete mode 100644 zenxml/doc/search/functions_67.js delete mode 100644 zenxml/doc/search/functions_6c.html delete mode 100644 zenxml/doc/search/functions_6c.js delete mode 100644 zenxml/doc/search/functions_6e.html delete mode 100644 zenxml/doc/search/functions_6e.js delete mode 100644 zenxml/doc/search/functions_6f.html delete mode 100644 zenxml/doc/search/functions_6f.js delete mode 100644 zenxml/doc/search/functions_70.html delete mode 100644 zenxml/doc/search/functions_70.js delete mode 100644 zenxml/doc/search/functions_72.html delete mode 100644 zenxml/doc/search/functions_72.js delete mode 100644 zenxml/doc/search/functions_73.html delete mode 100644 zenxml/doc/search/functions_73.js delete mode 100644 zenxml/doc/search/functions_77.html delete mode 100644 zenxml/doc/search/functions_77.js delete mode 100644 zenxml/doc/search/functions_78.html delete mode 100644 zenxml/doc/search/functions_78.js delete mode 100644 zenxml/doc/search/namespaces_7a.html delete mode 100644 zenxml/doc/search/namespaces_7a.js delete mode 100644 zenxml/doc/search/variables_63.html delete mode 100644 zenxml/doc/search/variables_63.js delete mode 100644 zenxml/doc/search/variables_6c.html delete mode 100644 zenxml/doc/search/variables_6c.js delete mode 100644 zenxml/doc/search/variables_72.html delete mode 100644 zenxml/doc/search/variables_72.js (limited to 'zenxml') diff --git a/zenxml/doc/annotated.html b/zenxml/doc/annotated.html index b5e05616..c11dd07e 100644 --- a/zenxml/doc/annotated.html +++ b/zenxml/doc/annotated.html @@ -3,46 +3,36 @@ + zen::Xml: Class List - - - - + + - + -
- - +
- - - - - -
zen::Xml -
Simple C++ XML Processing
- - + + @@ -51,7 +41,6 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • Main Page
  • Namespaces
  • Classes
  • -
  • Files
  • @@ -78,13 +67,13 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • Class Members
  • -
    +
    - All Classes Namespaces Functions Variables
    + All Classes Namespaces Functions Variables Pages
    @@ -98,23 +87,24 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    Class List
    -
    Here are the classes, structs, unions and interfaces with brief descriptions:
    - - - - - - - +
    Here are the classes, structs, unions and interfaces with brief descriptions:
    +
    [detail level 12]
    zen::XmlDocThe complete XML document
    zen::XmlElementAn XML element
    zen::XmlErrorException base class for zen::Xml
    zen::XmlFileErrorException thrown due to failed file I/O
    zen::XmlInProxy class to conveniently convert XML structure to user data
    zen::XmlOutProxy class to conveniently convert user data into XML structure
    zen::XmlParsingErrorException thrown due to an XML parsing error
    + + + + + + + +
    \NzenThe zen::Xml namespace
     oCXmlOutProxy class to conveniently convert user data into XML structure
     oCXmlInProxy class to conveniently convert XML structure to user data
     oCXmlElementAn XML element
     oCXmlDocThe complete XML document
     oCXmlErrorException base class for zen::Xml
     oCXmlFileErrorException thrown due to failed file I/O
     \CXmlParsingErrorException thrown due to an XML parsing error
    +
    - - + - diff --git a/zenxml/doc/bc_s.png b/zenxml/doc/bc_s.png index 51ba0066..224b29aa 100644 Binary files a/zenxml/doc/bc_s.png and b/zenxml/doc/bc_s.png differ diff --git a/zenxml/doc/bdwn.png b/zenxml/doc/bdwn.png index d0b575b7..940a0b95 100644 Binary files a/zenxml/doc/bdwn.png and b/zenxml/doc/bdwn.png differ diff --git a/zenxml/doc/bind_8h_source.html b/zenxml/doc/bind_8h_source.html index 300a10aa..e8e9e831 100644 --- a/zenxml/doc/bind_8h_source.html +++ b/zenxml/doc/bind_8h_source.html @@ -3,46 +3,36 @@ + zen::Xml: bind.h Source File - - - - + + - + -
    - - +
    - - - - - -
    zen::Xml -
    Simple C++ XML Processing
    - - + + @@ -51,7 +41,6 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • Main Page
  • Namespaces
  • Classes
  • -
  • Files
  • @@ -70,18 +59,12 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • - -
    - All Classes Namespaces Functions Variables
    + All Classes Namespaces Functions Variables Pages
    @@ -90,230 +73,263 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    + +
    bind.h
    -
    00001 // **************************************************************************
    -00002 // * This file is part of the zen::Xml project. It is distributed under the *
    -00003 // * Boost Software License: http://www.boost.org/LICENSE_1_0.txt           *
    -00004 // * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved        *
    -00005 // **************************************************************************
    -00006 
    -00007 #ifndef ZEN_XML_BIND_HEADER_9081740816593478258435
    -00008 #define ZEN_XML_BIND_HEADER_9081740816593478258435
    -00009 
    -00010 #include <set>
    -00011 #include "cvrt_struc.h"
    -00012 #include "parser.h"
    -00013 #include "io.h"
    -00014 
    -00015 namespace zen
    -00016 {
    -00022 
    -00023 
    -00032 template <class String> inline
    -00033 void load(const String& filename, XmlDoc& doc) //throw XmlFileError, XmlParsingError
    -00034 {
    -00035     std::string stream = loadStream(filename); //throw XmlFileError
    -00036     parse(stream, doc); //throw XmlParsingError
    -00037 }
    -00038 
    -00039 
    -00041 
    -00051 template <class String> inline
    -00052 void save(const XmlDoc& doc,
    -00053           const String& filename,
    -00054           const std::string& lineBreak = "\r\n",
    -00055           const std::string& indent = "    ") //throw XmlFileError
    -00056 {
    -00057     std::string stream = serialize(doc, lineBreak, indent); //throw ()
    -00058     saveStream(stream, filename); //throw XmlFileError
    -00059 }
    -00060 
    -00061 
    -00063 class XmlOut
    -00064 {
    -00065 public:
    -00067 
    -00088     XmlOut(XmlDoc& doc) : ref_(&doc.root()) {}
    -00090 
    -00093     XmlOut(XmlElement& element) : ref_(&element) {}
    -00094 
    -00096 
    -00101     template <class String>
    -00102     XmlOut operator[](const String& name) const
    -00103     {
    -00104         const std::string utf8name = utfCvrtTo<std::string>(name);
    -00105         XmlElement* child = ref_->getChild(utf8name);
    -00106         return child ? *child : ref_->addChild(utf8name);
    -00107     }
    -00108 
    -00110 
    -00114     template <class T>
    -00115     void operator()(const T& value) { writeStruc(value, *ref_); }
    -00116 
    -00118 
    -00142     template <class String, class T>
    -00143     void attribute(const String& name, const T& value) { ref_->setAttribute(name, value); }
    -00144 
    -00146     XmlElement& ref() { return *ref_; }
    -00147 
    -00148 private:
    -00149     XmlElement* ref_; //always bound!
    -00150 };
    -00151 
    -00152 
    -00154 class XmlIn
    -00155 {
    -00156     class ErrorLog;
    -00157     struct ConversionToBool { int dummy; };
    -00158 
    -00159 public:
    -00161 
    -00171     XmlIn(const XmlDoc& doc) : refIndex(0), log(std::make_shared<ErrorLog>()) { refList.push_back(&doc.root()); }
    -00173 
    -00176     XmlIn(const XmlElement* element) : refIndex(0), log(std::make_shared<ErrorLog>()) { refList.push_back(element); }
    -00178 
    -00181     XmlIn(const XmlElement& element) : refIndex(0), log(std::make_shared<ErrorLog>()) { refList.push_back(&element); }
    -00182 
    -00184 
    -00189     template <class String>
    -00190     XmlIn operator[](const String& name) const
    -00191     {
    -00192         std::vector<const XmlElement*> childList;
    -00193 
    -00194         if (refIndex < refList.size())
    -00195         {
    -00196             auto iterPair = refList[refIndex]->getChildren(name);
    -00197             std::for_each(iterPair.first, iterPair.second,
    -00198             [&](const XmlElement& child) { childList.push_back(&child); });
    -00199         }
    -00200 
    -00201         return XmlIn(childList, childList.empty() ? getChildNameFormatted(name) : std::string(), log);
    -00202     }
    -00203 
    -00205 
    -00225     void next() { ++refIndex; }
    -00226 
    -00228 
    -00233     template <class T>
    -00234     bool operator()(T& value) const
    -00235     {
    -00236         if (refIndex < refList.size())
    -00237         {
    -00238             bool success = readStruc(*refList[refIndex], value);
    -00239             if (!success)
    -00240                 log->notifyConversionError(getNameFormatted());
    -00241             return success;
    -00242         }
    -00243         else
    -00244         {
    -00245             log->notifyMissingElement(getNameFormatted());
    -00246             return false;
    -00247         }
    -00248     }
    -00249 
    -00251 
    -00268     template <class String, class T>
    -00269     bool attribute(const String& name, T& value) const
    -00270     {
    -00271         if (refIndex < refList.size())
    -00272         {
    -00273             bool success = refList[refIndex]->getAttribute(name, value);
    -00274             if (!success)
    -00275                 log->notifyMissingAttribute(getNameFormatted(), utfCvrtTo<std::string>(name));
    -00276             return success;
    -00277         }
    -00278         else
    -00279         {
    -00280             log->notifyMissingElement(getNameFormatted());
    -00281             return false;
    -00282         }
    -00283     }
    -00284 
    -00286     const XmlElement* get() const { return refIndex < refList.size() ? refList[refIndex] : nullptr; }
    -00287 
    -00289 
    -00298     operator int ConversionToBool::* () const { return get() ? &ConversionToBool::dummy : nullptr; }
    -00299 
    -00301 
    -00320     bool errorsOccured() const { return !log->elementList().empty(); }
    -00321 
    -00323 
    -00327     template <class String>
    -00328     std::vector<String> getErrorsAs() const
    -00329     {
    -00330         std::vector<String> output;
    -00331         const auto& elements = log->elementList();
    -00332         std::transform(elements.begin(), elements.end(), std::back_inserter(output), [](const std::string& str) { return utfCvrtTo<String>(str); });
    -00333         return output;
    -00334     }
    -00335 
    -00336 private:
    -00337     XmlIn(const std::vector<const XmlElement*>& siblingList, const std::string& elementNameFmt, const std::shared_ptr<ErrorLog>& sharedlog) :
    -00338         refList(siblingList), refIndex(0), formattedName(elementNameFmt), log(sharedlog)
    -00339     { assert((!siblingList.empty() && elementNameFmt.empty()) || (siblingList.empty() && !elementNameFmt.empty())); }
    -00340 
    -00341     static std::string getNameFormatted(const XmlElement& elem) //"<Root> <Level1> <Level2>"
    -00342     {
    -00343         return (elem.parent() ? getNameFormatted(*elem.parent()) + " " : std::string()) + "<" + elem.getNameAs<std::string>() + ">";
    -00344     }
    -00345 
    -00346     std::string getNameFormatted() const
    -00347     {
    -00348         if (refIndex < refList.size())
    -00349         {
    -00350             assert(formattedName.empty());
    -00351             return getNameFormatted(*refList[refIndex]);
    -00352         }
    -00353         else
    -00354             return formattedName;
    -00355     }
    -00356 
    -00357     std::string getChildNameFormatted(const std::string& childName) const
    -00358     {
    -00359         std::string parentName = getNameFormatted();
    -00360         return (parentName.empty() ? std::string() : (parentName + " ")) + "<" + childName + ">";
    -00361     }
    -00362 
    -00363     class ErrorLog
    -00364     {
    -00365     public:
    -00366         void notifyConversionError (const std::string& formattedName)  { insert(formattedName); }
    -00367         void notifyMissingElement  (const std::string& formattedName)  { insert(formattedName); }
    -00368         void notifyMissingAttribute(const std::string& formattedName, const std::string& attribName) { insert(formattedName + " @" + attribName); }
    -00369 
    -00370         const std::vector<std::string>& elementList() const { return failedElements; }
    -00371 
    -00372     private:
    -00373         void insert(const std::string& newVal)
    -00374         {
    -00375             if (usedElements.insert(newVal).second)
    -00376                 failedElements.push_back(newVal);
    -00377         }
    -00378 
    -00379         std::vector<std::string> failedElements; //unique list of failed elements
    -00380         std::set<std::string>    usedElements;
    -00381     };
    -00382 
    -00383     std::vector<const XmlElement*> refList; //all sibling elements with same name (all pointers bound!)
    -00384     size_t refIndex;                        //this sibling's index in refList
    -00385     std::string formattedName;     //contains full and formatted element name if (and only if) refList is empty
    -00386     std::shared_ptr<ErrorLog> log; //always bound
    -00387 };
    -00388 }
    -00389 
    -00390 #endif //ZEN_XML_BIND_HEADER_9081740816593478258435
    -
    - - +
    1 // **************************************************************************
    +
    2 // * This file is part of the FreeFileSync project. It is distributed under *
    +
    3 // * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
    +
    4 // * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved *
    +
    5 // **************************************************************************
    +
    6 
    +
    7 #ifndef ZEN_XML_BIND_HEADER_9081740816593478258435
    +
    8 #define ZEN_XML_BIND_HEADER_9081740816593478258435
    +
    9 
    +
    10 #include <set>
    +
    11 #include "cvrt_struc.h"
    +
    12 #include "parser.h"
    +
    13 #include "io.h"
    +
    14 
    +
    15 namespace zen
    +
    16 {
    +
    22 
    +
    32 template <class String> inline
    +
    33 XmlDoc load(const String& filename) //throw XmlFileError, XmlParsingError
    +
    34 {
    +
    35  std::string stream = loadStream(filename); //throw XmlFileError
    +
    36  return parse(stream); //throw XmlParsingError
    +
    37 }
    +
    38 
    +
    39 
    +
    41 
    +
    51 template <class String> inline
    +
    52 void save(const XmlDoc& doc,
    +
    53  const String& filename,
    +
    54  const std::string& lineBreak = "\r\n",
    +
    55  const std::string& indent = " ") //throw XmlFileError
    +
    56 {
    +
    57  std::string stream = serialize(doc, lineBreak, indent); //throw ()
    +
    58  saveStream(stream, filename); //throw XmlFileError
    +
    59 }
    +
    60 
    +
    61 
    +
    63 class XmlOut
    +
    64 {
    +
    65 public:
    +
    67 
    +
    88  XmlOut(XmlDoc& doc) : ref_(&doc.root()) {}
    +
    90 
    +
    93  XmlOut(XmlElement& element) : ref_(&element) {}
    +
    94 
    +
    96 
    +
    101  template <class String>
    +
    102  XmlOut operator[](const String& name) const
    +
    103  {
    +
    104  const std::string utf8name = utfCvrtTo<std::string>(name);
    +
    105  XmlElement* child = ref_->getChild(utf8name);
    +
    106  return child ? *child : ref_->addChild(utf8name);
    +
    107  }
    +
    108 
    +
    110 
    +
    114  template <class T>
    +
    115  void operator()(const T& value) { writeStruc(value, *ref_); }
    +
    116 
    +
    118 
    +
    142  template <class String, class T>
    +
    143  void attribute(const String& name, const T& value) { ref_->setAttribute(name, value); }
    +
    144 
    +
    146  XmlElement& ref() { return *ref_; }
    +
    147 
    +
    148 private:
    +
    149  XmlElement* ref_; //always bound!
    +
    150 };
    +
    151 
    +
    152 
    +
    154 class XmlIn
    +
    155 {
    +
    156  class ErrorLog;
    +
    157  struct ConversionToBool { int dummy; };
    +
    158 
    +
    159 public:
    +
    161 
    +
    171  XmlIn(const XmlDoc& doc) : refIndex(0), log(std::make_shared<ErrorLog>()) { refList.push_back(&doc.root()); }
    +
    173 
    +
    176  XmlIn(const XmlElement* element) : refIndex(0), log(std::make_shared<ErrorLog>()) { refList.push_back(element); }
    +
    178 
    +
    181  XmlIn(const XmlElement& element) : refIndex(0), log(std::make_shared<ErrorLog>()) { refList.push_back(&element); }
    +
    182 
    +
    184 
    +
    189  template <class String>
    +
    190  XmlIn operator[](const String& name) const
    +
    191  {
    +
    192  std::vector<const XmlElement*> childList;
    +
    193 
    +
    194  if (refIndex < refList.size())
    +
    195  {
    +
    196  auto iterPair = refList[refIndex]->getChildren(name);
    +
    197  std::for_each(iterPair.first, iterPair.second,
    +
    198  [&](const XmlElement& child) { childList.push_back(&child); });
    +
    199  }
    +
    200 
    +
    201  return XmlIn(childList, childList.empty() ? getChildNameFormatted(name) : std::string(), log);
    +
    202  }
    +
    203 
    +
    205 
    +
    225  void next() { ++refIndex; }
    +
    226 
    +
    228 
    +
    233  template <class T>
    +
    234  bool operator()(T& value) const
    +
    235  {
    +
    236  if (refIndex < refList.size())
    +
    237  {
    +
    238  bool success = readStruc(*refList[refIndex], value);
    +
    239  if (!success)
    +
    240  log->notifyConversionError(getNameFormatted());
    +
    241  return success;
    +
    242  }
    +
    243  else
    +
    244  {
    +
    245  log->notifyMissingElement(getNameFormatted());
    +
    246  return false;
    +
    247  }
    +
    248  }
    +
    249 
    +
    251 
    +
    268  template <class String, class T>
    +
    269  bool attribute(const String& name, T& value) const
    +
    270  {
    +
    271  if (refIndex < refList.size())
    +
    272  {
    +
    273  bool success = refList[refIndex]->getAttribute(name, value);
    +
    274  if (!success)
    +
    275  log->notifyMissingAttribute(getNameFormatted(), utfCvrtTo<std::string>(name));
    +
    276  return success;
    +
    277  }
    +
    278  else
    +
    279  {
    +
    280  log->notifyMissingElement(getNameFormatted());
    +
    281  return false;
    +
    282  }
    +
    283  }
    +
    284 
    +
    286  const XmlElement* get() const { return refIndex < refList.size() ? refList[refIndex] : nullptr; }
    +
    287 
    +
    289 
    +
    298  operator int ConversionToBool::* () const { return get() ? &ConversionToBool::dummy : nullptr; }
    +
    299 
    +
    301 
    +
    320  bool errorsOccured() const { return !log->elementList().empty(); }
    +
    321 
    +
    323 
    +
    327  template <class String>
    +
    328  std::vector<String> getErrorsAs() const
    +
    329  {
    +
    330  std::vector<String> output;
    +
    331  const auto& elements = log->elementList();
    +
    332  std::transform(elements.begin(), elements.end(), std::back_inserter(output), [](const std::string& str) { return utfCvrtTo<String>(str); });
    +
    333  return output;
    +
    334  }
    +
    335 
    +
    336 private:
    +
    337  XmlIn(const std::vector<const XmlElement*>& siblingList, const std::string& elementNameFmt, const std::shared_ptr<ErrorLog>& sharedlog) :
    +
    338  refList(siblingList), refIndex(0), formattedName(elementNameFmt), log(sharedlog)
    +
    339  { assert((!siblingList.empty() && elementNameFmt.empty()) || (siblingList.empty() && !elementNameFmt.empty())); }
    +
    340 
    +
    341  static std::string getNameFormatted(const XmlElement& elem) //"<Root> <Level1> <Level2>"
    +
    342  {
    +
    343  return (elem.parent() ? getNameFormatted(*elem.parent()) + " " : std::string()) + "<" + elem.getNameAs<std::string>() + ">";
    +
    344  }
    +
    345 
    +
    346  std::string getNameFormatted() const
    +
    347  {
    +
    348  if (refIndex < refList.size())
    +
    349  {
    +
    350  assert(formattedName.empty());
    +
    351  return getNameFormatted(*refList[refIndex]);
    +
    352  }
    +
    353  else
    +
    354  return formattedName;
    +
    355  }
    +
    356 
    +
    357  std::string getChildNameFormatted(const std::string& childName) const
    +
    358  {
    +
    359  std::string parentName = getNameFormatted();
    +
    360  return (parentName.empty() ? std::string() : (parentName + " ")) + "<" + childName + ">";
    +
    361  }
    +
    362 
    +
    363  class ErrorLog
    +
    364  {
    +
    365  public:
    +
    366  void notifyConversionError (const std::string& formattedName) { insert(formattedName); }
    +
    367  void notifyMissingElement (const std::string& formattedName) { insert(formattedName); }
    +
    368  void notifyMissingAttribute(const std::string& formattedName, const std::string& attribName) { insert(formattedName + " @" + attribName); }
    +
    369 
    +
    370  const std::vector<std::string>& elementList() const { return failedElements; }
    +
    371 
    +
    372  private:
    +
    373  void insert(const std::string& newVal)
    +
    374  {
    +
    375  if (usedElements.insert(newVal).second)
    +
    376  failedElements.push_back(newVal);
    +
    377  }
    +
    378 
    +
    379  std::vector<std::string> failedElements; //unique list of failed elements
    +
    380  std::set<std::string> usedElements;
    +
    381  };
    +
    382 
    +
    383  std::vector<const XmlElement*> refList; //all sibling elements with same name (all pointers bound!)
    +
    384  size_t refIndex; //this sibling's index in refList
    +
    385  std::string formattedName; //contains full and formatted element name if (and only if) refList is empty
    +
    386  std::shared_ptr<ErrorLog> log; //always bound
    +
    387 };
    +
    388 }
    +
    389 
    +
    390 #endif //ZEN_XML_BIND_HEADER_9081740816593478258435
    +
    bool errorsOccured() const
    Notifies errors while mapping the XML to user data.
    Definition: bind.h:320
    +
    void save(const XmlDoc &doc, const String &filename, const std::string &lineBreak="\r\n", const std::string &indent=" ")
    Save XML document to a file.
    Definition: bind.h:52
    +
    const XmlElement & root() const
    Get a const reference to the document's root element.
    Definition: dom.h:267
    +
    XmlDoc parse(const std::string &stream)
    Load XML document from a byte stream.
    Definition: parser.h:612
    +
    std::string serialize(const XmlDoc &doc, const std::string &lineBreak="\r\n", const std::string &indent=" ")
    Save XML document as a byte stream.
    Definition: parser.h:287
    +
    XmlOut(XmlDoc &doc)
    Construct an output proxy for an XML document.
    Definition: bind.h:88
    +
    XmlElement & ref()
    Return a reference to the underlying Xml element.
    Definition: bind.h:146
    +
    void saveStream(const std::string &stream, const String &filename)
    Save byte stream to a file.
    Definition: io.h:66
    +
    Proxy class to conveniently convert XML structure to user data.
    Definition: bind.h:154
    +
    void operator()(const T &value)
    Write user data to the underlying XML element.
    Definition: bind.h:115
    +
    std::string loadStream(const String &filename)
    Load byte stream from a file.
    Definition: io.h:94
    +
    XmlIn(const XmlDoc &doc)
    Construct an input proxy for an XML document.
    Definition: bind.h:171
    +
    XmlIn(const XmlElement &element)
    Construct an input proxy for a single XML element.
    Definition: bind.h:181
    +
    void next()
    Refer to next sibling element with the same name.
    Definition: bind.h:225
    +
    An XML element.
    Definition: dom.h:21
    +
    void attribute(const String &name, const T &value)
    Write user data to an XML attribute.
    Definition: bind.h:143
    +
    XmlIn operator[](const String &name) const
    Retrieve a handle to an XML child element for reading.
    Definition: bind.h:190
    +
    The complete XML document.
    Definition: dom.h:249
    +
    bool attribute(const String &name, T &value) const
    Read user data from an XML attribute.
    Definition: bind.h:269
    +
    std::vector< String > getErrorsAs() const
    Get a list of XML element and attribute names which failed to convert to user data.
    Definition: bind.h:328
    +
    Proxy class to conveniently convert user data into XML structure.
    Definition: bind.h:63
    +
    bool operator()(T &value) const
    Read user data from the underlying XML element.
    Definition: bind.h:234
    +
    XmlElement & addChild(const String &name)
    Create a new child element and return a reference to it.
    Definition: dom.h:97
    +
    const XmlElement * getChild(const String &name) const
    Retrieve a child element with the given name.
    Definition: dom.h:113
    +
    bool readStruc(const XmlElement &input, T &value)
    Convert XML element to structured user data.
    Definition: cvrt_struc.h:205
    +
    void setAttribute(const String &name, const T &value)
    Create or update an XML attribute.
    Definition: dom.h:77
    +
    void writeStruc(const T &value, XmlElement &output)
    Convert structured user data into an XML element.
    Definition: cvrt_struc.h:198
    +
    XmlOut operator[](const String &name) const
    Retrieve a handle to an XML child element for writing.
    Definition: bind.h:102
    +
    XmlIn(const XmlElement *element)
    Construct an input proxy for a single XML element, may be nullptr.
    Definition: bind.h:176
    +
    XmlOut(XmlElement &element)
    Construct an output proxy for a single XML element.
    Definition: bind.h:93
    +
    XmlDoc load(const String &filename)
    Load XML document from a file.
    Definition: bind.h:33
    +
    + - diff --git a/zenxml/doc/classes.html b/zenxml/doc/classes.html index 4670ccf3..d14feac0 100644 --- a/zenxml/doc/classes.html +++ b/zenxml/doc/classes.html @@ -3,46 +3,36 @@ + zen::Xml: Class Index - - - - + + - + -
    - - +
    - - - - - -
    zen::Xml -
    Simple C++ XML Processing
    - - + + @@ -51,7 +41,6 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • Main Page
  • Namespaces
  • Classes
  • -
  • Files
  • @@ -78,13 +67,13 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • Class Members
  • -
    +
    - All Classes Namespaces Functions Variables
    + All Classes Namespaces Functions Variables Pages
    @@ -108,13 +97,11 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    - - + - diff --git a/zenxml/doc/classzen_1_1_xml_doc-members.html b/zenxml/doc/classzen_1_1_xml_doc-members.html index 4a936065..b635379d 100644 --- a/zenxml/doc/classzen_1_1_xml_doc-members.html +++ b/zenxml/doc/classzen_1_1_xml_doc-members.html @@ -3,46 +3,36 @@ + zen::Xml: Member List - - - - + + - + -
    - - +
    - - - - - -
    zen::Xml -
    Simple C++ XML Processing
    - - + + @@ -51,7 +41,6 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • Main Page
  • Namespaces
  • Classes
  • -
  • Files
  • @@ -83,7 +72,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> - All Classes Namespaces Functions Variables
    + All Classes Namespaces Functions Variables Pages
  • @@ -92,37 +81,35 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    - + +
    zen::XmlDoc Member List
    -This is the complete list of members for zen::XmlDoc, including all inherited members. - - - - - - - - - - -
    getEncodingAs() const zen::XmlDoc
    getStandaloneAs() const zen::XmlDoc
    getVersionAs() const zen::XmlDoc
    root() const zen::XmlDoc
    root()zen::XmlDoc
    setEncoding(const String &encoding)zen::XmlDoc
    setStandalone(const String &standalone)zen::XmlDoc
    setVersion(const String &version)zen::XmlDoc
    XmlDoc()zen::XmlDoc
    XmlDoc(String rootName)zen::XmlDoc
    - +

    This is the complete list of members for zen::XmlDoc, including all inherited members.

    + + + + + + + + + + + +
    getEncodingAs() const zen::XmlDoc
    getStandaloneAs() const zen::XmlDoc
    getVersionAs() const zen::XmlDoc
    root() const zen::XmlDoc
    root()zen::XmlDoc
    setEncoding(const String &encoding)zen::XmlDoc
    setStandalone(const String &standalone)zen::XmlDoc
    setVersion(const String &version)zen::XmlDoc
    XmlDoc()zen::XmlDoc
    XmlDoc(String rootName)zen::XmlDoc
    + - diff --git a/zenxml/doc/classzen_1_1_xml_doc.html b/zenxml/doc/classzen_1_1_xml_doc.html index 80e05844..174e84fc 100644 --- a/zenxml/doc/classzen_1_1_xml_doc.html +++ b/zenxml/doc/classzen_1_1_xml_doc.html @@ -3,46 +3,36 @@ + zen::Xml: zen::XmlDoc Class Reference - - - - + + - + -
    - - +
    - - - - - -
    zen::Xml -
    Simple C++ XML Processing
    - - + + @@ -51,7 +41,6 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • Main Page
  • Namespaces
  • Classes
  • -
  • Files
  • @@ -83,7 +72,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> - All Classes Namespaces Functions Variables
    + All Classes Namespaces Functions Variables Pages
  • @@ -92,16 +81,15 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    - + +
    +Public Member Functions | +List of all members
    zen::XmlDoc Class Reference
    @@ -111,44 +99,52 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); More...

    #include <dom.h>

    - -

    List of all members.

    - + + + + - + + - + + - + + - + + - + + - + +

    +

    Public Member Functions

     XmlDoc ()
     Default constructor setting up an empty XML document with a standard declaration: <?xml version="1.0" encoding="UTF-8" ?>
     
    template<class String >
     XmlDoc (String rootName)
     
    const XmlElementroot () const
     Get a const reference to the document's root element.
     
    XmlElementroot ()
     Get a reference to the document's root element.
     
    template<class String >
    String getVersionAs () const
     Get the version used in the XML declaration.
     Get the version used in the XML declaration. More...
     
    template<class String >
    void setVersion (const String &version)
     Set the version used in the XML declaration.
     Set the version used in the XML declaration. More...
     
    template<class String >
    String getEncodingAs () const
     Get the encoding used in the XML declaration.
     Get the encoding used in the XML declaration. More...
     
    template<class String >
    void setEncoding (const String &encoding)
     Set the encoding used in the XML declaration.
     Set the encoding used in the XML declaration. More...
     
    template<class String >
    String getStandaloneAs () const
     Get the standalone string used in the XML declaration.
     Get the standalone string used in the XML declaration. More...
     
    template<class String >
    void setStandalone (const String &standalone)
     Set the standalone string used in the XML declaration.
     Set the standalone string used in the XML declaration. More...
     
    -

    Detailed Description

    +

    Detailed Description

    The complete XML document.

    -

    Constructor & Destructor Documentation

    +

    Constructor & Destructor Documentation

    @@ -156,22 +152,21 @@ const XmlElement & template<class String >
    - +
    zen::XmlDoc::XmlDoc zen::XmlDoc::XmlDoc ( String  rootName)
    -
    -
    -
    Template Parameters:
    - +
    +
    Template Parameters
    +
    StringArbitrary string-like type: e.g. std::string, wchar_t*, char[], wchar_t, wxString, MyStringClass, ...
    -
    Parameters:
    +
    Parameters
    rootNameThe name of the XML document's root element.
    @@ -180,7 +175,7 @@ template<class String >
    -

    Member Function Documentation

    +

    Member Function Documentation

    @@ -188,18 +183,17 @@ template<class String >
    template<class String >
    - +
    String zen::XmlDoc::getEncodingAs String zen::XmlDoc::getEncodingAs ( ) const
    - -
    +

    Get the encoding used in the XML declaration.

    -
    Template Parameters:
    - +
    Template Parameters
    +
    StringArbitrary string class: e.g. std::string, std::wstring, wxString, MyStringClass, ...
    @@ -214,18 +208,17 @@ template<class String >
    template<class String > - +
    String zen::XmlDoc::getStandaloneAs String zen::XmlDoc::getStandaloneAs ( ) const
    - -
    +

    Get the standalone string used in the XML declaration.

    -
    Template Parameters:
    - +
    Template Parameters
    +
    StringArbitrary string class: e.g. std::string, std::wstring, wxString, MyStringClass, ...
    @@ -240,18 +233,17 @@ template<class String >
    template<class String > - +
    String zen::XmlDoc::getVersionAs String zen::XmlDoc::getVersionAs ( ) const
    - -
    +

    Get the version used in the XML declaration.

    -
    Template Parameters:
    - +
    Template Parameters
    +
    StringArbitrary string class: e.g. std::string, std::wstring, wxString, MyStringClass, ...
    @@ -266,19 +258,18 @@ template<class String >
    template<class String > - +
    void zen::XmlDoc::setEncoding void zen::XmlDoc::setEncoding ( const String &  encoding)
    - -
    +

    Set the encoding used in the XML declaration.

    -
    Template Parameters:
    - +
    Template Parameters
    +
    StringArbitrary string-like type: e.g. std::string, wchar_t*, char[], wchar_t, wxString, MyStringClass, ...
    @@ -293,19 +284,18 @@ template<class String >
    template<class String > - +
    void zen::XmlDoc::setStandalone void zen::XmlDoc::setStandalone ( const String &  standalone)
    - -
    +

    Set the standalone string used in the XML declaration.

    -
    Template Parameters:
    - +
    Template Parameters
    +
    StringArbitrary string-like type: e.g. std::string, wchar_t*, char[], wchar_t, wxString, MyStringClass, ...
    @@ -320,19 +310,18 @@ template<class String >
    template<class String > - +
    void zen::XmlDoc::setVersion void zen::XmlDoc::setVersion ( const String &  version)
    - -
    +

    Set the version used in the XML declaration.

    -
    Template Parameters:
    - +
    Template Parameters
    +
    StringArbitrary string-like type: e.g. std::string, wchar_t*, char[], wchar_t, wxString, MyStringClass, ...
    @@ -341,13 +330,11 @@ template<class String >
    - - + - diff --git a/zenxml/doc/classzen_1_1_xml_element-members.html b/zenxml/doc/classzen_1_1_xml_element-members.html index bccd92d1..90f795dd 100644 --- a/zenxml/doc/classzen_1_1_xml_element-members.html +++ b/zenxml/doc/classzen_1_1_xml_element-members.html @@ -3,46 +3,36 @@ + zen::Xml: Member List - - - - + + - + -
    - - +
    - - - - - -
    zen::Xml -
    Simple C++ XML Processing
    - - + + @@ -51,7 +41,6 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • Main Page
  • Namespaces
  • Classes
  • -
  • Files
  • @@ -83,7 +72,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> - All Classes Namespaces Functions Variables
    + All Classes Namespaces Functions Variables Pages
  • @@ -92,42 +81,40 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    - + +
    zen::XmlElement Member List
    -This is the complete list of members for zen::XmlElement, including all inherited members. - - - - - - - - - - - - - - - -
    addChild(const String &name)zen::XmlElement
    getAttribute(const String &name, T &value) const zen::XmlElement
    getChild(const String &name) const zen::XmlElement
    getChild(const String &name)zen::XmlElement
    getChildren(const String &name) const zen::XmlElement
    getChildren(const String &name)zen::XmlElement
    getChildren() const zen::XmlElement
    getChildren()zen::XmlElement
    getNameAs() const zen::XmlElement
    getValue(T &value) const zen::XmlElement
    parent()zen::XmlElement
    parent() const zen::XmlElement
    removeAttribute(const String &name)zen::XmlElement
    setAttribute(const String &name, const T &value)zen::XmlElement
    setValue(const T &value)zen::XmlElement
    - +

    This is the complete list of members for zen::XmlElement, including all inherited members.

    + + + + + + + + + + + + + + + + +
    addChild(const String &name)zen::XmlElement
    getAttribute(const String &name, T &value) const zen::XmlElement
    getChild(const String &name) const zen::XmlElement
    getChild(const String &name)zen::XmlElement
    getChildren(const String &name) const zen::XmlElement
    getChildren(const String &name)zen::XmlElement
    getChildren() const zen::XmlElement
    getChildren()zen::XmlElement
    getNameAs() const zen::XmlElement
    getValue(T &value) const zen::XmlElement
    parent()zen::XmlElement
    parent() const zen::XmlElement
    removeAttribute(const String &name)zen::XmlElement
    setAttribute(const String &name, const T &value)zen::XmlElement
    setValue(const T &value)zen::XmlElement
    + - diff --git a/zenxml/doc/classzen_1_1_xml_element.html b/zenxml/doc/classzen_1_1_xml_element.html index fc87396a..17eef773 100644 --- a/zenxml/doc/classzen_1_1_xml_element.html +++ b/zenxml/doc/classzen_1_1_xml_element.html @@ -3,46 +3,36 @@ + zen::Xml: zen::XmlElement Class Reference - - - - + + - + -
    - - +
    - - - - - -
    zen::Xml -
    Simple C++ XML Processing
    - - + + @@ -51,7 +41,6 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • Main Page
  • Namespaces
  • Classes
  • -
  • Files
  • @@ -83,7 +72,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> - All Classes Namespaces Functions Variables
    + All Classes Namespaces Functions Variables Pages
  • @@ -92,16 +81,15 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    - + +
    +Public Member Functions | +List of all members
    zen::XmlElement Class Reference
    @@ -111,57 +99,70 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); More...

    #include <dom.h>

    - -

    List of all members.

    - - + + - + + - + + - + + - + + - + + - + + - + + + - + + + - + + + + +

    +

    Public Member Functions

    template<class String >
    String getNameAs () const
     Retrieve the name of this XML element.
     Retrieve the name of this XML element. More...
     
    template<class T >
    bool getValue (T &value) const
     Get the value of this element as a user type.
     Get the value of this element as a user type. More...
     
    template<class T >
    void setValue (const T &value)
     Set the value of this element.
     Set the value of this element. More...
     
    template<class String , class T >
    bool getAttribute (const String &name, T &value) const
     Retrieve an attribute by name.
     Retrieve an attribute by name. More...
     
    template<class String , class T >
    void setAttribute (const String &name, const T &value)
     Create or update an XML attribute.
     Create or update an XML attribute. More...
     
    template<class String >
    void removeAttribute (const String &name)
     Remove the attribute with the given name.
     Remove the attribute with the given name. More...
     
    template<class String >
    XmlElementaddChild (const String &name)
     Create a new child element and return a reference to it.
     Create a new child element and return a reference to it. More...
     
    template<class String >
    const XmlElementgetChild (const String &name) const
     Retrieve a child element with the given name.
     Retrieve a child element with the given name. More...
     
    template<class String >
    XmlElementgetChild (const String &name)
     
    template<class String >
    std::pair< ChildIterConst2,
    ChildIterConst2 > 
    getChildren (const String &name) const
     Access all child elements with the given name via STL iterators.
     Access all child elements with the given name via STL iterators. More...
     
    template<class String >
    std::pair< ChildIter2, ChildIter2 > getChildren (const String &name)
     
    std::pair< ChildIterConst,
    ChildIterConst > 
    getChildren () const
     Access all child elements sequentially via STL iterators.
     Access all child elements sequentially via STL iterators. More...
     
    std::pair< ChildIter, ChildIter > getChildren ()
     
    XmlElementparent ()
     Get parent XML element, may be nullptr for root element.
     
    const XmlElementparent () const
     Get parent XML element, may be nullptr for root element.
     
    -

    Detailed Description

    +

    Detailed Description

    An XML element.

    -

    Member Function Documentation

    +

    Member Function Documentation

    @@ -169,24 +170,23 @@ const XmlElement * < template<class String >
    - +
    XmlElement& zen::XmlElement::addChild XmlElement& zen::XmlElement::addChild ( const String &  name)
    -
    -
    +

    Create a new child element and return a reference to it.

    -
    Template Parameters:
    - +
    Template Parameters
    +
    StringArbitrary string-like type: e.g. std::string, wchar_t*, char[], wchar_t, wxString, MyStringClass, ...
    -
    Parameters:
    +
    Parameters
    nameThe name of the child element to be created.
    @@ -202,7 +202,7 @@ template<class String >
    template<class String , class T > - + @@ -219,25 +219,24 @@ template<class String , class T >
    bool zen::XmlElement::getAttribute bool zen::XmlElement::getAttribute ( const String &  name, const
    - -
    +

    Retrieve an attribute by name.

    -
    Template Parameters:
    - +
    Template Parameters
    +
    StringArbitrary string-like type: e.g. std::string, wchar_t*, char[], wchar_t, wxString, MyStringClass, ...
    TString-convertible user data type: e.g. any string class, all built-in arithmetic numbers
    -
    Parameters:
    +
    Parameters
    nameThe name of the attribute to retrieve.
    valueThe value of the attribute converted to T.
    -
    Returns:
    "true" if value was retrieved successfully.
    +
    Returns
    "true" if value was retrieved successfully.
    @@ -248,30 +247,29 @@ template<class String , class T > template<class String > - +
    const XmlElement* zen::XmlElement::getChild const XmlElement* zen::XmlElement::getChild ( const String &  name) const
    - -
    +

    Retrieve a child element with the given name.

    -
    Template Parameters:
    - +
    Template Parameters
    +
    StringArbitrary string-like type: e.g. std::string, wchar_t*, char[], wchar_t, wxString, MyStringClass, ...
    -
    Parameters:
    +
    Parameters
    nameThe name of the child element to be retrieved.
    -
    Returns:
    A pointer to the child element or nullptr if none was found.
    +
    Returns
    A pointer to the child element or nullptr if none was found.
    @@ -282,16 +280,15 @@ template<class String > template<class String > - +
    XmlElement* zen::XmlElement::getChild XmlElement* zen::XmlElement::getChild ( const String &  name)
    - -
    -
    See also:
    getChild
    +
    +
    See Also
    getChild
    @@ -302,27 +299,26 @@ template<class String > template<class String > - +
    std::pair<ChildIterConst2, ChildIterConst2> zen::XmlElement::getChildren std::pair<ChildIterConst2, ChildIterConst2> zen::XmlElement::getChildren ( const String &  name) const
    - -
    +

    Access all child elements with the given name via STL iterators.

    -
          auto iterPair = elem.getChildren("Item");
    -      std::for_each(iterPair.first, iterPair.second,
    -            [](const XmlElement& child) { ... });
    -
    Parameters:
    +
    auto iterPair = elem.getChildren("Item");
    +
    std::for_each(iterPair.first, iterPair.second,
    +
    [](const XmlElement& child) { ... });
    +
    Parameters
    nameThe name of the child elements to be retrieved.
    -
    Returns:
    A pair of STL begin/end iterators to access the child elements sequentially.
    +
    Returns
    A pair of STL begin/end iterators to access the child elements sequentially.
    @@ -333,16 +329,15 @@ template<class String > template<class String > - +
    std::pair<ChildIter2, ChildIter2> zen::XmlElement::getChildren std::pair<ChildIter2, ChildIter2> zen::XmlElement::getChildren ( const String &  name)
    - -
    -
    See also:
    getChildren
    +
    +
    See Also
    getChildren
    @@ -351,20 +346,19 @@ template<class String >
    - +
    std::pair<ChildIterConst, ChildIterConst> zen::XmlElement::getChildren std::pair<ChildIterConst, ChildIterConst> zen::XmlElement::getChildren ( ) const
    -
    -
    +

    Access all child elements sequentially via STL iterators.

    -
          auto iterPair = elem.getChildren();
    -      std::for_each(iterPair.first, iterPair.second,
    -            [](const XmlElement& child) { ... });
    -
    Returns:
    A pair of STL begin/end iterators to access all child elements sequentially.
    +
    auto iterPair = elem.getChildren();
    +
    std::for_each(iterPair.first, iterPair.second,
    +
    [](const XmlElement& child) { ... });
    +
    Returns
    A pair of STL begin/end iterators to access all child elements sequentially.
    @@ -373,15 +367,14 @@ template<class String >
    - +
    std::pair<ChildIter, ChildIter> zen::XmlElement::getChildren std::pair<ChildIter, ChildIter> zen::XmlElement::getChildren ( )
    -
    -
    -
    See also:
    getChildren
    +
    +
    See Also
    getChildren
    @@ -392,23 +385,22 @@ template<class String > template<class String > - +
    String zen::XmlElement::getNameAs String zen::XmlElement::getNameAs ( ) const
    - -
    +

    Retrieve the name of this XML element.

    -
    Template Parameters:
    - +
    Template Parameters
    +
    StringArbitrary string class: e.g. std::string, std::wstring, wxString, MyStringClass, ...
    -
    Returns:
    Name of the XML element.
    +
    Returns
    Name of the XML element.
    @@ -419,24 +411,23 @@ template<class String > template<class T > - +
    bool zen::XmlElement::getValue bool zen::XmlElement::getValue ( T &  value) const
    - -
    +

    Get the value of this element as a user type.

    -
    Template Parameters:
    - +
    Template Parameters
    +
    TArbitrary user data type: e.g. any string class, all built-in arithmetic numbers, STL container, ...
    -
    Returns:
    "true" if Xml element was successfully converted to value, cannot fail for string-like types
    +
    Returns
    "true" if Xml element was successfully converted to value, cannot fail for string-like types
    @@ -447,19 +438,18 @@ template<class T > template<class String > - +
    void zen::XmlElement::removeAttribute void zen::XmlElement::removeAttribute ( const String &  name)
    - -
    +

    Remove the attribute with the given name.

    -
    Template Parameters:
    - +
    Template Parameters
    +
    StringArbitrary string-like type: e.g. std::string, wchar_t*, char[], wchar_t, wxString, MyStringClass, ...
    @@ -474,7 +464,7 @@ template<class String >
    template<class String , class T > - + @@ -491,18 +481,17 @@ template<class String , class T >
    void zen::XmlElement::setAttribute void zen::XmlElement::setAttribute ( const String &  name,
    - -
    +

    Create or update an XML attribute.

    -
    Template Parameters:
    - +
    Template Parameters
    +
    StringArbitrary string-like type: e.g. std::string, wchar_t*, char[], wchar_t, wxString, MyStringClass, ...
    TString-convertible user data type: e.g. any string-like type, all built-in arithmetic numbers
    -
    Parameters:
    +
    Parameters
    @@ -519,19 +508,18 @@ template<class String , class T > template<class T >
    nameThe name of the attribute to create or update.
    valueThe value to set.
    - +
    void zen::XmlElement::setValue void zen::XmlElement::setValue ( const T &  value)
    -
    -
    +

    Set the value of this element.

    -
    Template Parameters:
    - +
    Template Parameters
    +
    TArbitrary user data type: e.g. any string-like type, all built-in arithmetic numbers, STL container, ...
    @@ -540,13 +528,11 @@ template<class T >
    - - + - diff --git a/zenxml/doc/classzen_1_1_xml_in-members.html b/zenxml/doc/classzen_1_1_xml_in-members.html index 794b180d..56de270c 100644 --- a/zenxml/doc/classzen_1_1_xml_in-members.html +++ b/zenxml/doc/classzen_1_1_xml_in-members.html @@ -3,46 +3,36 @@ + zen::Xml: Member List - - - - + + - + -
    - - +
    - - - - - -
    zen::Xml -
    Simple C++ XML Processing
    - - + + @@ -51,7 +41,6 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • Main Page
  • Namespaces
  • Classes
  • -
  • Files
  • @@ -83,7 +72,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> - All Classes Namespaces Functions Variables
    + All Classes Namespaces Functions Variables Pages
  • @@ -92,38 +81,36 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    - + +
    zen::XmlIn Member List
    -This is the complete list of members for zen::XmlIn, including all inherited members. - - - - - - - - - - - -
    attribute(const String &name, T &value) const zen::XmlIn
    errorsOccured() const zen::XmlIn
    get() const zen::XmlIn
    getErrorsAs() const zen::XmlIn
    next()zen::XmlIn
    operator int ConversionToBool::*() const zen::XmlIn
    operator()(T &value) const zen::XmlIn
    operator[](const String &name) const zen::XmlIn
    XmlIn(const XmlDoc &doc)zen::XmlIn
    XmlIn(const XmlElement *element)zen::XmlIn
    XmlIn(const XmlElement &element)zen::XmlIn
    - +

    This is the complete list of members for zen::XmlIn, including all inherited members.

    + + + + + + + + + + + + +
    attribute(const String &name, T &value) const zen::XmlIn
    errorsOccured() const zen::XmlIn
    get() const zen::XmlIn
    getErrorsAs() const zen::XmlIn
    next()zen::XmlIn
    operator int ConversionToBool::*() const zen::XmlIn
    operator()(T &value) const zen::XmlIn
    operator[](const String &name) const zen::XmlIn
    XmlIn(const XmlDoc &doc)zen::XmlIn
    XmlIn(const XmlElement *element)zen::XmlIn
    XmlIn(const XmlElement &element)zen::XmlIn
    + - diff --git a/zenxml/doc/classzen_1_1_xml_in.html b/zenxml/doc/classzen_1_1_xml_in.html index f1093061..15153347 100644 --- a/zenxml/doc/classzen_1_1_xml_in.html +++ b/zenxml/doc/classzen_1_1_xml_in.html @@ -3,46 +3,36 @@ + zen::Xml: zen::XmlIn Class Reference - - - - + + - + -
    - - +
    - - - - - -
    zen::Xml -
    Simple C++ XML Processing
    - - + + @@ -51,7 +41,6 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • Main Page
  • Namespaces
  • Classes
  • -
  • Files
  • @@ -83,7 +72,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> - All Classes Namespaces Functions Variables
    + All Classes Namespaces Functions Variables Pages
  • @@ -92,16 +81,15 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    - + +
    +Public Member Functions | +List of all members
    zen::XmlIn Class Reference
    @@ -111,65 +99,73 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); More...

    #include <bind.h>

    - -

    List of all members.

    - - + + - + + - + + - + + - + + - + + - + + + - + + - + + - + +

    +

    Public Member Functions

     XmlIn (const XmlDoc &doc)
     Construct an input proxy for an XML document.
     Construct an input proxy for an XML document. More...
     
     XmlIn (const XmlElement *element)
     Construct an input proxy for a single XML element, may be nullptr.
     Construct an input proxy for a single XML element, may be nullptr. More...
     
     XmlIn (const XmlElement &element)
     Construct an input proxy for a single XML element.
     Construct an input proxy for a single XML element. More...
     
    template<class String >
    XmlIn operator[] (const String &name) const
     Retrieve a handle to an XML child element for reading.
     Retrieve a handle to an XML child element for reading. More...
     
    void next ()
     Refer to next sibling element with the same name.
     Refer to next sibling element with the same name. More...
     
    template<class T >
    bool operator() (T &value) const
     Read user data from the underlying XML element.
     Read user data from the underlying XML element. More...
     
    template<class String , class T >
    bool attribute (const String &name, T &value) const
     Read user data from an XML attribute.
     Read user data from an XML attribute. More...
     
    const XmlElementget () const
     Return a pointer to the underlying Xml element, may be nullptr.
     
     operator int ConversionToBool::* () const
     Test whether the underlying XML element exists.
     Test whether the underlying XML element exists. More...
     
    bool errorsOccured () const
     Notifies errors while mapping the XML to user data.
     Notifies errors while mapping the XML to user data. More...
     
    template<class String >
    std::vector< String > getErrorsAs () const
     Get a list of XML element and attribute names which failed to convert to user data.
     Get a list of XML element and attribute names which failed to convert to user data. More...
     
    -

    Detailed Description

    +

    Detailed Description

    Proxy class to conveniently convert XML structure to user data.

    -

    Constructor & Destructor Documentation

    +

    Constructor & Destructor Documentation

    - +
    zen::XmlIn::XmlIn zen::XmlIn::XmlIn ( const XmlDoc doc)
    -
    -
    +

    Construct an input proxy for an XML document.

    -
            zen::XmlDoc doc;
    -          ... //load document
    -        zen::XmlIn in(doc);
    -        in["elem1"](value1); //
    -        in["elem2"](value2); //read data from XML elements into variables "value1", "value2", "value3"
    -        in["elem3"](value3); //
    -
    +
    +
    ... //load document
    +
    zen::XmlIn in(doc);
    +
    in["elem1"](value1); //
    +
    in["elem2"](value2); //read data from XML elements into variables "value1", "value2", "value3"
    +
    in["elem3"](value3); //
    +
    @@ -177,18 +173,17 @@ const XmlElement * <
    - +
    zen::XmlIn::XmlIn zen::XmlIn::XmlIn ( const XmlElement element)
    -
    -
    +

    Construct an input proxy for a single XML element, may be nullptr.

    -
    See also:
    XmlIn(const XmlDoc& doc)
    +
    See Also
    XmlIn(const XmlDoc& doc)
    @@ -197,22 +192,21 @@ const XmlElement * <
    - +
    zen::XmlIn::XmlIn zen::XmlIn::XmlIn ( const XmlElement element)
    -
    -
    +

    Construct an input proxy for a single XML element.

    -
    See also:
    XmlIn(const XmlDoc& doc)
    +
    See Also
    XmlIn(const XmlDoc& doc)
    -

    Member Function Documentation

    +

    Member Function Documentation

    @@ -220,7 +214,7 @@ const XmlElement * < template<class String , class T >
    - + @@ -237,26 +231,25 @@ template<class String , class T >
    bool zen::XmlIn::attribute bool zen::XmlIn::attribute ( const String &  name, const
    -
    -
    +

    Read user data from an XML attribute.

    -

    This conversion requires a specialization of zen::readText() for type T.

    -
            zen::XmlDoc doc;
    -          ... //load document
    -        zen::XmlIn in(doc);
    -        in["elem"].attribute("attr1", value1); //
    -        in["elem"].attribute("attr2", value2); //read data from XML attributes into variables "value1", "value2", "value3"
    -        in["elem"].attribute("attr3", value3); //
    -
    Template Parameters:
    - +

    This conversion requires a specialization of zen::readText() for type T.

    +
    +
    ... //load document
    +
    zen::XmlIn in(doc);
    +
    in["elem"].attribute("attr1", value1); //
    +
    in["elem"].attribute("attr2", value2); //read data from XML attributes into variables "value1", "value2", "value3"
    +
    in["elem"].attribute("attr3", value3); //
    +
    Template Parameters
    +
    StringArbitrary string-like type: e.g. std::string, wchar_t*, char[], wchar_t, wxString, MyStringClass, ...
    TString-convertible user data type: e.g. any string-like type, all built-in arithmetic numbers
    -
    Returns:
    "true" if the attribute was found and the conversion to the output value was successful.
    -
    See also:
    XmlElement::getAttribute()
    +
    Returns
    "true" if the attribute was found and the conversion to the output value was successful.
    +
    See Also
    XmlElement::getAttribute()
    @@ -265,28 +258,27 @@ template<class String , class T >
    - +
    bool zen::XmlIn::errorsOccured bool zen::XmlIn::errorsOccured ( ) const
    -
    -
    +

    Notifies errors while mapping the XML to user data.

    -

    Error logging is shared by each hiearchy of XmlIn proxy instances that are created from each other. Consequently it doesn't matter which instance you query for errors:

    -
            XmlIn in(doc);
    -        XmlIn inItem = in["item1"];
    -
    -        int value = 0;
    -        inItem(value); //let's assume this conversion failed
    -
    -        assert(in.errorsOccured() == inItem.errorsOccured());
    -        assert(in.getErrorsAs<std::string>() == inItem.getErrorsAs<std::string>());
    -

    Note that error logging is NOT global, but owned by all instances of a hierarchy of XmlIn proxies. Therefore it's safe to use unrelated XmlIn proxies in multiple threads.
    +

    Error logging is shared by each hiearchy of XmlIn proxy instances that are created from each other. Consequently it doesn't matter which instance you query for errors:

    +
    XmlIn in(doc);
    +
    XmlIn inItem = in["item1"];
    +
    +
    int value = 0;
    +
    inItem(value); //let's assume this conversion failed
    +
    +
    assert(in.errorsOccured() == inItem.errorsOccured());
    +
    assert(in.getErrorsAs<std::string>() == inItem.getErrorsAs<std::string>());
    +

    Note that error logging is NOT global, but owned by all instances of a hierarchy of XmlIn proxies. Therefore it's safe to use unrelated XmlIn proxies in multiple threads.

    - However be aware that the chain of connected proxy instances will be broken once you call XmlIn::get() to retrieve the underlying pointer. Errors that occur when working with this pointer are not logged by the original set of related instances.

    + However be aware that the chain of connected proxy instances will be broken once you call XmlIn::get() to retrieve the underlying pointer. Errors that occur when working with this pointer are not logged by the original set of related instances.

    @@ -297,23 +289,22 @@ template<class String , class T > template<class String > - +
    std::vector<String> zen::XmlIn::getErrorsAs std::vector<String> zen::XmlIn::getErrorsAs ( ) const
    - -
    +

    Get a list of XML element and attribute names which failed to convert to user data.

    -
    Template Parameters:
    - +
    Template Parameters
    +
    StringArbitrary string class: e.g. std::string, std::wstring, wxString, MyStringClass, ...
    -
    Returns:
    A list of XML element and attribute names, empty list if no errors occured.
    +
    Returns
    A list of XML element and attribute names, empty list if no errors occured.
    @@ -322,29 +313,29 @@ template<class String >
    - +
    void zen::XmlIn::next void zen::XmlIn::next ( )
    -
    -
    +

    Refer to next sibling element with the same name.

    Example: Loop over all XML child elements named "Item"

    -
        <?xml version="1.0" encoding="UTF-8"?>
    -    <Root>
    -        <Item>1</Item>
    -        <Item>3</Item>
    -        <Item>5</Item>
    -    </Root>
        zen::XmlIn in(doc);
    -    ...
    -    for (zen::XmlIn child = in["Item"]; child; child.next())
    -    {
    -        ...
    -    }
    -
    +
    <?xml version="1.0" encoding="UTF-8"?>
    +<Root>
    +    <Item>1</Item>
    +    <Item>3</Item>
    +    <Item>5</Item>
    +</Root>
    +
    zen::XmlIn in(doc);
    +
    ...
    +
    for (zen::XmlIn child = in["Item"]; child; child.next())
    +
    {
    +
    ...
    +
    }
    +
    @@ -358,15 +349,14 @@ template<class String > const - -
    +

    Test whether the underlying XML element exists.

    -
             XmlIn in(doc);
    -         XmlIn child = in["elem1"];
    -         if (child)
    -           ...
    -

    Use member pointer as implicit conversion to bool (C++ Templates - Vandevoorde/Josuttis; chapter 20)

    +
    XmlIn in(doc);
    +
    XmlIn child = in["elem1"];
    +
    if (child)
    +
    ...
    +

    Use member pointer as implicit conversion to bool (C++ Templates - Vandevoorde/Josuttis; chapter 20)

    @@ -384,18 +374,17 @@ template<class T > const - -
    +

    Read user data from the underlying XML element.

    -

    This conversion requires a specialization of zen::readText() or zen::readStruc() for type T.

    -
    Template Parameters:
    - +

    This conversion requires a specialization of zen::readText() or zen::readStruc() for type T.

    +
    Template Parameters
    +
    TUser type that receives the data
    -
    Returns:
    "true" if data was read successfully
    +
    Returns
    "true" if data was read successfully
    @@ -413,18 +402,17 @@ template<class String > const - -
    +

    Retrieve a handle to an XML child element for reading.

    It is not an error if the child element does not exist, but only later if a conversion to user data is attempted.

    -
    Template Parameters:
    - +
    Template Parameters
    +
    StringArbitrary string-like type: e.g. std::string, wchar_t*, char[], wchar_t, wxString, MyStringClass, ...
    -
    Parameters:
    +
    Parameters
    nameThe name of the child element
    @@ -434,13 +422,11 @@ template<class String >
    - - + - diff --git a/zenxml/doc/classzen_1_1_xml_out-members.html b/zenxml/doc/classzen_1_1_xml_out-members.html index 368b094f..0bcc8777 100644 --- a/zenxml/doc/classzen_1_1_xml_out-members.html +++ b/zenxml/doc/classzen_1_1_xml_out-members.html @@ -3,46 +3,36 @@ + zen::Xml: Member List - - - - + + - + -
    - - +
    - - - - - -
    zen::Xml -
    Simple C++ XML Processing
    - - + + @@ -51,7 +41,6 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • Main Page
  • Namespaces
  • Classes
  • -
  • Files
  • @@ -83,7 +72,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> - All Classes Namespaces Functions Variables
    + All Classes Namespaces Functions Variables Pages
  • @@ -92,33 +81,31 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    - + +
    zen::XmlOut Member List
    -This is the complete list of members for zen::XmlOut, including all inherited members. - - - - - - -
    attribute(const String &name, const T &value)zen::XmlOut
    operator()(const T &value)zen::XmlOut
    operator[](const String &name) const zen::XmlOut
    ref()zen::XmlOut
    XmlOut(XmlDoc &doc)zen::XmlOut
    XmlOut(XmlElement &element)zen::XmlOut
    - +

    This is the complete list of members for zen::XmlOut, including all inherited members.

    + + + + + + + +
    attribute(const String &name, const T &value)zen::XmlOut
    operator()(const T &value)zen::XmlOut
    operator[](const String &name) const zen::XmlOut
    ref()zen::XmlOut
    XmlOut(XmlDoc &doc)zen::XmlOut
    XmlOut(XmlElement &element)zen::XmlOut
    + - diff --git a/zenxml/doc/classzen_1_1_xml_out.html b/zenxml/doc/classzen_1_1_xml_out.html index e7fea1d5..33434c67 100644 --- a/zenxml/doc/classzen_1_1_xml_out.html +++ b/zenxml/doc/classzen_1_1_xml_out.html @@ -3,46 +3,36 @@ + zen::Xml: zen::XmlOut Class Reference - - - - + + - + -
    - - +
    - - - - - -
    zen::Xml -
    Simple C++ XML Processing
    - - + + @@ -51,7 +41,6 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • Main Page
  • Namespaces
  • Classes
  • -
  • Files
  • @@ -83,7 +72,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> - All Classes Namespaces Functions Variables
    + All Classes Namespaces Functions Variables Pages
  • @@ -92,16 +81,15 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    - + +
    +Public Member Functions | +List of all members
    zen::XmlOut Class Reference
    @@ -111,62 +99,66 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); More...

    #include <bind.h>

    - -

    List of all members.

    - - + + - + + - + + - + + - + + +

    +

    Public Member Functions

     XmlOut (XmlDoc &doc)
     Construct an output proxy for an XML document.
     Construct an output proxy for an XML document. More...
     
     XmlOut (XmlElement &element)
     Construct an output proxy for a single XML element.
     Construct an output proxy for a single XML element. More...
     
    template<class String >
    XmlOut operator[] (const String &name) const
     Retrieve a handle to an XML child element for writing.
     Retrieve a handle to an XML child element for writing. More...
     
    template<class T >
    void operator() (const T &value)
     Write user data to the underlying XML element.
     Write user data to the underlying XML element. More...
     
    template<class String , class T >
    void attribute (const String &name, const T &value)
     Write user data to an XML attribute.
     Write user data to an XML attribute. More...
     
    XmlElementref ()
     Return a reference to the underlying Xml element.
     
    -

    Detailed Description

    +

    Detailed Description

    Proxy class to conveniently convert user data into XML structure.

    -

    Constructor & Destructor Documentation

    +

    Constructor & Destructor Documentation

    - +
    zen::XmlOut::XmlOut zen::XmlOut::XmlOut ( XmlDoc doc)
    -
    -
    +

    Construct an output proxy for an XML document.

    -
            zen::XmlDoc doc;
    -
    -        zen::XmlOut out(doc);
    -        out["elem1"]( 1); //
    -        out["elem2"]( 2); //write data into XML elements
    -        out["elem3"](-3); //
    -
    -        save(doc, "out.xml"); //throw XmlFileError
    -

    Output:

    -
          <?xml version="1.0" encoding="UTF-8"?>
    -      <Root>
    -          <elem1>1</elem1>
    -          <elem2>2</elem2>
    -          <elem3>-3</elem3>
    -      </Root>
    +
    +
    +
    zen::XmlOut out(doc);
    +
    out["elem1"]( 1); //
    +
    out["elem2"]( 2); //write data into XML elements
    +
    out["elem3"](-3); //
    +
    +
    save(doc, "out.xml"); //throw XmlFileError
    +

    Output:

    +
    <?xml version="1.0" encoding="UTF-8"?>
    +<Root>
    +    <elem1>1</elem1>
    +    <elem2>2</elem2>
    +    <elem3>-3</elem3>
    +</Root>
    +
    @@ -174,22 +166,21 @@ Public Member Functions
    - +
    zen::XmlOut::XmlOut zen::XmlOut::XmlOut ( XmlElement element)
    -
    -
    +

    Construct an output proxy for a single XML element.

    -
    See also:
    XmlOut(XmlDoc& doc)
    +
    See Also
    XmlOut(XmlDoc& doc)
    -

    Member Function Documentation

    +

    Member Function Documentation

    @@ -197,7 +188,7 @@ Public Member Functions template<class String , class T >
    - + @@ -214,31 +205,30 @@ template<class String , class T >
    void zen::XmlOut::attribute void zen::XmlOut::attribute ( const String &  name,
    -
    -
    +

    Write user data to an XML attribute.

    -

    This conversion requires a specialization of zen::writeText() for type T.

    -
            zen::XmlDoc doc;
    -
    -        zen::XmlOut out(doc);
    -        out["elem"].attribute("attr1",  1); //
    -        out["elem"].attribute("attr2",  2); //write data into XML attributes
    -        out["elem"].attribute("attr3", -3); //
    -
    -        save(doc, "out.xml"); //throw XmlFileError
    -

    Output:

    -
          <?xml version="1.0" encoding="UTF-8"?>
    -      <Root>
    -          <elem attr1="1" attr2="2" attr3="-3"/>
    -      </Root>
    Template Parameters:
    - +

    This conversion requires a specialization of zen::writeText() for type T.

    +
    +
    +
    zen::XmlOut out(doc);
    +
    out["elem"].attribute("attr1", 1); //
    +
    out["elem"].attribute("attr2", 2); //write data into XML attributes
    +
    out["elem"].attribute("attr3", -3); //
    +
    +
    save(doc, "out.xml"); //throw XmlFileError
    +

    Output:

    +
      <?xml version="1.0" encoding="UTF-8"?>
    +  <Root>
    +      <elem attr1="1" attr2="2" attr3="-3"/>
    +  </Root>
    Template Parameters
    +
    StringArbitrary string-like type: e.g. std::string, wchar_t*, char[], wchar_t, wxString, MyStringClass, ...
    TString-convertible user data type: e.g. any string-like type, all built-in arithmetic numbers
    -
    See also:
    XmlElement::setAttribute()
    +
    See Also
    XmlElement::setAttribute()
    @@ -256,13 +246,12 @@ template<class T > - -
    +

    Write user data to the underlying XML element.

    -

    This conversion requires a specialization of zen::writeText() or zen::writeStruc() for type T.

    -
    Template Parameters:
    - +

    This conversion requires a specialization of zen::writeText() or zen::writeStruc() for type T.

    +
    Template Parameters
    +
    TUser type that is converted into an XML element value.
    @@ -284,18 +273,17 @@ template<class String >
    const - -
    +

    Retrieve a handle to an XML child element for writing.

    The child element will be created if it is not yet existing.

    -
    Template Parameters:
    - +
    Template Parameters
    +
    StringArbitrary string-like type: e.g. std::string, wchar_t*, char[], wchar_t, wxString, MyStringClass, ...
    -
    Parameters:
    +
    Parameters
    nameThe name of the child element
    @@ -305,13 +293,11 @@ template<class String >
    - - + - diff --git a/zenxml/doc/closed.png b/zenxml/doc/closed.png index b7d4bd9f..98cc2c90 100644 Binary files a/zenxml/doc/closed.png and b/zenxml/doc/closed.png differ diff --git a/zenxml/doc/cvrt__struc_8h_source.html b/zenxml/doc/cvrt__struc_8h_source.html index 6bd4e7af..2a229c26 100644 --- a/zenxml/doc/cvrt__struc_8h_source.html +++ b/zenxml/doc/cvrt__struc_8h_source.html @@ -3,46 +3,36 @@ + zen::Xml: cvrt_struc.h Source File - - - - + + - + -
    - - +
    - - - - - -
    zen::Xml -
    Simple C++ XML Processing
    - - + + @@ -51,7 +41,6 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • Main Page
  • Namespaces
  • Classes
  • -
  • Files
  • @@ -70,18 +59,12 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • - -
    - All Classes Namespaces Functions Variables
    + All Classes Namespaces Functions Variables Pages
    @@ -90,216 +73,223 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    + +
    cvrt_struc.h
    -
    00001 // **************************************************************************
    -00002 // * This file is part of the zen::Xml project. It is distributed under the *
    -00003 // * Boost Software License: http://www.boost.org/LICENSE_1_0.txt           *
    -00004 // * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved        *
    -00005 // **************************************************************************
    -00006 
    -00007 #ifndef ZEN_XML_CONVERT_STRUC_HEADER_018727409908342709743
    -00008 #define ZEN_XML_CONVERT_STRUC_HEADER_018727409908342709743
    -00009 
    -00010 #include "dom.h"
    -00011 
    -00012 namespace zen
    -00013 {
    -00020 
    -00021 
    -00026 template <class T> bool readStruc(const XmlElement& input, T& value);
    -00028 
    -00032 template <class T> void writeStruc(const T& value, XmlElement& output);
    -00033 
    -00034 
    -00035 
    -00036 
    -00037 
    -00038 
    -00039 
    -00040 
    -00041 
    -00042 
    -00043 
    -00044 
    -00045 
    -00046 
    -00047 
    -00048 
    -00049 
    -00050 //------------------------------ implementation -------------------------------------
    -00051 namespace impl_2384343
    -00052 {
    -00053 ZEN_INIT_DETECT_MEMBER_TYPE(value_type);
    -00054 ZEN_INIT_DETECT_MEMBER_TYPE(iterator);
    -00055 ZEN_INIT_DETECT_MEMBER_TYPE(const_iterator);
    -00056 
    -00057 ZEN_INIT_DETECT_MEMBER(begin)  //
    -00058 ZEN_INIT_DETECT_MEMBER(end)    //we don't know the exact declaration of the member attribute: may be in a base class!
    -00059 ZEN_INIT_DETECT_MEMBER(insert) //
    -00060 }
    -00061 
    -00062 template <typename T>
    -00063 struct IsStlContainer :
    -00064         StaticBool<
    -00065         impl_2384343::HasMemberType_value_type    <T>::value&&
    -00066         impl_2384343::HasMemberType_iterator      <T>::value&&
    -00067         impl_2384343::HasMemberType_const_iterator<T>::value&&
    -00068         impl_2384343::HasMember_begin             <T>::value&&
    -00069         impl_2384343::HasMember_end               <T>::value&&
    -00070         impl_2384343::HasMember_insert            <T>::value> {};
    -00071 
    -00072 
    -00073 namespace impl_2384343
    -00074 {
    -00075 ZEN_INIT_DETECT_MEMBER_TYPE(first_type);
    -00076 ZEN_INIT_DETECT_MEMBER_TYPE(second_type);
    -00077 
    -00078 ZEN_INIT_DETECT_MEMBER(first)   //we don't know the exact declaration of the member attribute: may be in a base class!
    -00079 ZEN_INIT_DETECT_MEMBER(second)  //
    -00080 }
    -00081 
    -00082 template <typename T>
    -00083 struct IsStlPair :
    -00084         StaticBool<
    -00085         impl_2384343::HasMemberType_first_type <T>::value&&
    -00086         impl_2384343::HasMemberType_second_type<T>::value&&
    -00087         impl_2384343::HasMember_first          <T>::value&&
    -00088         impl_2384343::HasMember_second         <T>::value> {};
    -00089 
    -00090 //######################################################################################
    -00091 
    -00092 //Conversion from arbitrary types to an XML element
    -00093 enum ValueType
    -00094 {
    -00095     VALUE_TYPE_STL_CONTAINER,
    -00096     VALUE_TYPE_STL_PAIR,
    -00097     VALUE_TYPE_OTHER,
    -00098 };
    -00099 
    -00100 template <class T>
    -00101 struct GetValueType : StaticEnum<ValueType,
    -00102         GetTextType<T>::value != TEXT_TYPE_OTHER ? VALUE_TYPE_OTHER : //some string classes are also STL containers, so check this first
    -00103         IsStlContainer<T>::value ? VALUE_TYPE_STL_CONTAINER :
    -00104         IsStlPair<T>::value      ? VALUE_TYPE_STL_PAIR :
    -00105         VALUE_TYPE_OTHER> {};
    -00106 
    -00107 
    -00108 template <class T, ValueType type>
    -00109 struct ConvertElement;
    -00110 /* -> expected interface
    -00111 {
    -00112     void writeStruc(const T& value, XmlElement& output) const;
    -00113     bool readStruc(const XmlElement& input, T& value) const;
    -00114 };
    -00115 */
    -00116 
    -00117 
    -00118 //partial specialization: handle conversion for all STL-container types!
    -00119 template <class T>
    -00120 struct ConvertElement<T, VALUE_TYPE_STL_CONTAINER>
    -00121 {
    -00122     void writeStruc(const T& value, XmlElement& output) const
    -00123     {
    -00124         std::for_each(value.begin(), value.end(),
    -00125                       [&](const typename T::value_type & childVal)
    -00126         {
    -00127             XmlElement& newChild = output.addChild("Item");
    -00128             zen::writeStruc(childVal, newChild);
    -00129         });
    -00130     }
    -00131     bool readStruc(const XmlElement& input, T& value) const
    -00132     {
    -00133         bool success = true;
    -00134         value.clear();
    -00135 
    -00136         auto iterPair = input.getChildren("Item");
    -00137         for (auto iter = iterPair.first; iter != iterPair.second; ++iter)
    -00138         {
    -00139             typename T::value_type childVal; //MSVC 2010 bug: cannot put this into a lambda body
    -00140             if (zen::readStruc(*iter, childVal))
    -00141                 value.insert(value.end(), childVal);
    -00142             else
    -00143                 success = false;
    -00144         }
    -00145         return success;
    -00146     }
    -00147 };
    -00148 
    -00149 
    -00150 //partial specialization: handle conversion for std::pair
    -00151 template <class T>
    -00152 struct ConvertElement<T, VALUE_TYPE_STL_PAIR>
    -00153 {
    -00154     void writeStruc(const T& value, XmlElement& output) const
    -00155     {
    -00156         XmlElement& child1 = output.addChild("one"); //don't use "1st/2nd", this will confuse a few pedantic XML parsers
    -00157         zen::writeStruc(value.first, child1);
    -00158 
    -00159         XmlElement& child2 = output.addChild("two");
    -00160         zen::writeStruc(value.second, child2);
    -00161     }
    -00162     bool readStruc(const XmlElement& input, T& value) const
    -00163     {
    -00164         bool success = true;
    -00165         const XmlElement* child1 = input.getChild("one");
    -00166         if (!child1 || !zen::readStruc(*child1, value.first))
    -00167             success = false;
    -00168 
    -00169         const XmlElement* child2 = input.getChild("two");
    -00170         if (!child2 || !zen::readStruc(*child2, value.second))
    -00171             success = false;
    -00172 
    -00173         return success;
    -00174     }
    -00175 };
    -00176 
    -00177 
    -00178 //partial specialization: not a pure structured type, try text conversion (thereby respect user specializations of writeText()/readText())
    -00179 template <class T>
    -00180 struct ConvertElement<T, VALUE_TYPE_OTHER>
    -00181 {
    -00182     void writeStruc(const T& value, XmlElement& output) const
    -00183     {
    -00184         std::string tmp;
    -00185         writeText(value, tmp);
    -00186         output.setValue(tmp);
    -00187     }
    -00188     bool readStruc(const XmlElement& input, T& value) const
    -00189     {
    -00190         std::string rawStr;
    -00191         input.getValue(rawStr);
    -00192         return readText(rawStr, value);
    -00193     }
    -00194 };
    -00195 
    -00196 
    -00197 template <class T> inline
    -00198 void writeStruc(const T& value, XmlElement& output)
    -00199 {
    -00200     ConvertElement<T, GetValueType<T>::value>().writeStruc(value, output);
    -00201 }
    -00202 
    -00203 
    -00204 template <class T> inline
    -00205 bool readStruc(const XmlElement& input, T& value)
    -00206 {
    -00207     return ConvertElement<T, GetValueType<T>::value>().readStruc(input, value);
    -00208 }
    -00209 }
    -00210 
    -00211 #endif //ZEN_XML_CONVERT_STRUC_HEADER_018727409908342709743
    -
    - - +
    1 // **************************************************************************
    +
    2 // * This file is part of the FreeFileSync project. It is distributed under *
    +
    3 // * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
    +
    4 // * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved *
    +
    5 // **************************************************************************
    +
    6 
    +
    7 #ifndef ZEN_XML_CONVERT_STRUC_HEADER_018727409908342709743
    +
    8 #define ZEN_XML_CONVERT_STRUC_HEADER_018727409908342709743
    +
    9 
    +
    10 #include "dom.h"
    +
    11 
    +
    12 namespace zen
    +
    13 {
    +
    20 
    +
    26 template <class T> bool readStruc(const XmlElement& input, T& value);
    +
    28 
    +
    32 template <class T> void writeStruc(const T& value, XmlElement& output);
    +
    33 
    +
    34 
    +
    35 
    +
    36 
    +
    37 
    +
    38 
    +
    39 
    +
    40 
    +
    41 
    +
    42 
    +
    43 
    +
    44 
    +
    45 
    +
    46 
    +
    47 
    +
    48 
    +
    49 
    +
    50 //------------------------------ implementation -------------------------------------
    +
    51 namespace impl_2384343
    +
    52 {
    +
    53 ZEN_INIT_DETECT_MEMBER_TYPE(value_type);
    +
    54 ZEN_INIT_DETECT_MEMBER_TYPE(iterator);
    +
    55 ZEN_INIT_DETECT_MEMBER_TYPE(const_iterator);
    +
    56 
    +
    57 ZEN_INIT_DETECT_MEMBER(begin) //
    +
    58 ZEN_INIT_DETECT_MEMBER(end) //we don't know the exact declaration of the member attribute: may be in a base class!
    +
    59 ZEN_INIT_DETECT_MEMBER(insert) //
    +
    60 }
    +
    61 
    +
    62 template <typename T>
    +
    63 struct IsStlContainer :
    +
    64  StaticBool<
    +
    65  impl_2384343::HasMemberType_value_type <T>::value&&
    +
    66  impl_2384343::HasMemberType_iterator <T>::value&&
    +
    67  impl_2384343::HasMemberType_const_iterator<T>::value&&
    +
    68  impl_2384343::HasMember_begin <T>::value&&
    +
    69  impl_2384343::HasMember_end <T>::value&&
    +
    70  impl_2384343::HasMember_insert <T>::value> {};
    +
    71 
    +
    72 
    +
    73 namespace impl_2384343
    +
    74 {
    +
    75 ZEN_INIT_DETECT_MEMBER_TYPE(first_type);
    +
    76 ZEN_INIT_DETECT_MEMBER_TYPE(second_type);
    +
    77 
    +
    78 ZEN_INIT_DETECT_MEMBER(first) //we don't know the exact declaration of the member attribute: may be in a base class!
    +
    79 ZEN_INIT_DETECT_MEMBER(second) //
    +
    80 }
    +
    81 
    +
    82 template <typename T>
    +
    83 struct IsStlPair :
    +
    84  StaticBool<
    +
    85  impl_2384343::HasMemberType_first_type <T>::value&&
    +
    86  impl_2384343::HasMemberType_second_type<T>::value&&
    +
    87  impl_2384343::HasMember_first <T>::value&&
    +
    88  impl_2384343::HasMember_second <T>::value> {};
    +
    89 
    +
    90 //######################################################################################
    +
    91 
    +
    92 //Conversion from arbitrary types to an XML element
    +
    93 enum ValueType
    +
    94 {
    +
    95  VALUE_TYPE_STL_CONTAINER,
    +
    96  VALUE_TYPE_STL_PAIR,
    +
    97  VALUE_TYPE_OTHER,
    +
    98 };
    +
    99 
    +
    100 template <class T>
    +
    101 struct GetValueType : StaticEnum<ValueType,
    +
    102  GetTextType<T>::value != TEXT_TYPE_OTHER ? VALUE_TYPE_OTHER : //some string classes are also STL containers, so check this first
    +
    103  IsStlContainer<T>::value ? VALUE_TYPE_STL_CONTAINER :
    +
    104  IsStlPair<T>::value ? VALUE_TYPE_STL_PAIR :
    +
    105  VALUE_TYPE_OTHER> {};
    +
    106 
    +
    107 
    +
    108 template <class T, ValueType type>
    +
    109 struct ConvertElement;
    +
    110 /* -> expected interface
    +
    111 {
    +
    112  void writeStruc(const T& value, XmlElement& output) const;
    +
    113  bool readStruc(const XmlElement& input, T& value) const;
    +
    114 };
    +
    115 */
    +
    116 
    +
    117 
    +
    118 //partial specialization: handle conversion for all STL-container types!
    +
    119 template <class T>
    +
    120 struct ConvertElement<T, VALUE_TYPE_STL_CONTAINER>
    +
    121 {
    +
    122  void writeStruc(const T& value, XmlElement& output) const
    +
    123  {
    +
    124  std::for_each(value.begin(), value.end(),
    +
    125  [&](const typename T::value_type & childVal)
    +
    126  {
    +
    127  XmlElement& newChild = output.addChild("Item");
    +
    128  zen::writeStruc(childVal, newChild);
    +
    129  });
    +
    130  }
    +
    131  bool readStruc(const XmlElement& input, T& value) const
    +
    132  {
    +
    133  bool success = true;
    +
    134  value.clear();
    +
    135 
    +
    136  auto iterPair = input.getChildren("Item");
    +
    137  for (auto iter = iterPair.first; iter != iterPair.second; ++iter)
    +
    138  {
    +
    139  typename T::value_type childVal; //MSVC 2010 bug: cannot put this into a lambda body
    +
    140  if (zen::readStruc(*iter, childVal))
    +
    141  value.insert(value.end(), childVal);
    +
    142  else
    +
    143  success = false;
    +
    144  }
    +
    145  return success;
    +
    146  }
    +
    147 };
    +
    148 
    +
    149 
    +
    150 //partial specialization: handle conversion for std::pair
    +
    151 template <class T>
    +
    152 struct ConvertElement<T, VALUE_TYPE_STL_PAIR>
    +
    153 {
    +
    154  void writeStruc(const T& value, XmlElement& output) const
    +
    155  {
    +
    156  XmlElement& child1 = output.addChild("one"); //don't use "1st/2nd", this will confuse a few pedantic XML parsers
    +
    157  zen::writeStruc(value.first, child1);
    +
    158 
    +
    159  XmlElement& child2 = output.addChild("two");
    +
    160  zen::writeStruc(value.second, child2);
    +
    161  }
    +
    162  bool readStruc(const XmlElement& input, T& value) const
    +
    163  {
    +
    164  bool success = true;
    +
    165  const XmlElement* child1 = input.getChild("one");
    +
    166  if (!child1 || !zen::readStruc(*child1, value.first))
    +
    167  success = false;
    +
    168 
    +
    169  const XmlElement* child2 = input.getChild("two");
    +
    170  if (!child2 || !zen::readStruc(*child2, value.second))
    +
    171  success = false;
    +
    172 
    +
    173  return success;
    +
    174  }
    +
    175 };
    +
    176 
    +
    177 
    +
    178 //partial specialization: not a pure structured type, try text conversion (thereby respect user specializations of writeText()/readText())
    +
    179 template <class T>
    +
    180 struct ConvertElement<T, VALUE_TYPE_OTHER>
    +
    181 {
    +
    182  void writeStruc(const T& value, XmlElement& output) const
    +
    183  {
    +
    184  std::string tmp;
    +
    185  writeText(value, tmp);
    +
    186  output.setValue(tmp);
    +
    187  }
    +
    188  bool readStruc(const XmlElement& input, T& value) const
    +
    189  {
    +
    190  std::string rawStr;
    +
    191  input.getValue(rawStr);
    +
    192  return readText(rawStr, value);
    +
    193  }
    +
    194 };
    +
    195 
    +
    196 
    +
    197 template <class T> inline
    +
    198 void writeStruc(const T& value, XmlElement& output)
    +
    199 {
    +
    200  ConvertElement<T, GetValueType<T>::value>().writeStruc(value, output);
    +
    201 }
    +
    202 
    +
    203 
    +
    204 template <class T> inline
    +
    205 bool readStruc(const XmlElement& input, T& value)
    +
    206 {
    +
    207  return ConvertElement<T, GetValueType<T>::value>().readStruc(input, value);
    +
    208 }
    +
    209 }
    +
    210 
    +
    211 #endif //ZEN_XML_CONVERT_STRUC_HEADER_018727409908342709743
    +
    bool readText(const std::string &input, T &value)
    Convert text to user data - used by XML elements and attributes.
    Definition: cvrt_text.h:216
    +
    An XML element.
    Definition: dom.h:21
    +
    bool readStruc(const XmlElement &input, T &value)
    Convert XML element to structured user data.
    Definition: cvrt_struc.h:205
    +
    void writeStruc(const T &value, XmlElement &output)
    Convert structured user data into an XML element.
    Definition: cvrt_struc.h:198
    +
    void writeText(const T &value, std::string &output)
    Convert user data into text - used by XML elements and attributes.
    Definition: cvrt_text.h:209
    +
    + - diff --git a/zenxml/doc/cvrt__text_8h_source.html b/zenxml/doc/cvrt__text_8h_source.html index d10a3b8f..707264ae 100644 --- a/zenxml/doc/cvrt__text_8h_source.html +++ b/zenxml/doc/cvrt__text_8h_source.html @@ -3,46 +3,36 @@ + zen::Xml: cvrt_text.h Source File - - - - + + - + -
    - - +
    - - - - - -
    zen::Xml -
    Simple C++ XML Processing
    - - + + @@ -51,7 +41,6 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • Main Page
  • Namespaces
  • Classes
  • -
  • Files
  • @@ -70,18 +59,12 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • - -
    - All Classes Namespaces Functions Variables
    + All Classes Namespaces Functions Variables Pages
    @@ -90,187 +73,191 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    + +
    cvrt_text.h
    -
    00001 // **************************************************************************
    -00002 // * This file is part of the zen::Xml project. It is distributed under the *
    -00003 // * Boost Software License: http://www.boost.org/LICENSE_1_0.txt           *
    -00004 // * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved        *
    -00005 // **************************************************************************
    -00006 
    -00007 #ifndef ZEN_XML_CONVERT_TEXT_HEADER_018727339083427097434
    -00008 #define ZEN_XML_CONVERT_TEXT_HEADER_018727339083427097434
    -00009 
    -00010 #include <zen/utf.h>
    -00011 #include <zen/string_tools.h>
    -00012 
    -00013 namespace zen
    -00014 {
    -00061 
    -00062 
    -00067 template <class T> bool readText(const std::string& input, T& value);
    -00069 
    -00073 template <class T> void writeText(const T& value, std::string& output);
    -00074 
    -00075 
    -00076 /* Different classes of data types:
    -00077 
    -00078 -----------------------------
    -00079 | structured                |  readStruc/writeStruc - e.g. string-convertible types, STL containers, std::pair, structured user types
    -00080 | ------------------------- |
    -00081 | | to-string-convertible | |  readText/writeText   - e.g. string-like types, all built-in arithmetic numbers, bool
    -00082 | | ---------------       | |
    -00083 | | | string-like |       | |  utfCvrtTo            - e.g. std::string, wchar_t*, char[], wchar_t, wxString, MyStringClass, ...
    -00084 | | ---------------       | |
    -00085 | ------------------------- |
    -00086 -----------------------------
    -00087 */
    -00088 
    -00089 
    -00090 
    -00091 
    -00092 
    -00093 
    -00094 
    -00095 
    -00096 
    -00097 
    -00098 
    -00099 
    -00100 
    -00101 
    -00102 
    -00103 //------------------------------ implementation -------------------------------------
    -00104 
    -00105 //Conversion from arbitrary types to text (for use with XML elements and attributes)
    -00106 enum TextType
    -00107 {
    -00108     TEXT_TYPE_BOOL,
    -00109     TEXT_TYPE_NUMBER,
    -00110     TEXT_TYPE_STRING,
    -00111     TEXT_TYPE_OTHER,
    -00112 };
    -00113 
    -00114 template <class T>
    -00115 struct GetTextType : StaticEnum<TextType,
    -00116         IsSameType<T, bool>::value ? TEXT_TYPE_BOOL   :
    -00117         IsStringLike<T>::value     ? TEXT_TYPE_STRING : //string before number to correctly handle char/wchar_t -> this was an issue with Loki only!
    -00118         IsArithmetic<T>::value     ? TEXT_TYPE_NUMBER : //
    -00119         TEXT_TYPE_OTHER> {};
    -00120 
    -00121 //######################################################################################
    -00122 
    -00123 template <class T, TextType type>
    -00124 struct ConvertText;
    -00125 /* -> expected interface
    -00126 {
    -00127     void writeText(const T& value, std::string& output) const;
    -00128     bool readText(const std::string& input, T& value) const;
    -00129 };
    -00130 */
    -00131 
    -00132 //partial specialization: type bool
    -00133 template <class T>
    -00134 struct ConvertText<T, TEXT_TYPE_BOOL>
    -00135 {
    -00136     void writeText(bool value, std::string& output) const
    -00137     {
    -00138         output = value ? "true" : "false";
    -00139     }
    -00140     bool readText(const std::string& input, bool& value) const
    -00141     {
    -00142         std::string tmp = input;
    -00143         zen::trim(tmp);
    -00144         if (tmp == "true")
    -00145             value = true;
    -00146         else if (tmp == "false")
    -00147             value = false;
    -00148         else
    -00149             return false;
    -00150         return true;
    -00151     }
    -00152 };
    -00153 
    -00154 //partial specialization: handle conversion for all built-in arithmetic types!
    -00155 template <class T>
    -00156 struct ConvertText<T, TEXT_TYPE_NUMBER>
    -00157 {
    -00158     void writeText(const T& value, std::string& output) const
    -00159     {
    -00160         output = numberTo<std::string>(value);
    -00161     }
    -00162     bool readText(const std::string& input, T& value) const
    -00163     {
    -00164         value = stringTo<T>(input);
    -00165         return true;
    -00166     }
    -00167 };
    -00168 
    -00169 //partial specialization: handle conversion for all string-like types!
    -00170 template <class T>
    -00171 struct ConvertText<T, TEXT_TYPE_STRING>
    -00172 {
    -00173     void writeText(const T& value, std::string& output) const
    -00174     {
    -00175         output = utfCvrtTo<std::string>(value);
    -00176     }
    -00177     bool readText(const std::string& input, T& value) const
    -00178     {
    -00179         value = utfCvrtTo<T>(input);
    -00180         return true;
    -00181     }
    -00182 };
    -00183 
    -00184 
    -00185 //partial specialization: unknown type
    -00186 template <class T>
    -00187 struct ConvertText<T, TEXT_TYPE_OTHER>
    -00188 {
    -00189     //###########################################################################################################################################
    -00190     assert_static(sizeof(T) == -1);
    -00191     /*
    -00192         ATTENTION: The data type T is yet unknown to the zen::Xml framework!
    -00193 
    -00194         Please provide a specialization for T of the following two functions in order to handle conversions to XML elements and attributes
    -00195 
    -00196         template <> void zen::writeText(const T& value, std::string& output)
    -00197         template <> bool zen::readText(const std::string& input, T& value)
    -00198 
    -00199         If T is structured and cannot be converted to a text representation specialize these two functions to allow at least for conversions to XML elements:
    -00200 
    -00201         template <> void zen::writeStruc(const T& value, XmlElement& output)
    -00202         template <> bool zen::readStruc(const XmlElement& input, T& value)
    -00203     */
    -00204     //###########################################################################################################################################
    -00205 };
    -00206 
    -00207 
    -00208 template <class T> inline
    -00209 void writeText(const T& value, std::string& output)
    -00210 {
    -00211     ConvertText<T, GetTextType<T>::value>().writeText(value, output);
    -00212 }
    -00213 
    -00214 
    -00215 template <class T> inline
    -00216 bool readText(const std::string& input, T& value)
    -00217 {
    -00218     return ConvertText<T, GetTextType<T>::value>().readText(input, value);
    -00219 }
    -00220 }
    -00221 
    -00222 #endif //ZEN_XML_CONVERT_TEXT_HEADER_018727339083427097434
    -
    - - +
    1 // **************************************************************************
    +
    2 // * This file is part of the FreeFileSync project. It is distributed under *
    +
    3 // * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
    +
    4 // * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved *
    +
    5 // **************************************************************************
    +
    6 
    +
    7 #ifndef ZEN_XML_CONVERT_TEXT_HEADER_018727339083427097434
    +
    8 #define ZEN_XML_CONVERT_TEXT_HEADER_018727339083427097434
    +
    9 
    +
    10 #include <zen/utf.h>
    +
    11 #include <zen/string_tools.h>
    +
    12 
    +
    13 namespace zen
    +
    14 {
    +
    61 
    +
    67 template <class T> bool readText(const std::string& input, T& value);
    +
    69 
    +
    73 template <class T> void writeText(const T& value, std::string& output);
    +
    74 
    +
    75 
    +
    76 /* Different classes of data types:
    +
    77 
    +
    78 -----------------------------
    +
    79 | structured | readStruc/writeStruc - e.g. string-convertible types, STL containers, std::pair, structured user types
    +
    80 | ------------------------- |
    +
    81 | | to-string-convertible | | readText/writeText - e.g. string-like types, all built-in arithmetic numbers, bool
    +
    82 | | --------------- | |
    +
    83 | | | string-like | | | utfCvrtTo - e.g. std::string, wchar_t*, char[], wchar_t, wxString, MyStringClass, ...
    +
    84 | | --------------- | |
    +
    85 | ------------------------- |
    +
    86 -----------------------------
    +
    87 */
    +
    88 
    +
    89 
    +
    90 
    +
    91 
    +
    92 
    +
    93 
    +
    94 
    +
    95 
    +
    96 
    +
    97 
    +
    98 
    +
    99 
    +
    100 
    +
    101 
    +
    102 
    +
    103 //------------------------------ implementation -------------------------------------
    +
    104 
    +
    105 //Conversion from arbitrary types to text (for use with XML elements and attributes)
    +
    106 enum TextType
    +
    107 {
    +
    108  TEXT_TYPE_BOOL,
    +
    109  TEXT_TYPE_NUMBER,
    +
    110  TEXT_TYPE_STRING,
    +
    111  TEXT_TYPE_OTHER,
    +
    112 };
    +
    113 
    +
    114 template <class T>
    +
    115 struct GetTextType : StaticEnum<TextType,
    +
    116  IsSameType<T, bool>::value ? TEXT_TYPE_BOOL :
    +
    117  IsStringLike<T>::value ? TEXT_TYPE_STRING : //string before number to correctly handle char/wchar_t -> this was an issue with Loki only!
    +
    118  IsArithmetic<T>::value ? TEXT_TYPE_NUMBER : //
    +
    119  TEXT_TYPE_OTHER> {};
    +
    120 
    +
    121 //######################################################################################
    +
    122 
    +
    123 template <class T, TextType type>
    +
    124 struct ConvertText;
    +
    125 /* -> expected interface
    +
    126 {
    +
    127  void writeText(const T& value, std::string& output) const;
    +
    128  bool readText(const std::string& input, T& value) const;
    +
    129 };
    +
    130 */
    +
    131 
    +
    132 //partial specialization: type bool
    +
    133 template <class T>
    +
    134 struct ConvertText<T, TEXT_TYPE_BOOL>
    +
    135 {
    +
    136  void writeText(bool value, std::string& output) const
    +
    137  {
    +
    138  output = value ? "true" : "false";
    +
    139  }
    +
    140  bool readText(const std::string& input, bool& value) const
    +
    141  {
    +
    142  std::string tmp = input;
    +
    143  zen::trim(tmp);
    +
    144  if (tmp == "true")
    +
    145  value = true;
    +
    146  else if (tmp == "false")
    +
    147  value = false;
    +
    148  else
    +
    149  return false;
    +
    150  return true;
    +
    151  }
    +
    152 };
    +
    153 
    +
    154 //partial specialization: handle conversion for all built-in arithmetic types!
    +
    155 template <class T>
    +
    156 struct ConvertText<T, TEXT_TYPE_NUMBER>
    +
    157 {
    +
    158  void writeText(const T& value, std::string& output) const
    +
    159  {
    +
    160  output = numberTo<std::string>(value);
    +
    161  }
    +
    162  bool readText(const std::string& input, T& value) const
    +
    163  {
    +
    164  value = stringTo<T>(input);
    +
    165  return true;
    +
    166  }
    +
    167 };
    +
    168 
    +
    169 //partial specialization: handle conversion for all string-like types!
    +
    170 template <class T>
    +
    171 struct ConvertText<T, TEXT_TYPE_STRING>
    +
    172 {
    +
    173  void writeText(const T& value, std::string& output) const
    +
    174  {
    +
    175  output = utfCvrtTo<std::string>(value);
    +
    176  }
    +
    177  bool readText(const std::string& input, T& value) const
    +
    178  {
    +
    179  value = utfCvrtTo<T>(input);
    +
    180  return true;
    +
    181  }
    +
    182 };
    +
    183 
    +
    184 
    +
    185 //partial specialization: unknown type
    +
    186 template <class T>
    +
    187 struct ConvertText<T, TEXT_TYPE_OTHER>
    +
    188 {
    +
    189  //###########################################################################################################################################
    +
    190  assert_static(sizeof(T) == -1);
    +
    191  /*
    +
    192  ATTENTION: The data type T is yet unknown to the zen::Xml framework!
    +
    193 
    +
    194  Please provide a specialization for T of the following two functions in order to handle conversions to XML elements and attributes
    +
    195 
    +
    196  template <> void zen::writeText(const T& value, std::string& output)
    +
    197  template <> bool zen::readText(const std::string& input, T& value)
    +
    198 
    +
    199  If T is structured and cannot be converted to a text representation specialize these two functions to allow at least for conversions to XML elements:
    +
    200 
    +
    201  template <> void zen::writeStruc(const T& value, XmlElement& output)
    +
    202  template <> bool zen::readStruc(const XmlElement& input, T& value)
    +
    203  */
    +
    204  //###########################################################################################################################################
    +
    205 };
    +
    206 
    +
    207 
    +
    208 template <class T> inline
    +
    209 void writeText(const T& value, std::string& output)
    +
    210 {
    +
    211  ConvertText<T, GetTextType<T>::value>().writeText(value, output);
    +
    212 }
    +
    213 
    +
    214 
    +
    215 template <class T> inline
    +
    216 bool readText(const std::string& input, T& value)
    +
    217 {
    +
    218  return ConvertText<T, GetTextType<T>::value>().readText(input, value);
    +
    219 }
    +
    220 }
    +
    221 
    +
    222 #endif //ZEN_XML_CONVERT_TEXT_HEADER_018727339083427097434
    +
    bool readText(const std::string &input, T &value)
    Convert text to user data - used by XML elements and attributes.
    Definition: cvrt_text.h:216
    +
    void writeText(const T &value, std::string &output)
    Convert user data into text - used by XML elements and attributes.
    Definition: cvrt_text.h:209
    +
    + - diff --git a/zenxml/doc/dom_8h_source.html b/zenxml/doc/dom_8h_source.html index e81e00a9..1b1e1e32 100644 --- a/zenxml/doc/dom_8h_source.html +++ b/zenxml/doc/dom_8h_source.html @@ -3,46 +3,36 @@ + zen::Xml: dom.h Source File - - - - + + - + -
    - - +
    - - - - - -
    zen::Xml -
    Simple C++ XML Processing
    - - + + @@ -51,7 +41,6 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • Main Page
  • Namespaces
  • Classes
  • -
  • Files
  • @@ -70,18 +59,12 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • - -
    - All Classes Namespaces Functions Variables
    + All Classes Namespaces Functions Variables Pages
    @@ -90,257 +73,303 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    + +
    dom.h
    -
    00001 // **************************************************************************
    -00002 // * This file is part of the zen::Xml project. It is distributed under the *
    -00003 // * Boost Software License: http://www.boost.org/LICENSE_1_0.txt           *
    -00004 // * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved        *
    -00005 // **************************************************************************
    -00006 
    -00007 #ifndef ZEN_XML_DOM_HEADER_82085720723894567204564256
    -00008 #define ZEN_XML_DOM_HEADER_82085720723894567204564256
    -00009 
    -00010 #include <string>
    -00011 #include <vector>
    -00012 #include <memory>
    -00013 #include <map>
    -00014 #include "cvrt_text.h" //"readText/writeText"
    -00015 
    -00016 namespace zen
    -00017 {
    -00018 class XmlDoc;
    -00019 
    -00021 class XmlElement
    -00022 {
    -00023     struct PrivateConstruction {};
    -00024 public:
    -00025     //Construct an empty XML element
    -00026     //This constructor should be private, however std::make_shared() requires public access
    -00027     //Therefore at least prevent users from calling it via private dummy type PrivateConstruction
    -00028     template <class String>
    -00029     XmlElement(const String& name, XmlElement* parentElement, PrivateConstruction) : name_(utfCvrtTo<std::string>(name)), parent_(parentElement) {}
    -00030 
    -00032 
    -00036     template <class String>
    -00037     String getNameAs() const { return utfCvrtTo<String>(name_); }
    -00038 
    -00040 
    -00044     template <class T>
    -00045     bool getValue(T& value) const { return readStruc(*this, value); }
    -00046 
    -00048 
    -00051     template <class T>
    -00052     void setValue(const T& value) { writeStruc(value, *this); }
    -00053 
    -00055 
    -00062     template <class String, class T>
    -00063     bool getAttribute(const String& name, T& value) const
    -00064     {
    -00065         auto it = attributes.find(utfCvrtTo<std::string>(name));
    -00066         return it == attributes.end() ? false : readText(it->second, value);
    -00067     }
    -00068 
    -00070 
    -00076     template <class String, class T>
    -00077     void setAttribute(const String& name, const T& value)
    -00078     {
    -00079         std::string attrValue;
    -00080         writeText(value, attrValue);
    -00081         attributes[utfCvrtTo<std::string>(name)] = attrValue;
    -00082     }
    -00083 
    -00085 
    -00088     template <class String>
    -00089     void removeAttribute(const String& name) { attributes.erase(utfCvrtTo<std::string>(name)); }
    -00090 
    -00092 
    -00096     template <class String>
    -00097     XmlElement& addChild(const String& name)
    -00098     {
    -00099         std::string utf8Name = utfCvrtTo<std::string>(name);
    -00100         auto newElement = std::make_shared<XmlElement>(utf8Name, this, PrivateConstruction());
    -00101         childElements.push_back(newElement);
    -00102         childElementsSorted.insert(std::make_pair(utf8Name, newElement));
    -00103         return *newElement;
    -00104     }
    -00105 
    -00107 
    -00112     template <class String>
    -00113     const XmlElement* getChild(const String& name) const
    -00114     {
    -00115         auto it = childElementsSorted.find(utfCvrtTo<std::string>(name));
    -00116         return it == childElementsSorted.end() ? nullptr : &*(it->second);
    -00117     }
    -00118 
    -00120     template <class String>
    -00121     XmlElement* getChild(const String& name)
    -00122     {
    -00123         return const_cast<XmlElement*>(static_cast<const XmlElement*>(this)->getChild(name));
    -00124     }
    -00125 
    -00126     template < class IterTy,     //underlying iterator type
    -00127              class T,            //target object type
    -00128              class AccessPolicy > //access policy: see AccessPtrMap
    -00129     class PtrIter : public std::iterator<std::input_iterator_tag, T>, private AccessPolicy //get rid of shared_ptr indirection
    -00130     {
    -00131     public:
    -00132         PtrIter(IterTy it) : it_(it) {}
    -00133         PtrIter(const PtrIter& other) : it_(other.it_) {}
    -00134         PtrIter& operator++() { ++it_; return *this; }
    -00135         PtrIter operator++(int) { PtrIter tmp(*this); operator++(); return tmp; }
    -00136         inline friend bool operator==(const PtrIter& lhs, const PtrIter& rhs) { return lhs.it_ == rhs.it_; }
    -00137         inline friend bool operator!=(const PtrIter& lhs, const PtrIter& rhs) { return !(lhs == rhs); }
    -00138         T& operator* () { return  AccessPolicy::template objectRef<T>(it_); }
    -00139         T* operator->() { return &AccessPolicy::template objectRef<T>(it_); }
    -00140     private:
    -00141         IterTy it_;
    -00142     };
    -00143 
    -00144     struct AccessPtrMap
    -00145     {
    -00146         template <class T, class IterTy>
    -00147         T& objectRef(const IterTy& it) { return *(it->second); }
    -00148     };
    -00149 
    -00150     typedef PtrIter<std::multimap<std::string, std::shared_ptr<XmlElement>>::iterator, XmlElement, AccessPtrMap> ChildIter2;
    -00151     typedef PtrIter<std::multimap<std::string, std::shared_ptr<XmlElement>>::const_iterator, const XmlElement, AccessPtrMap> ChildIterConst2;
    -00152 
    -00154 
    -00163     template <class String>
    -00164     std::pair<ChildIterConst2, ChildIterConst2> getChildren(const String& name) const { return childElementsSorted.equal_range(utfCvrtTo<std::string>(name)); }
    -00165 
    -00167     template <class String>
    -00168     std::pair<ChildIter2, ChildIter2> getChildren(const String& name) { return childElementsSorted.equal_range(utfCvrtTo<std::string>(name)); }
    -00169 
    -00170     struct AccessPtrVec
    -00171     {
    -00172         template <class T, class IterTy>
    -00173         T& objectRef(const IterTy& it) { return **it; }
    -00174     };
    -00175 
    -00176     typedef PtrIter<std::vector<std::shared_ptr<XmlElement>>::iterator, XmlElement, AccessPtrVec> ChildIter;
    -00177     typedef PtrIter<std::vector<std::shared_ptr<XmlElement>>::const_iterator, const XmlElement, AccessPtrVec> ChildIterConst;
    -00178 
    -00180 
    -00188     std::pair<ChildIterConst, ChildIterConst> getChildren() const { return std::make_pair(childElements.begin(), childElements.end()); }
    -00189 
    -00191     std::pair<ChildIter, ChildIter> getChildren() { return std::make_pair(childElements.begin(), childElements.end()); }
    -00192 
    -00194     XmlElement* parent() { return parent_; };
    -00196     const XmlElement* parent() const { return parent_; };
    -00197 
    -00198 
    -00199     typedef std::map<std::string, std::string>::const_iterator AttrIter;
    -00200 
    -00201     /* -> disabled documentation extraction
    -00202       \brief Get all attributes associated with the element.
    -00203       \code
    -00204         auto iterPair = elem.getAttributes();
    -00205         for (auto it = iterPair.first; it != iterPair.second; ++it)
    -00206            std::cout << "name: " << it->first << " value: " << it->second << "\n";
    -00207       \endcode
    -00208       \return A pair of STL begin/end iterators to access all attributes sequentially as a list of name/value pairs of std::string.
    -00209     */
    -00210     std::pair<AttrIter, AttrIter> getAttributes() const { return std::make_pair(attributes.begin(), attributes.end()); }
    -00211 
    -00212     //Transactionally swap two elements.  -> disabled documentation extraction
    -00213     void swap(XmlElement& other)
    -00214     {
    -00215         name_     .swap(other.name_);
    -00216         value_    .swap(other.value_);
    -00217         attributes.swap(other.attributes);
    -00218         childElements.swap(other.childElements);
    -00219         childElementsSorted.swap(other.childElementsSorted);
    -00220         //std::swap(parent_, other.parent_); -> parent is physical location; update children's parent reference instead:
    -00221         std::for_each(      childElements.begin(),       childElements.end(), [&](const std::shared_ptr<XmlElement>& child) { child->parent_ = this;   });
    -00222         std::for_each(other.childElements.begin(), other.childElements.end(), [&](const std::shared_ptr<XmlElement>& child) { child->parent_ = &other; });
    -00223     }
    -00224 
    -00225 private:
    -00226     friend class XmlDoc;
    -00227 
    -00228     XmlElement(const XmlElement&);            //not implemented
    -00229     XmlElement& operator=(const XmlElement&); //
    -00230 
    -00231     std::string name_;
    -00232     std::string value_;
    -00233     std::map<std::string, std::string> attributes;
    -00234     std::vector<std::shared_ptr<XmlElement>>                childElements;       //all child elements in order of creation
    -00235     std::multimap<std::string, std::shared_ptr<XmlElement>> childElementsSorted; //alternate key: sorted by element name
    -00236     XmlElement* parent_;
    -00237 };
    -00238 
    -00239 
    -00240 //XmlElement::setValue<T>() calls zen::writeStruc() which calls XmlElement::setValue() ... => these two specializations end the circle
    -00241 template <> inline
    -00242 void XmlElement::setValue(const std::string& value) { value_ = value; }
    -00243 
    -00244 template <> inline
    -00245 bool XmlElement::getValue(std::string& value) const { value = value_; return true; }
    -00246 
    -00247 
    -00249 class XmlDoc
    -00250 {
    -00251 public:
    -00253     XmlDoc() : version_("1.0"), encoding_("UTF-8"), rootElement("Root", nullptr, XmlElement::PrivateConstruction()) {}
    -00254 
    -00255     //Setup an empty XML document
    -00260     template <class String>
    -00261     XmlDoc(String rootName) : version_("1.0"), encoding_("UTF-8"), rootElement(rootName, nullptr, XmlElement::PrivateConstruction()) {}
    -00262 
    -00264     const XmlElement& root() const { return rootElement; }
    -00266     XmlElement& root() { return rootElement; }
    -00267 
    -00269 
    -00272     template <class String>
    -00273     String getVersionAs() const { return utfCvrtTo<String>(version_); }
    -00274 
    -00276 
    -00279     template <class String>
    -00280     void setVersion(const String& version) { version_ = utfCvrtTo<std::string>(version); }
    -00281 
    -00283 
    -00286     template <class String>
    -00287     String getEncodingAs() const { return utfCvrtTo<String>(encoding_); }
    -00288 
    -00290 
    -00293     template <class String>
    -00294     void setEncoding(const String& encoding) { encoding_ = utfCvrtTo<std::string>(encoding); }
    -00295 
    -00297 
    -00300     template <class String>
    -00301     String getStandaloneAs() const { return utfCvrtTo<String>(standalone_); }
    -00302 
    -00304 
    -00307     template <class String>
    -00308     void setStandalone(const String& standalone) { standalone_ = utfCvrtTo<std::string>(standalone); }
    -00309 
    -00310 private:
    -00311     XmlDoc(const XmlDoc&);        //not implemented, thanks to XmlElement::parent_
    -00312     XmlDoc& operator=(const XmlDoc&); //
    -00313 
    -00314     std::string version_;
    -00315     std::string encoding_;
    -00316     std::string standalone_;
    -00317 
    -00318     XmlElement rootElement;
    -00319 };
    -00320 
    -00321 }
    -00322 
    -00323 #endif //ZEN_XML_DOM_HEADER_82085720723894567204564256
    -
    - - +
    1 // **************************************************************************
    +
    2 // * This file is part of the FreeFileSync project. It is distributed under *
    +
    3 // * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
    +
    4 // * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved *
    +
    5 // **************************************************************************
    +
    6 
    +
    7 #ifndef ZEN_XML_DOM_HEADER_82085720723894567204564256
    +
    8 #define ZEN_XML_DOM_HEADER_82085720723894567204564256
    +
    9 
    +
    10 #include <string>
    +
    11 #include <vector>
    +
    12 #include <memory>
    +
    13 #include <map>
    +
    14 #include "cvrt_text.h" //"readText/writeText"
    +
    15 
    +
    16 namespace zen
    +
    17 {
    +
    18 class XmlDoc;
    +
    19 
    + +
    22 {
    +
    23  struct PrivateConstruction {};
    +
    24 public:
    +
    25  //Construct an empty XML element
    +
    26  //This constructor should be private, however std::make_shared() requires public access
    +
    27  //Therefore at least prevent users from calling it via private dummy type PrivateConstruction
    +
    28  template <class String>
    +
    29  XmlElement(const String& name, XmlElement* parentElement, PrivateConstruction) : name_(utfCvrtTo<std::string>(name)), parent_(parentElement) {}
    +
    30 
    +
    32 
    +
    36  template <class String>
    +
    37  String getNameAs() const { return utfCvrtTo<String>(name_); }
    +
    38 
    +
    40 
    +
    44  template <class T>
    +
    45  bool getValue(T& value) const { return readStruc(*this, value); }
    +
    46 
    +
    48 
    +
    51  template <class T>
    +
    52  void setValue(const T& value) { writeStruc(value, *this); }
    +
    53 
    +
    55 
    +
    62  template <class String, class T>
    +
    63  bool getAttribute(const String& name, T& value) const
    +
    64  {
    +
    65  auto it = attributes.find(utfCvrtTo<std::string>(name));
    +
    66  return it == attributes.end() ? false : readText(it->second, value);
    +
    67  }
    +
    68 
    +
    70 
    +
    76  template <class String, class T>
    +
    77  void setAttribute(const String& name, const T& value)
    +
    78  {
    +
    79  std::string attrValue;
    +
    80  writeText(value, attrValue);
    +
    81  attributes[utfCvrtTo<std::string>(name)] = attrValue;
    +
    82  }
    +
    83 
    +
    85 
    +
    88  template <class String>
    +
    89  void removeAttribute(const String& name) { attributes.erase(utfCvrtTo<std::string>(name)); }
    +
    90 
    +
    92 
    +
    96  template <class String>
    +
    97  XmlElement& addChild(const String& name)
    +
    98  {
    +
    99  std::string utf8Name = utfCvrtTo<std::string>(name);
    +
    100  auto newElement = std::make_shared<XmlElement>(utf8Name, this, PrivateConstruction());
    +
    101  childElements.push_back(newElement);
    +
    102  childElementsSorted.insert(std::make_pair(utf8Name, newElement));
    +
    103  return *newElement;
    +
    104  }
    +
    105 
    +
    107 
    +
    112  template <class String>
    +
    113  const XmlElement* getChild(const String& name) const
    +
    114  {
    +
    115  auto it = childElementsSorted.find(utfCvrtTo<std::string>(name));
    +
    116  return it == childElementsSorted.end() ? nullptr : &*(it->second);
    +
    117  }
    +
    118 
    +
    120  template <class String>
    +
    121  XmlElement* getChild(const String& name)
    +
    122  {
    +
    123  return const_cast<XmlElement*>(static_cast<const XmlElement*>(this)->getChild(name));
    +
    124  }
    +
    125 
    +
    126  template < class IterTy, //underlying iterator type
    +
    127  class T, //target object type
    +
    128  class AccessPolicy > //access policy: see AccessPtrMap
    +
    129  class PtrIter : public std::iterator<std::input_iterator_tag, T>, private AccessPolicy //get rid of shared_ptr indirection
    +
    130  {
    +
    131  public:
    +
    132  PtrIter(IterTy it) : it_(it) {}
    +
    133  PtrIter(const PtrIter& other) : it_(other.it_) {}
    +
    134  PtrIter& operator++() { ++it_; return *this; }
    +
    135  PtrIter operator++(int) { PtrIter tmp(*this); operator++(); return tmp; }
    +
    136  inline friend bool operator==(const PtrIter& lhs, const PtrIter& rhs) { return lhs.it_ == rhs.it_; }
    +
    137  inline friend bool operator!=(const PtrIter& lhs, const PtrIter& rhs) { return !(lhs == rhs); }
    +
    138  T& operator* () { return AccessPolicy::template objectRef<T>(it_); }
    +
    139  T* operator->() { return &AccessPolicy::template objectRef<T>(it_); }
    +
    140  private:
    +
    141  IterTy it_;
    +
    142  };
    +
    143 
    +
    144  struct AccessPtrMap
    +
    145  {
    +
    146  template <class T, class IterTy>
    +
    147  T& objectRef(const IterTy& it) { return *(it->second); }
    +
    148  };
    +
    149 
    +
    150  typedef PtrIter<std::multimap<std::string, std::shared_ptr<XmlElement>>::iterator, XmlElement, AccessPtrMap> ChildIter2;
    +
    151  typedef PtrIter<std::multimap<std::string, std::shared_ptr<XmlElement>>::const_iterator, const XmlElement, AccessPtrMap> ChildIterConst2;
    +
    152 
    +
    154 
    +
    163  template <class String>
    +
    164  std::pair<ChildIterConst2, ChildIterConst2> getChildren(const String& name) const { return childElementsSorted.equal_range(utfCvrtTo<std::string>(name)); }
    +
    165 
    +
    167  template <class String>
    +
    168  std::pair<ChildIter2, ChildIter2> getChildren(const String& name) { return childElementsSorted.equal_range(utfCvrtTo<std::string>(name)); }
    +
    169 
    +
    170  struct AccessPtrVec
    +
    171  {
    +
    172  template <class T, class IterTy>
    +
    173  T& objectRef(const IterTy& it) { return **it; }
    +
    174  };
    +
    175 
    +
    176  typedef PtrIter<std::vector<std::shared_ptr<XmlElement>>::iterator, XmlElement, AccessPtrVec> ChildIter;
    +
    177  typedef PtrIter<std::vector<std::shared_ptr<XmlElement>>::const_iterator, const XmlElement, AccessPtrVec> ChildIterConst;
    +
    178 
    +
    180 
    +
    188  std::pair<ChildIterConst, ChildIterConst> getChildren() const { return std::make_pair(childElements.begin(), childElements.end()); }
    +
    189 
    +
    191  std::pair<ChildIter, ChildIter> getChildren() { return std::make_pair(childElements.begin(), childElements.end()); }
    +
    192 
    +
    194  XmlElement* parent() { return parent_; };
    +
    196  const XmlElement* parent() const { return parent_; };
    +
    197 
    +
    198 
    +
    199  typedef std::map<std::string, std::string>::const_iterator AttrIter;
    +
    200 
    +
    201  /* -> disabled documentation extraction
    +
    202  \brief Get all attributes associated with the element.
    +
    203  \code
    +
    204  auto iterPair = elem.getAttributes();
    +
    205  for (auto it = iterPair.first; it != iterPair.second; ++it)
    +
    206  std::cout << "name: " << it->first << " value: " << it->second << "\n";
    +
    207  \endcode
    +
    208  \return A pair of STL begin/end iterators to access all attributes sequentially as a list of name/value pairs of std::string.
    +
    209  */
    +
    210  std::pair<AttrIter, AttrIter> getAttributes() const { return std::make_pair(attributes.begin(), attributes.end()); }
    +
    211 
    +
    212  //Transactionally swap two elements. -> disabled documentation extraction
    +
    213  void swap(XmlElement& other)
    +
    214  {
    +
    215  name_ .swap(other.name_);
    +
    216  value_ .swap(other.value_);
    +
    217  attributes.swap(other.attributes);
    +
    218  childElements.swap(other.childElements);
    +
    219  childElementsSorted.swap(other.childElementsSorted);
    +
    220  //std::swap(parent_, other.parent_); -> parent is physical location; update children's parent reference instead:
    +
    221  std::for_each( childElements.begin(), childElements.end(), [&](const std::shared_ptr<XmlElement>& child) { child->parent_ = this; });
    +
    222  std::for_each(other.childElements.begin(), other.childElements.end(), [&](const std::shared_ptr<XmlElement>& child) { child->parent_ = &other; });
    +
    223  }
    +
    224 
    +
    225 private:
    +
    226  friend class XmlDoc;
    +
    227 
    +
    228  XmlElement(const XmlElement&); //not implemented
    +
    229  XmlElement& operator=(const XmlElement&); //
    +
    230 
    +
    231  std::string name_;
    +
    232  std::string value_;
    +
    233  std::map<std::string, std::string> attributes;
    +
    234  std::vector<std::shared_ptr<XmlElement>> childElements; //all child elements in order of creation
    +
    235  std::multimap<std::string, std::shared_ptr<XmlElement>> childElementsSorted; //alternate key: sorted by element name
    +
    236  XmlElement* parent_;
    +
    237 };
    +
    238 
    +
    239 
    +
    240 //XmlElement::setValue<T>() calls zen::writeStruc() which calls XmlElement::setValue() ... => these two specializations end the circle
    +
    241 template <> inline
    +
    242 void XmlElement::setValue(const std::string& value) { value_ = value; }
    +
    243 
    +
    244 template <> inline
    +
    245 bool XmlElement::getValue(std::string& value) const { value = value_; return true; }
    +
    246 
    +
    247 
    +
    249 class XmlDoc
    +
    250 {
    +
    251 public:
    +
    253  XmlDoc() : version_("1.0"), encoding_("UTF-8"), rootElement("Root", nullptr, XmlElement::PrivateConstruction()) {}
    +
    254 
    +
    255  XmlDoc(XmlDoc&& tmp) : rootElement("Root", nullptr, XmlElement::PrivateConstruction()) { swap(tmp); }
    +
    256  XmlDoc& operator=(XmlDoc&& tmp) { swap(tmp); return *this; }
    +
    257 
    +
    258  //Setup an empty XML document
    +
    263  template <class String>
    +
    264  XmlDoc(String rootName) : version_("1.0"), encoding_("UTF-8"), rootElement(rootName, nullptr, XmlElement::PrivateConstruction()) {}
    +
    265 
    +
    267  const XmlElement& root() const { return rootElement; }
    +
    269  XmlElement& root() { return rootElement; }
    +
    270 
    +
    272 
    +
    275  template <class String>
    +
    276  String getVersionAs() const { return utfCvrtTo<String>(version_); }
    +
    277 
    +
    279 
    +
    282  template <class String>
    +
    283  void setVersion(const String& version) { version_ = utfCvrtTo<std::string>(version); }
    +
    284 
    +
    286 
    +
    289  template <class String>
    +
    290  String getEncodingAs() const { return utfCvrtTo<String>(encoding_); }
    +
    291 
    +
    293 
    +
    296  template <class String>
    +
    297  void setEncoding(const String& encoding) { encoding_ = utfCvrtTo<std::string>(encoding); }
    +
    298 
    +
    300 
    +
    303  template <class String>
    +
    304  String getStandaloneAs() const { return utfCvrtTo<String>(standalone_); }
    +
    305 
    +
    307 
    +
    310  template <class String>
    +
    311  void setStandalone(const String& standalone) { standalone_ = utfCvrtTo<std::string>(standalone); }
    +
    312 
    +
    313  //Transactionally swap two elements. -> disabled documentation extraction
    +
    314  void swap(XmlDoc& other)
    +
    315  {
    +
    316  version_ .swap(other.version_);
    +
    317  encoding_ .swap(other.encoding_);
    +
    318  standalone_.swap(other.standalone_);
    +
    319  rootElement.swap(other.rootElement);
    +
    320  }
    +
    321 
    +
    322 private:
    +
    323  XmlDoc(const XmlDoc&); //not implemented, thanks to XmlElement::parent_
    +
    324  XmlDoc& operator=(const XmlDoc&); //
    +
    325 
    +
    326  std::string version_;
    +
    327  std::string encoding_;
    +
    328  std::string standalone_;
    +
    329 
    +
    330  XmlElement rootElement;
    +
    331 };
    +
    332 
    +
    333 }
    +
    334 
    +
    335 #endif //ZEN_XML_DOM_HEADER_82085720723894567204564256
    +
    const XmlElement & root() const
    Get a const reference to the document's root element.
    Definition: dom.h:267
    +
    const XmlElement * parent() const
    Get parent XML element, may be nullptr for root element.
    Definition: dom.h:196
    +
    bool getValue(T &value) const
    Get the value of this element as a user type.
    Definition: dom.h:45
    +
    void removeAttribute(const String &name)
    Remove the attribute with the given name.
    Definition: dom.h:89
    +
    std::pair< ChildIterConst2, ChildIterConst2 > getChildren(const String &name) const
    Access all child elements with the given name via STL iterators.
    Definition: dom.h:164
    +
    void setEncoding(const String &encoding)
    Set the encoding used in the XML declaration.
    Definition: dom.h:297
    +
    std::pair< ChildIterConst, ChildIterConst > getChildren() const
    Access all child elements sequentially via STL iterators.
    Definition: dom.h:188
    +
    bool readText(const std::string &input, T &value)
    Convert text to user data - used by XML elements and attributes.
    Definition: cvrt_text.h:216
    +
    An XML element.
    Definition: dom.h:21
    +
    XmlDoc(String rootName)
    Definition: dom.h:264
    +
    std::pair< ChildIter, ChildIter > getChildren()
    Definition: dom.h:191
    +
    XmlElement * getChild(const String &name)
    Definition: dom.h:121
    +
    bool getAttribute(const String &name, T &value) const
    Retrieve an attribute by name.
    Definition: dom.h:63
    +
    void setVersion(const String &version)
    Set the version used in the XML declaration.
    Definition: dom.h:283
    +
    void setStandalone(const String &standalone)
    Set the standalone string used in the XML declaration.
    Definition: dom.h:311
    +
    The complete XML document.
    Definition: dom.h:249
    +
    XmlDoc()
    Default constructor setting up an empty XML document with a standard declaration: <...
    Definition: dom.h:253
    +
    String getEncodingAs() const
    Get the encoding used in the XML declaration.
    Definition: dom.h:290
    +
    XmlElement & addChild(const String &name)
    Create a new child element and return a reference to it.
    Definition: dom.h:97
    +
    XmlElement & root()
    Get a reference to the document's root element.
    Definition: dom.h:269
    +
    const XmlElement * getChild(const String &name) const
    Retrieve a child element with the given name.
    Definition: dom.h:113
    +
    bool readStruc(const XmlElement &input, T &value)
    Convert XML element to structured user data.
    Definition: cvrt_struc.h:205
    +
    XmlElement * parent()
    Get parent XML element, may be nullptr for root element.
    Definition: dom.h:194
    +
    void setValue(const T &value)
    Set the value of this element.
    Definition: dom.h:52
    +
    String getVersionAs() const
    Get the version used in the XML declaration.
    Definition: dom.h:276
    +
    void setAttribute(const String &name, const T &value)
    Create or update an XML attribute.
    Definition: dom.h:77
    +
    void writeStruc(const T &value, XmlElement &output)
    Convert structured user data into an XML element.
    Definition: cvrt_struc.h:198
    +
    std::pair< ChildIter2, ChildIter2 > getChildren(const String &name)
    Definition: dom.h:168
    +
    String getStandaloneAs() const
    Get the standalone string used in the XML declaration.
    Definition: dom.h:304
    +
    String getNameAs() const
    Retrieve the name of this XML element.
    Definition: dom.h:37
    +
    void writeText(const T &value, std::string &output)
    Convert user data into text - used by XML elements and attributes.
    Definition: cvrt_text.h:209
    +
    + - diff --git a/zenxml/doc/doxygen.css b/zenxml/doc/doxygen.css index c151fde3..f0f36f89 100644 --- a/zenxml/doc/doxygen.css +++ b/zenxml/doc/doxygen.css @@ -1,31 +1,50 @@ -/* The standard CSS for doxygen */ +/* The standard CSS for doxygen 1.8.6 */ body, table, div, p, dl { - font-family: Lucida Grande, Verdana, Geneva, Arial, sans-serif; - font-size: 13px; - line-height: 1.3; + font: 400 14px/22px Roboto,sans-serif; } /* @group Heading Levels */ -h1 { +h1.groupheader { font-size: 150%; } .title { + font: 400 14px/28px Roboto,sans-serif; font-size: 150%; font-weight: bold; margin: 10px 2px; } -h2 { - font-size: 120%; +h2.groupheader { + border-bottom: 1px solid #879ECB; + color: #354C7B; + font-size: 150%; + font-weight: normal; + margin-top: 1.75em; + padding-top: 8px; + padding-bottom: 4px; + width: 100%; } -h3 { +h3.groupheader { font-size: 100%; } +h1, h2, h3, h4, h5, h6 { + -webkit-transition: text-shadow 0.5s linear; + -moz-transition: text-shadow 0.5s linear; + -ms-transition: text-shadow 0.5s linear; + -o-transition: text-shadow 0.5s linear; + transition: text-shadow 0.5s linear; + margin-right: 15px; +} + +h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow { + text-shadow: 0 0 15px cyan; +} + dt { font-weight: bold; } @@ -37,10 +56,14 @@ div.multicol { -webkit-column-count: 3; } -p.startli, p.startdd, p.starttd { +p.startli, p.startdd { margin-top: 2px; } +p.starttd { + margin-top: 0px; +} + p.endli { margin-bottom: 0px; } @@ -122,11 +145,11 @@ a.el { a.elRef { } -a.code, a.code:visited { +a.code, a.code:visited, a.line, a.line:visited { color: #4665A2; } -a.codeRef, a.codeRef:visited { +a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { color: #4665A2; } @@ -136,20 +159,72 @@ dl.el { margin-left: -1cm; } -.fragment { +pre.fragment { + border: 1px solid #C4CFE5; + background-color: #FBFCFD; + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; + font-family: monospace, fixed; + font-size: 105%; +} + +div.fragment { + padding: 4px 6px; + margin: 4px 8px 4px 2px; + background-color: #FBFCFD; + border: 1px solid #C4CFE5; +} + +div.line { font-family: monospace, fixed; - font-size: 105%; + font-size: 13px; + min-height: 13px; + line-height: 1.0; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; } -pre.fragment { - border: 1px solid #C4CFE5; - background-color: #FBFCFD; - padding: 4px 6px; - margin: 4px 8px 4px 2px; - overflow: auto; - word-wrap: break-word; - font-size: 9pt; - line-height: 125%; +div.line.glow { + background-color: cyan; + box-shadow: 0 0 10px cyan; +} + + +span.lineno { + padding-right: 4px; + text-align: right; + border-right: 2px solid #0F0; + background-color: #E8E8E8; + white-space: pre; +} +span.lineno a { + background-color: #D8D8D8; +} + +span.lineno a:hover { + background-color: #C8C8C8; } div.ah { @@ -189,7 +264,7 @@ body { div.contents { margin-top: 10px; - margin-left: 8px; + margin-left: 12px; margin-right: 8px; } @@ -353,6 +428,24 @@ table.memberdecls { padding: 0px; } +.memberdecls td, .fieldtable tr { + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +.memberdecls td.glow, .fieldtable tr.glow { + background-color: cyan; + box-shadow: 0 0 15px cyan; +} + .mdescLeft, .mdescRight, .memItemLeft, .memItemRight, .memTemplItemLeft, .memTemplItemRight, .memTemplParams { @@ -367,8 +460,11 @@ table.memberdecls { color: #555; } -.memItemLeft, .memItemRight, .memTemplParams { - border-top: 1px solid #C4CFE5; +.memSeparator { + border-bottom: 1px solid #DEE4F0; + line-height: 1px; + margin: 0px; + padding: 0px; } .memItemLeft, .memTemplItemLeft { @@ -382,6 +478,7 @@ table.memberdecls { .memTemplParams { color: #4665A2; white-space: nowrap; + font-size: 80%; } /* @end */ @@ -414,14 +511,28 @@ table.memberdecls { padding: 0; margin-bottom: 10px; margin-right: 5px; + -webkit-transition: box-shadow 0.5s linear; + -moz-transition: box-shadow 0.5s linear; + -ms-transition: box-shadow 0.5s linear; + -o-transition: box-shadow 0.5s linear; + transition: box-shadow 0.5s linear; + display: table !important; + width: 100%; +} + +.memitem.glow { + box-shadow: 0 0 15px cyan; } .memname { - white-space: nowrap; font-weight: bold; margin-left: 6px; } +.memname td { + vertical-align: bottom; +} + .memproto, dl.reflist dt { border-top: 1px solid #A8B8D9; border-left: 1px solid #A8B8D9; @@ -430,21 +541,21 @@ table.memberdecls { color: #253555; font-weight: bold; text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + background-image:url('nav_f.png'); + background-repeat:repeat-x; + background-color: #E2E8F2; /* opera specific markup */ box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); - border-top-right-radius: 8px; - border-top-left-radius: 8px; + border-top-right-radius: 4px; + border-top-left-radius: 4px; /* firefox specific markup */ -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; - -moz-border-radius-topright: 8px; - -moz-border-radius-topleft: 8px; + -moz-border-radius-topright: 4px; + -moz-border-radius-topleft: 4px; /* webkit specific markup */ -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); - -webkit-border-top-right-radius: 8px; - -webkit-border-top-left-radius: 8px; - background-image:url('nav_f.png'); - background-repeat:repeat-x; - background-color: #E2E8F2; + -webkit-border-top-right-radius: 4px; + -webkit-border-top-left-radius: 4px; } @@ -452,23 +563,24 @@ table.memberdecls { border-bottom: 1px solid #A8B8D9; border-left: 1px solid #A8B8D9; border-right: 1px solid #A8B8D9; - padding: 2px 5px; + padding: 6px 10px 2px 10px; background-color: #FBFCFD; border-top-width: 0; + background-image:url('nav_g.png'); + background-repeat:repeat-x; + background-color: #FFFFFF; /* opera specific markup */ - border-bottom-left-radius: 8px; - border-bottom-right-radius: 8px; + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); /* firefox specific markup */ - -moz-border-radius-bottomleft: 8px; - -moz-border-radius-bottomright: 8px; + -moz-border-radius-bottomleft: 4px; + -moz-border-radius-bottomright: 4px; -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; - background-image: -moz-linear-gradient(center top, #FFFFFF 0%, #FFFFFF 60%, #F7F8FB 95%, #EEF1F7); /* webkit specific markup */ - -webkit-border-bottom-left-radius: 8px; - -webkit-border-bottom-right-radius: 8px; + -webkit-border-bottom-left-radius: 4px; + -webkit-border-bottom-right-radius: 4px; -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); - background-image: -webkit-gradient(linear,center top,center bottom,from(#FFFFFF), color-stop(0.6,#FFFFFF), color-stop(0.60,#FFFFFF), color-stop(0.95,#F7F8FB), to(#EEF1F7)); } dl.reflist dt { @@ -495,9 +607,13 @@ dl.reflist dd { .paramname em { font-style: normal; } +.paramname code { + line-height: 14px; +} .params, .retval, .exception, .tparams { - border-spacing: 6px 2px; + margin-left: 0px; + padding-left: 0px; } .params .paramname, .retval .paramname { @@ -515,105 +631,117 @@ dl.reflist dd { vertical-align: top; } +table.mlabels { + border-spacing: 0px; +} +td.mlabels-left { + width: 100%; + padding: 0px; +} +td.mlabels-right { + vertical-align: bottom; + padding: 0px; + white-space: nowrap; +} -/* @end */ - -/* @group Directory (tree) */ - -/* for the tree view */ +span.mlabels { + margin-left: 8px; +} -.ftvtree { - font-family: sans-serif; - margin: 0px; +span.mlabel { + background-color: #728DC1; + border-top:1px solid #5373B4; + border-left:1px solid #5373B4; + border-right:1px solid #C4CFE5; + border-bottom:1px solid #C4CFE5; + text-shadow: none; + color: white; + margin-right: 4px; + padding: 2px 3px; + border-radius: 3px; + font-size: 7pt; + white-space: nowrap; + vertical-align: middle; } -/* these are for tree view when used as main index */ -.directory { - font-size: 9pt; - font-weight: bold; - margin: 5px; -} -.directory h3 { - margin: 0px; - margin-top: 1em; - font-size: 11pt; -} +/* @end */ -/* -The following two styles can be used to replace the root node title -with an image of your choice. Simply uncomment the next two styles, -specify the name of your image and be sure to set 'height' to the -proper pixel height of your image. -*/ +/* these are for tree view when not used as main index */ -/* -.directory h3.swap { - height: 61px; - background-repeat: no-repeat; - background-image: url("yourimage.gif"); -} -.directory h3.swap span { - display: none; +div.directory { + margin: 10px 0px; + border-top: 1px solid #A8B8D9; + border-bottom: 1px solid #A8B8D9; + width: 100%; } -*/ -.directory > h3 { - margin-top: 0; +.directory table { + border-collapse:collapse; } -.directory p { - margin: 0px; - white-space: nowrap; +.directory td { + margin: 0px; + padding: 0px; + vertical-align: top; } -.directory div { - display: none; - margin: 0px; +.directory td.entry { + white-space: nowrap; + padding-right: 6px; + padding-top: 3px; } -.directory img { - vertical-align: -30%; +.directory td.entry a { + outline:none; } -/* these are for tree view when not used as main index */ - -.directory-alt { - font-size: 100%; - font-weight: bold; +.directory td.entry a img { + border: none; } -.directory-alt h3 { - margin: 0px; - margin-top: 1em; - font-size: 11pt; +.directory td.desc { + width: 100%; + padding-left: 6px; + padding-right: 6px; + padding-top: 3px; + border-left: 1px solid rgba(0,0,0,0.05); } -.directory-alt > h3 { - margin-top: 0; +.directory tr.even { + padding-left: 6px; + background-color: #F7F8FB; } -.directory-alt p { - margin: 0px; - white-space: nowrap; +.directory img { + vertical-align: -30%; } -.directory-alt div { - display: none; - margin: 0px; +.directory .levels { + white-space: nowrap; + width: 100%; + text-align: right; + font-size: 9pt; } -.directory-alt img { - vertical-align: -30%; +.directory .levels span { + cursor: pointer; + padding-left: 2px; + padding-right: 2px; + color: #3D578C; } -/* @end */ - div.dynheader { margin-top: 8px; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; } address { @@ -641,7 +769,7 @@ table.doxtable th { } table.fieldtable { - width: 100%; + /*width: 100%;*/ margin-bottom: 10px; border: 1px solid #A8B8D9; border-spacing: 0px; @@ -664,9 +792,21 @@ table.fieldtable { vertical-align: top; } +.fieldtable td.fieldname { + padding-top: 3px; +} + .fieldtable td.fielddoc { border-bottom: 1px solid #A8B8D9; - width: 100%; + /*width: 100%;*/ +} + +.fieldtable td.fielddoc p:first-child { + margin-top: 0px; +} + +.fieldtable td.fielddoc p:last-child { + margin-bottom: 2px; } .fieldtable tr:last-child td { @@ -707,6 +847,7 @@ table.fieldtable { font-size: 11px; background-image:url('tab_b.png'); background-repeat:repeat-x; + background-position: 0 -5px; height:30px; line-height:30px; color:#8AA0CC; @@ -734,6 +875,10 @@ table.fieldtable { display:block; text-decoration: none; outline: none; + color: #283A5D; + font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + text-decoration: none; } .navpath li.navelem a:hover @@ -771,9 +916,7 @@ div.summary a div.ingroups { - margin-left: 5px; font-size: 8pt; - padding-left: 5px; width: 50%; text-align: left; } @@ -794,7 +937,7 @@ div.header div.headertitle { - padding: 5px 5px 5px 7px; + padding: 5px 5px 5px 10px; } dl @@ -805,42 +948,63 @@ dl /* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug */ dl.section { - border-left:4px solid; - padding: 0 0 0 6px; + margin-left: 0px; + padding-left: 0px; } dl.note { + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; border-color: #D0C000; } dl.warning, dl.attention { + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; border-color: #FF0000; } dl.pre, dl.post, dl.invariant { + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; border-color: #00D000; } dl.deprecated { + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; border-color: #505050; } dl.todo { + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; border-color: #00C0E0; } dl.test { + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; border-color: #3030E0; } dl.bug { + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; border-color: #C08050; } @@ -905,6 +1069,11 @@ dl.section dd { text-align: center; } +.diagraph +{ + text-align: center; +} + .caption { font-weight: bold; @@ -980,6 +1149,201 @@ div.toc li.level4 { margin-left: 45px; } +.inherit_header { + font-weight: bold; + color: gray; + cursor: pointer; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.inherit_header td { + padding: 6px 0px 2px 5px; +} + +.inherit { + display: none; +} + +tr.heading h2 { + margin-top: 12px; + margin-bottom: 4px; +} + +/* tooltip related style info */ + +.ttc { + position: absolute; + display: none; +} + +#powerTip { + cursor: default; + white-space: nowrap; + background-color: white; + border: 1px solid gray; + border-radius: 4px 4px 4px 4px; + box-shadow: 1px 1px 7px gray; + display: none; + font-size: smaller; + max-width: 80%; + opacity: 0.9; + padding: 1ex 1em 1em; + position: absolute; + z-index: 2147483647; +} + +#powerTip div.ttdoc { + color: grey; + font-style: italic; +} + +#powerTip div.ttname a { + font-weight: bold; +} + +#powerTip div.ttname { + font-weight: bold; +} + +#powerTip div.ttdeci { + color: #006318; +} + +#powerTip div { + margin: 0px; + padding: 0px; + font: 12px/16px Roboto,sans-serif; +} + +#powerTip:before, #powerTip:after { + content: ""; + position: absolute; + margin: 0px; +} + +#powerTip.n:after, #powerTip.n:before, +#powerTip.s:after, #powerTip.s:before, +#powerTip.w:after, #powerTip.w:before, +#powerTip.e:after, #powerTip.e:before, +#powerTip.ne:after, #powerTip.ne:before, +#powerTip.se:after, #powerTip.se:before, +#powerTip.nw:after, #powerTip.nw:before, +#powerTip.sw:after, #powerTip.sw:before { + border: solid transparent; + content: " "; + height: 0; + width: 0; + position: absolute; +} + +#powerTip.n:after, #powerTip.s:after, +#powerTip.w:after, #powerTip.e:after, +#powerTip.nw:after, #powerTip.ne:after, +#powerTip.sw:after, #powerTip.se:after { + border-color: rgba(255, 255, 255, 0); +} + +#powerTip.n:before, #powerTip.s:before, +#powerTip.w:before, #powerTip.e:before, +#powerTip.nw:before, #powerTip.ne:before, +#powerTip.sw:before, #powerTip.se:before { + border-color: rgba(128, 128, 128, 0); +} + +#powerTip.n:after, #powerTip.n:before, +#powerTip.ne:after, #powerTip.ne:before, +#powerTip.nw:after, #powerTip.nw:before { + top: 100%; +} + +#powerTip.n:after, #powerTip.ne:after, #powerTip.nw:after { + border-top-color: #ffffff; + border-width: 10px; + margin: 0px -10px; +} +#powerTip.n:before { + border-top-color: #808080; + border-width: 11px; + margin: 0px -11px; +} +#powerTip.n:after, #powerTip.n:before { + left: 50%; +} + +#powerTip.nw:after, #powerTip.nw:before { + right: 14px; +} + +#powerTip.ne:after, #powerTip.ne:before { + left: 14px; +} + +#powerTip.s:after, #powerTip.s:before, +#powerTip.se:after, #powerTip.se:before, +#powerTip.sw:after, #powerTip.sw:before { + bottom: 100%; +} + +#powerTip.s:after, #powerTip.se:after, #powerTip.sw:after { + border-bottom-color: #ffffff; + border-width: 10px; + margin: 0px -10px; +} + +#powerTip.s:before, #powerTip.se:before, #powerTip.sw:before { + border-bottom-color: #808080; + border-width: 11px; + margin: 0px -11px; +} + +#powerTip.s:after, #powerTip.s:before { + left: 50%; +} + +#powerTip.sw:after, #powerTip.sw:before { + right: 14px; +} + +#powerTip.se:after, #powerTip.se:before { + left: 14px; +} + +#powerTip.e:after, #powerTip.e:before { + left: 100%; +} +#powerTip.e:after { + border-left-color: #ffffff; + border-width: 10px; + top: 50%; + margin-top: -10px; +} +#powerTip.e:before { + border-left-color: #808080; + border-width: 11px; + top: 50%; + margin-top: -11px; +} + +#powerTip.w:after, #powerTip.w:before { + right: 100%; +} +#powerTip.w:after { + border-right-color: #ffffff; + border-width: 10px; + top: 50%; + margin-top: -10px; +} +#powerTip.w:before { + border-right-color: #808080; + border-width: 11px; + top: 50%; + margin-top: -11px; +} @media print { @@ -998,15 +1362,5 @@ div.toc li.level4 { overflow:inherit; display:inline; } - pre.fragment - { - overflow: visible; - text-wrap: unrestricted; - white-space: -moz-pre-wrap; /* Moz */ - white-space: -pre-wrap; /* Opera 4-6 */ - white-space: -o-pre-wrap; /* Opera 7 */ - white-space: pre-wrap; /* CSS3 */ - word-wrap: break-word; /* IE 5.5+ */ - } } diff --git a/zenxml/doc/doxygen.png b/zenxml/doc/doxygen.png index 635ed52f..3ff17d80 100644 Binary files a/zenxml/doc/doxygen.png and b/zenxml/doc/doxygen.png differ diff --git a/zenxml/doc/error_8h_source.html b/zenxml/doc/error_8h_source.html index 8986a17b..91e0421e 100644 --- a/zenxml/doc/error_8h_source.html +++ b/zenxml/doc/error_8h_source.html @@ -3,46 +3,36 @@ + zen::Xml: error.h Source File - - - - + + - + -
    - - +
    - - - - - -
    zen::Xml -
    Simple C++ XML Processing
    - - + + @@ -51,7 +41,6 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • Main Page
  • Namespaces
  • Classes
  • -
  • Files
  • @@ -70,18 +59,12 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • - -
    - All Classes Namespaces Functions Variables
    + All Classes Namespaces Functions Variables Pages
    @@ -90,37 +73,41 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    + +
    error.h
    -
    00001 // **************************************************************************
    -00002 // * This file is part of the zen::Xml project. It is distributed under the *
    -00003 // * Boost Software License: http://www.boost.org/LICENSE_1_0.txt           *
    -00004 // * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved        *
    -00005 // **************************************************************************
    -00006 
    -00007 #ifndef ZEN_XML_ERROR_HEADER_018734618433021489473214873214
    -00008 #define ZEN_XML_ERROR_HEADER_018734618433021489473214873214
    -00009 
    -00010 namespace zen
    -00011 {
    -00013 struct XmlError
    -00014 {
    -00015     virtual ~XmlError() {}
    -00016 };
    -00017 }
    -00018 
    -00019 #endif //ZEN_XML_ERROR_HEADER_018734618433021489473214873214
    -
    - - +
    1 // **************************************************************************
    +
    2 // * This file is part of the FreeFileSync project. It is distributed under *
    +
    3 // * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
    +
    4 // * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved *
    +
    5 // **************************************************************************
    +
    6 
    +
    7 #ifndef ZEN_XML_ERROR_HEADER_018734618433021489473214873214
    +
    8 #define ZEN_XML_ERROR_HEADER_018734618433021489473214873214
    +
    9 
    +
    10 namespace zen
    +
    11 {
    +
    13 struct XmlError
    +
    14 {
    +
    15  virtual ~XmlError() {}
    +
    16 };
    +
    17 }
    +
    18 
    +
    19 #endif //ZEN_XML_ERROR_HEADER_018734618433021489473214873214
    +
    Exception base class for zen::Xml.
    Definition: error.h:13
    +
    + - diff --git a/zenxml/doc/files.html b/zenxml/doc/files.html deleted file mode 100644 index 31fcf4fd..00000000 --- a/zenxml/doc/files.html +++ /dev/null @@ -1,118 +0,0 @@ - - - - - -zen::Xml: File List - - - - - - - - - - - -
    - - -
    - - - - - - - - - - - - - -
    -
    zen::Xml - -
    -
    Simple C++ XML Processing
    -
    -
    - - - - - -
    - -
    - All Classes Namespaces Functions Variables
    - - -
    - -
    - -
    -
    -
    File List
    -
    -
    -
    Here is a list of all documented files with brief descriptions:
    - - - - - - - - -
    bind.h [code]Map user data types to XML
    cvrt_struc.h [code]Handle conversion of arbitrary types to and from XML elements. See comments in cvrt_text.h
    cvrt_text.h [code]Handle conversion of string-convertible types to and from std::string
    dom.h [code]
    error.h [code]
    io.h [code]Save and load byte streams from files
    parser.h [code]Convert an XML document object model (class XmlDoc) to and from a byte stream representation
    xml.h [code]
    -
    - - - - - - diff --git a/zenxml/doc/functions.html b/zenxml/doc/functions.html index 956af32d..79dbc774 100644 --- a/zenxml/doc/functions.html +++ b/zenxml/doc/functions.html @@ -3,46 +3,36 @@ + zen::Xml: Class Members - - - - + + - + -
    - - +
    - - - - - -
    zen::Xml -
    Simple C++ XML Processing
    - - + + @@ -51,7 +41,6 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • Main Page
  • Namespaces
  • Classes
  • -
  • Files
  • @@ -97,16 +86,16 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • p
  • r
  • s
  • -
  • x
  • +
  • x
  • -
    +
    - All Classes Namespaces Functions Variables
    + All Classes Namespaces Functions Variables Pages
    @@ -154,7 +143,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); : zen::XmlElement
  • getChildren() -: zen::XmlElement +: zen::XmlElement
  • getEncodingAs() : zen::XmlDoc @@ -196,12 +185,12 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); : zen::XmlIn
  • operator()() -: zen::XmlOut -, zen::XmlIn +: zen::XmlIn +, zen::XmlOut
  • operator[]() -: zen::XmlOut -, zen::XmlIn +: zen::XmlIn +, zen::XmlOut
  • @@ -253,20 +242,18 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); : zen::XmlDoc
  • XmlIn() -: zen::XmlIn +: zen::XmlIn
  • XmlOut() : zen::XmlOut
  • - - + - diff --git a/zenxml/doc/functions_func.html b/zenxml/doc/functions_func.html index be8e5716..07af5877 100644 --- a/zenxml/doc/functions_func.html +++ b/zenxml/doc/functions_func.html @@ -3,46 +3,36 @@ + zen::Xml: Class Members - Functions - - - - + + - + -
    - - +
    - - - - - -
    zen::Xml -
    Simple C++ XML Processing
    - - + + @@ -51,7 +41,6 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • Main Page
  • Namespaces
  • Classes
  • -
  • Files
  • @@ -95,16 +84,16 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • p
  • r
  • s
  • -
  • x
  • +
  • x
  • -
    +
    - All Classes Namespaces Functions Variables
    + All Classes Namespaces Functions Variables Pages
    @@ -180,12 +169,12 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); : zen::XmlIn
  • operator()() -: zen::XmlOut -, zen::XmlIn +: zen::XmlIn +, zen::XmlOut
  • operator[]() -: zen::XmlOut -, zen::XmlIn +: zen::XmlIn +, zen::XmlOut
  • @@ -234,20 +223,18 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); : zen::XmlDoc
  • XmlIn() -: zen::XmlIn +: zen::XmlIn
  • XmlOut() : zen::XmlOut
  • - - + - diff --git a/zenxml/doc/functions_vars.html b/zenxml/doc/functions_vars.html index ba8364ef..60a4de36 100644 --- a/zenxml/doc/functions_vars.html +++ b/zenxml/doc/functions_vars.html @@ -3,46 +3,36 @@ + zen::Xml: Class Members - Variables - - - - + + - + -
    - - +
    - - - - - -
    zen::Xml -
    Simple C++ XML Processing
    - - + + @@ -51,7 +41,6 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • Main Page
  • Namespaces
  • Classes
  • -
  • Files
  • @@ -85,13 +74,13 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • Variables
  • -
    +
    - All Classes Namespaces Functions Variables
    + All Classes Namespaces Functions Variables Pages
    @@ -113,13 +102,11 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    - - + - diff --git a/zenxml/doc/hierarchy.html b/zenxml/doc/hierarchy.html index 363c134b..4e1b2175 100644 --- a/zenxml/doc/hierarchy.html +++ b/zenxml/doc/hierarchy.html @@ -3,46 +3,36 @@ + zen::Xml: Class Hierarchy - - - - + + - + -
    - - +
    - - - - - -
    zen::Xml -
    Simple C++ XML Processing
    - - + + @@ -51,7 +41,6 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • Main Page
  • Namespaces
  • Classes
  • -
  • Files
  • @@ -78,13 +67,13 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • Class Members
  • -
    +
    - All Classes Namespaces Functions Variables
    + All Classes Namespaces Functions Variables Pages
    @@ -98,25 +87,23 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    Class Hierarchy
    -
    This inheritance list is sorted roughly, but not completely, alphabetically:
    +
    This inheritance list is sorted roughly, but not completely, alphabetically:
    +
    [detail level 12]
    + + + + + + + +
    oCzen::XmlDocThe complete XML document
    oCzen::XmlElementAn XML element
    oCzen::XmlErrorException base class for zen::Xml
    |oCzen::XmlFileErrorException thrown due to failed file I/O
    |\Czen::XmlParsingErrorException thrown due to an XML parsing error
    oCzen::XmlInProxy class to conveniently convert XML structure to user data
    \Czen::XmlOutProxy class to conveniently convert user data into XML structure
    +
    - - + - diff --git a/zenxml/doc/index.html b/zenxml/doc/index.html index d7245a6b..1549b9f2 100644 --- a/zenxml/doc/index.html +++ b/zenxml/doc/index.html @@ -3,46 +3,36 @@ + zen::Xml: Overview - - - - + + - + -
    - - +
    - - - - - -
    zen::Xml -
    Simple C++ XML Processing
    - - + + @@ -51,7 +41,6 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • Main Page
  • Namespaces
  • Classes
  • -
  • Files
  • @@ -70,13 +59,13 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • -
    +
    - All Classes Namespaces Functions Variables
    + All Classes Namespaces Functions Variables Pages
    @@ -104,8 +93,8 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • Structured user types
  • Type Safety
  • -

    -Rationale

    +

    +Rationale

    zen::Xml is an XML library serializing structured user data in a convenient way. Using compile-time information gathered by techniques of template metaprogramming it minimizes the manual overhead required and frees the user from implementing fundamental type conversions by himself. Basic data types such as

    The design follows the philosophy of the Loki library:
    - http://loki-lib.sourceforge.net/index.php?n=Main.Philosophy

    -

    -Quick Start

    +http://loki-lib.sourceforge.net/index.php?n=Main.Philosophy

    +

    +Quick Start

    1. Download zen::Xml: http://sourceforge.net/projects/zenxml

    -

    2. Setup a preprocessor macro for your project to identify the platform (this is only required if you use C-stream-based file IO)

    -
        ZEN_PLATFORM_WINDOWS
    -    or
    -    ZEN_PLATFORM_OTHER
    -

    3. For optimal performance define this global macro in release build: (following convention of the assert macro)

    -
        NDEBUG
    -

    4. Include the main header:

    -
    #include <zenxml/xml.h>
    -

    5. Start serializing user data:

    -
    size_t a = 10;
    -double b = 2.0;
    -int    c = -1;
    -
    zen::XmlDoc doc; //empty XML document
    -
    -zen::XmlOut out(doc); //the simplest way to fill the document is to use a data output proxy
    -out["elem1"](a); //
    -out["elem2"](b); //map data types to XML elements
    -out["elem3"](c); //
    -
    -try
    -{
    -    save(doc, "file.xml"); //throw zen::XmlFileError
    -}
    -catch (const zen::XmlFileError& e) { /* handle error */ }
    -

    The following XML file will be created:

    -
    <?xml version="1.0" encoding="UTF-8"?>
    +

    2. Setup one of the following preprocessor macros for your project to identify the platform (this is only required if you use C-stream-based file IO)

    +
    ZEN_WIN
    +
    ZEN_LINUX
    +
    ZEN_MAC
    +

    3. For optimal performance define this global macro in release build: (following convention of the assert macro)

    +
    NDEBUG
    +

    4. Include the main header:

    +
    #include <zenxml/xml.h>
    +

    5. Start serializing user data:

    +
    size_t a = 10;
    +
    double b = 2.0;
    +
    int c = -1;
    +
    zen::XmlDoc doc; //empty XML document
    +
    +
    zen::XmlOut out(doc); //the simplest way to fill the document is to use a data output proxy
    +
    out["elem1"](a); //
    +
    out["elem2"](b); //map data types to XML elements
    +
    out["elem3"](c); //
    +
    +
    try
    +
    {
    +
    save(doc, "file.xml"); //throw zen::XmlFileError
    +
    }
    +
    catch (const zen::XmlFileError& e) { /* handle error */ }
    +

    The following XML file will be created:

    +
    <?xml version="1.0" encoding="UTF-8"?>
     <Root>
         <elem1>10</elem1>
         <elem2>2.000000</elem2>
         <elem3>-1</elem3>
     </Root>
    -

    Load an XML file and map its content to user data:

    -
    zen::XmlDoc doc; //empty XML document
    -
    -try
    -{
    -    load("file.xml", doc); //throw XmlFileError, XmlParsingError
    -}
    -catch (const zen::XmlError& e) { /* handle error */ }
    -
    -zen::XmlIn in(doc); //the simplest way to read the document is to use a data input proxy
    -in["elem1"](a); //
    -in["elem2"](b); //map XML elements into user data
    -in["elem3"](c); //
    -
    -//check for mapping errors, i.e. missing elements or conversion errors: you may consider these as warnings only
    -if (in.errorsOccured())
    -{
    -   std::vector<std::wstring> failedElements = in.getErrorsAs<std::wstring>();
    -   /* generate error message showing the XML element names that failed to convert */
    -}
    -

    -Supported Platforms

    +

    Load an XML file and map its content to user data:

    +
    zen::XmlDoc doc; //empty XML document
    +
    +
    try
    +
    {
    +
    load("file.xml", doc); //throw XmlFileError, XmlParsingError
    +
    }
    +
    catch (const zen::XmlError& e) { /* handle error */ }
    +
    +
    zen::XmlIn in(doc); //the simplest way to read the document is to use a data input proxy
    +
    in["elem1"](a); //
    +
    in["elem2"](b); //map XML elements into user data
    +
    in["elem3"](c); //
    +
    +
    //check for mapping errors, i.e. missing elements or conversion errors: you may consider these as warnings only
    +
    if (in.errorsOccured())
    +
    {
    +
    std::vector<std::wstring> failedElements = in.getErrorsAs<std::wstring>();
    +
    /* generate error message showing the XML element names that failed to convert */
    +
    }
    +

    +Supported Platforms

    zen::Xml is written in a platform independent manner and runs on any rudimentary C++11 compliant compiler. It has been tested successfully under:

    - -

    Note: In order to enable C++11 features in GCC it is required to specify either of the following compiler options:

    -
    -std=c++11
    +
    -std=c++11
     -std=c++0x
     -std=gnu++0x
    -

    -Flexible Programming Model

    +

    +Flexible Programming Model

    Depending on what granularity of control is required in a particular application, zen::Xml allows the user to choose between full control or simplicity.

    - The library is structured into the following parts, each of which can be used in isolation:
    +The library is structured into the following parts, each of which can be used in isolation:

    - <File>
    - |
    - | io.h
    - |
    - <Byte Stream>
    - |
    - | parser.h
    - |
    - <Document Object Model>
    - |
    - | bind.h
    - |
    - <C++ user data>
    +<File>
    +|
    +| io.h
    +|
    +<Byte Stream>
    +|
    +| parser.h
    +|
    +<Document Object Model>
    +|
    +| bind.h
    +|
    +<C++ user data>

    - - - -

    -Structured XML element access

    -
    //write a value into one deeply nested XML element - note the different types used seamlessly: char[], wchar_t[], char, wchar_t, int
    -zen::XmlOut out(doc);
    -out["elemento1"][L"элемент2"][L"要素3"][L"στοιχείο4"]["elem5"][L"元素6"][L'元']['z'](-1234);
    -

    The resulting XML:

    -
    <?xml version="1.0" encoding="UTF-8"?>
    +

    +Structured XML element access

    +
    //write a value into one deeply nested XML element - note the different types used seamlessly: char[], wchar_t[], char, wchar_t, int
    +
    zen::XmlOut out(doc);
    +
    out["elemento1"][L"элемент2"][L"要素3"][L"στοιχείο4"]["elem5"][L"元素6"][L'元']['z'](-1234);
    +

    The resulting XML:

    +
    <?xml version="1.0" encoding="UTF-8"?>
     <Root>
         <elemento1>
             <элемент2>
    @@ -312,33 +291,33 @@ out["elemento1"][L
    -Access XML attributes
    -
    zen::XmlDoc doc;
    -
    -zen::XmlOut out(doc);
    -out["elem"].attribute("attr1",   -1); //
    -out["elem"].attribute("attr2",  2.1); //write data into XML attributes
    -out["elem"].attribute("attr3", true); //
    -
    -save(doc, "file.xml"); //throw XmlFileError
    -

    The resulting XML:

    -
    <?xml version="1.0" encoding="UTF-8"?>
    +

    +Access XML attributes

    +
    +
    +
    zen::XmlOut out(doc);
    +
    out["elem"].attribute("attr1", -1); //
    +
    out["elem"].attribute("attr2", 2.1); //write data into XML attributes
    +
    out["elem"].attribute("attr3", true); //
    +
    +
    save(doc, "file.xml"); //throw XmlFileError
    +

    The resulting XML:

    +
    <?xml version="1.0" encoding="UTF-8"?>
     <Root>
         <elem attr1="-1" attr2="2.1" attr3="true"/>
     </Root>
    -

    -Automatic conversion for built-in arithmetic types

    +

    +Automatic conversion for built-in arithmetic types

    All built-in arithmetic types and bool are detected at compile time and a proper conversion is applied. Common conversions for integer-like types such as int, long, long long, ect. as well as floating point types are optimized for maximum performance.

    -
    zen::XmlOut out(doc);
    -
    -out["int"]   (-1234);
    -out["double"](1.23);
    -out["float"] (4.56f);
    -out["ulong"] (1234UL);
    -out["bool"]  (false);
    -

    The resulting XML:

    -
    <?xml version="1.0" encoding="UTF-8"?>
    +
    zen::XmlOut out(doc);
    +
    +
    out["int"] (-1234);
    +
    out["double"](1.23);
    +
    out["float"] (4.56f);
    +
    out["ulong"] (1234UL);
    +
    out["bool"] (false);
    +

    The resulting XML:

    +
    <?xml version="1.0" encoding="UTF-8"?>
     <Root>
         <int>-1234</int>
         <double>1.23</double>
    @@ -346,8 +325,8 @@ out["bool"]  (

    -Automatic conversion for string-like types

    +

    +Automatic conversion for string-like types

    The document object model of zen::Xml internally stores all names and values as a std::string. Consequently everything that is not a std::string but is "string-like" is UTF-converted into a std::string representation. By default zen::Xml accepts all character arrays like char[], wchar_t[], char*, wchar_t*, single characters like char, wchar_t, standard string classes like std::string, std::wstring and user-defined string classes. If the input string is based on char, it will simply be copied and thereby preserves any local encodings. If the input string is based on wchar_t it will be converted to an UTF-8 encoded std::string. The correct wchar_t encoding of the system will be detected at compile time, for example UTF-16 on Windows, UTF-32 on most Linux distributions.

    Note: User-defined string classes are automatically supported if they fulfill the following string concept by defining:

      @@ -355,23 +334,23 @@ Automatic conversion for string-like types
    1. A member function c_str() returning something that can be converted into a const value_type*
    2. A member function length() returning the number of characters returned by c_str()
    -
    std::string  elem1 = "elemento1";
    -std::wstring elem2 = L"элемент2";
    -wxString     elem3 = L"要素3";
    -MyString     elem4 = L"στοιχείο4";
    -
    -zen::XmlOut out(doc);
    -
    -out["string"]    (elem1);
    -out["wstring"]   (elem2);
    -out["wxString"]  (elem3);
    -out["MyString"]  (elem4);
    -out["char[6]"]   ("elem5");
    -out["wchar_t[4]"](L"元素6");
    -out["wchar_t"]   (L'元');
    -out["char"]      ('z');
    -

    The resulting XML:

    -
    <?xml version="1.0" encoding="UTF-8"?>
    +
    std::string elem1 = "elemento1";
    +
    std::wstring elem2 = L"элемент2";
    +
    wxString elem3 = L"要素3";
    +
    MyString elem4 = L"στοιχείο4";
    +
    +
    zen::XmlOut out(doc);
    +
    +
    out["string"] (elem1);
    +
    out["wstring"] (elem2);
    +
    out["wxString"] (elem3);
    +
    out["MyString"] (elem4);
    +
    out["char[6]"] ("elem5");
    +
    out["wchar_t[4]"](L"元素6");
    +
    out["wchar_t"] (L'元');
    +
    out["char"] ('z');
    +

    The resulting XML:

    +
    <?xml version="1.0" encoding="UTF-8"?>
     <Root>
         <string>elemento1</string>
         <wstring>элемент2</wstring>
    @@ -382,8 +361,8 @@ out["char"]      (
    -Automatic conversion for STL container types
    +

    +Automatic conversion for STL container types

    • User-defined STL compatible types are automatically supported if they fulfill the following container concept by defining:
      1. A typedef named value_type for the underlying element type of the container
      2. @@ -397,36 +376,34 @@ Automatic conversion for STL container types
      3. A member function clear() removing all elements from the container
    • -
    - -
    std::deque   <float>         testDeque;
    -std::list    <size_t>        testList;
    -std::map     <double, char>  testMap;
    -std::multimap<short, double> testMultiMap;
    -std::set     <int>           testSet;
    -std::multiset<std::string>   testMultiSet;
    -std::vector  <wchar_t>       testVector;
    -std::vector  <std::list<wchar_t>> testVectorList;
    -std::pair    <char, wchar_t> testPair;
    -
    -/* fill container */
    -
    -zen::XmlOut out(doc);
    -
    -out["deque"]    (testDeque);
    -out["list"]     (testList);
    -out["map"]      (testMap);
    -out["multimap"] (testMultiMap);
    -out["set"]      (testSet);
    -out["multiset"] (testMultiSet);
    -out["vector"]   (testVector);
    -out["vect_list"](testVectorList);
    -out["pair" ]    (testPair);
    -

    The resulting XML:

    -
    <?xml version="1.0" encoding="UTF-8"?>
    +
    std::deque <float> testDeque;
    +
    std::list <size_t> testList;
    +
    std::map <double, char> testMap;
    +
    std::multimap<short, double> testMultiMap;
    +
    std::set <int> testSet;
    +
    std::multiset<std::string> testMultiSet;
    +
    std::vector <wchar_t> testVector;
    +
    std::vector <std::list<wchar_t>> testVectorList;
    +
    std::pair <char, wchar_t> testPair;
    +
    +
    /* fill container */
    +
    +
    zen::XmlOut out(doc);
    +
    +
    out["deque"] (testDeque);
    +
    out["list"] (testList);
    +
    out["map"] (testMap);
    +
    out["multimap"] (testMultiMap);
    +
    out["set"] (testSet);
    +
    out["multiset"] (testMultiSet);
    +
    out["vector"] (testVector);
    +
    out["vect_list"](testVectorList);
    +
    out["pair" ] (testPair);
    +

    The resulting XML:

    +
    <?xml version="1.0" encoding="UTF-8"?>
     <Root>
         <deque>
             <Item>1.234</Item>
    @@ -490,106 +467,106 @@ out["pair" ]    (testPair);
             <two>â</two>
         </pair>
     </Root>
    -

    -Support for user-defined types

    -

    User types can be integrated into zen::Xml by providing specializations of zen::readText() and zen::writeText() or zen::readStruc() and zen::writeStruc(). The first pair should be used for all non-structured types that can be represented as a simple text string. This specialization is then used to convert the type to XML elements and XML attributes. The second pair should be specialized for structured types that require an XML representation as a hierarchy of elements. This specialization is used when converting the type to XML elements only.
    +

    +Support for user-defined types

    +

    User types can be integrated into zen::Xml by providing specializations of zen::readText() and zen::writeText() or zen::readStruc() and zen::writeStruc(). The first pair should be used for all non-structured types that can be represented as a simple text string. This specialization is then used to convert the type to XML elements and XML attributes. The second pair should be specialized for structured types that require an XML representation as a hierarchy of elements. This specialization is used when converting the type to XML elements only.

    - See section Type Safety for a discussion of type categories.
    +See section Type Safety for a discussion of type categories.

    - Example: Specialization for an enum type

    -
    enum UnitTime
    -{
    -    UNIT_SECOND,
    -    UNIT_MINUTE,
    -    UNIT_HOUR
    -};
    -
    -namespace zen
    -{
    -template <> inline
    -void writeText(const UnitTime& value, std::string& output)
    -{
    -    switch (value)
    -    {
    -        case UNIT_SECOND: output = "second"; break;
    -        case UNIT_MINUTE: output = "minute"; break;
    -        case UNIT_HOUR:   output = "hour"  ; break;
    -    }
    -}
    -
    -template <> inline
    -bool readText(const std::string& input, UnitTime& value)
    -{
    -    std::string tmp = input;
    -    zen::trim(tmp);
    -    if (tmp == "second")
    -        value = UNIT_SECOND;
    -    else if (tmp == "minute")
    -        value = UNIT_MINUTE;
    -    else if (tmp == "hour")
    -        value = UNIT_HOUR;
    -    else
    -        return false;
    -    return true;
    -}
    -}
    -

    Example: Brute-force specialization for an enum type

    -
    namespace zen
    -{
    -template <> inline
    -void writeText(const EnumType& value, std::string& output)
    -{
    -    output = zen::numberTo<std::string>(static_cast<int>(value)); //treat enum like an integer
    -}
    -
    -template <> inline
    -bool readText(const std::string& input, EnumType& value)
    -{
    -    value = static_cast<EnumType>(zen::stringTo<int>(input)); //treat enum like an integer
    -    return true;
    -}
    -}
    -

    Example: Specialization for a structured user type

    -
    struct Config
    -{
    -    int a;
    -    std::wstring b;
    -};
    -
    -namespace zen
    -{
    -template <> inline
    -void writeStruc(const Config& value, XmlElement& output)
    -{
    -    XmlOut out(output);
    -    out["number" ](value.a);
    -    out["address"](value.b);
    -}
    -
    -template <> inline
    -bool readStruc(const XmlElement& input, Config& value)
    -{
    -    XmlIn in(input);
    -    bool rv1 = in["number" ](value.a);
    -    bool rv2 = in["address"](value.b);
    -    return rv1 && rv2;
    -}
    -}
    -
    -int main()
    -{
    -    Config cfg = { 2,  L"Abc 3" };
    -
    -    std::vector<Config> cfgList;
    -    cfgList.push_back(cfg);
    -
    -    zen::XmlDoc doc;
    -    zen::XmlOut out(doc); //write to Xml via output proxy
    -    out["config"](cfgList);
    -    save(doc, "file.xml"); //throw XmlFileError
    -}
    -

    The resulting XML:

    -
    <?xml version="1.0" encoding="UTF-8"?>
    +Example: Specialization for an enum type 

    +
    enum UnitTime
    +
    {
    +
    UNIT_SECOND,
    +
    UNIT_MINUTE,
    +
    UNIT_HOUR
    +
    };
    +
    +
    namespace zen
    +
    {
    +
    template <> inline
    +
    void writeText(const UnitTime& value, std::string& output)
    +
    {
    +
    switch (value)
    +
    {
    +
    case UNIT_SECOND: output = "second"; break;
    +
    case UNIT_MINUTE: output = "minute"; break;
    +
    case UNIT_HOUR: output = "hour" ; break;
    +
    }
    +
    }
    +
    +
    template <> inline
    +
    bool readText(const std::string& input, UnitTime& value)
    +
    {
    +
    std::string tmp = input;
    +
    zen::trim(tmp);
    +
    if (tmp == "second")
    +
    value = UNIT_SECOND;
    +
    else if (tmp == "minute")
    +
    value = UNIT_MINUTE;
    +
    else if (tmp == "hour")
    +
    value = UNIT_HOUR;
    +
    else
    +
    return false;
    +
    return true;
    +
    }
    +
    }
    +

    Example: Brute-force specialization for an enum type

    +
    namespace zen
    +
    {
    +
    template <> inline
    +
    void writeText(const EnumType& value, std::string& output)
    +
    {
    +
    output = zen::numberTo<std::string>(static_cast<int>(value)); //treat enum like an integer
    +
    }
    +
    +
    template <> inline
    +
    bool readText(const std::string& input, EnumType& value)
    +
    {
    +
    value = static_cast<EnumType>(zen::stringTo<int>(input)); //treat enum like an integer
    +
    return true;
    +
    }
    +
    }
    +

    Example: Specialization for a structured user type

    +
    struct Config
    +
    {
    +
    int a;
    +
    std::wstring b;
    +
    };
    +
    +
    namespace zen
    +
    {
    +
    template <> inline
    +
    void writeStruc(const Config& value, XmlElement& output)
    +
    {
    +
    XmlOut out(output);
    +
    out["number" ](value.a);
    +
    out["address"](value.b);
    +
    }
    +
    +
    template <> inline
    +
    bool readStruc(const XmlElement& input, Config& value)
    +
    {
    +
    XmlIn in(input);
    +
    bool rv1 = in["number" ](value.a);
    +
    bool rv2 = in["address"](value.b);
    +
    return rv1 && rv2;
    +
    }
    +
    }
    +
    +
    int main()
    +
    {
    +
    Config cfg = { 2, L"Abc 3" };
    +
    +
    std::vector<Config> cfgList;
    +
    cfgList.push_back(cfg);
    +
    + +
    zen::XmlOut out(doc); //write to Xml via output proxy
    +
    out["config"](cfgList);
    +
    save(doc, "file.xml"); //throw XmlFileError
    +
    }
    +

    The resulting XML:

    +
    <?xml version="1.0" encoding="UTF-8"?>
     <Root>
         <config>
             <Item>
    @@ -598,40 +575,40 @@ Support for user-defined types
             </Item>
         </config>
     </Root>
    -

    -Structured user types

    -

    Although it is possible to enable conversion of structured user types by specializing zen::readStruc() and zen::writeStruc() (see Support for user-defined types), this approach has one drawback: If a mapping error occurs when converting an XML element to structured user data, for example a child-element is missing, the input proxy class zen::XmlIn is only able to detect that the whole conversion failed. It cannot say which child-elements in particular failed to convert.
    +

    +Structured user types

    +

    Although it is possible to enable conversion of structured user types by specializing zen::readStruc() and zen::writeStruc() (see Support for user-defined types), this approach has one drawback: If a mapping error occurs when converting an XML element to structured user data, for example a child-element is missing, the input proxy class zen::XmlIn is only able to detect that the whole conversion failed. It cannot say which child-elements in particular failed to convert.

    - Therefore it may be appropriate to convert structured types by calling subroutines in order to enable fine-granular logging:

    -
    void readConfig(const zen::XmlIn& in, Config& cfg)
    -{
    -    in["number" ](value.a); //failed conversions will now be logged for each single item by XmlIn
    -    in["address"](value.b); //instead of only once for the complete Config type!
    -}
    -
    -
    -void loadConfig(const wxString& filename, Config& cfg)
    -{
    -    zen::XmlDoc doc; //empty XML document
    -
    -    try
    -    {
    -        load(filename, doc); //throw XmlFileError, XmlParsingError
    -    }
    -    catch (const zen::XmlError& e) { /* handle error */ }
    -
    -    zen::XmlIn in(doc); 
    - 
    -    zen::XmlIn inConfig = in["config"]; //get input proxy for child element "config"
    -  
    -    readConfig(inConfig, cfg); //map child element to user data by calling subroutine
    -
    -    //check for mapping errors: errors occuring in subroutines are considered, too!
    -    if (in.errorsOccured())
    -       /* show mapping errors */
    -}
    -

    -Type Safety

    +Therefore it may be appropriate to convert structured types by calling subroutines in order to enable fine-granular logging:

    +
    void readConfig(const zen::XmlIn& in, Config& cfg)
    +
    {
    +
    in["number" ](value.a); //failed conversions will now be logged for each single item by XmlIn
    +
    in["address"](value.b); //instead of only once for the complete Config type!
    +
    }
    +
    +
    +
    void loadConfig(const wxString& filename, Config& cfg)
    +
    {
    +
    zen::XmlDoc doc; //empty XML document
    +
    +
    try
    +
    {
    +
    load(filename, doc); //throw XmlFileError, XmlParsingError
    +
    }
    +
    catch (const zen::XmlError& e) { /* handle error */ }
    +
    +
    zen::XmlIn in(doc);
    +
    +
    zen::XmlIn inConfig = in["config"]; //get input proxy for child element "config"
    +
    +
    readConfig(inConfig, cfg); //map child element to user data by calling subroutine
    +
    +
    //check for mapping errors: errors occuring in subroutines are considered, too!
    +
    if (in.errorsOccured())
    +
    /* show mapping errors */
    +
    }
    +

    +Type Safety

    zen::Xml heavily uses methods of compile-time introspection in order to free the user from managing basic type conversions by himself. Thereby it is important to find the right balance between automatic conversions and type safety so that program correctness is not compromised. In the context of XML processing three fundamental type categories can be recognized:

    • string-like types: std::string, wchar_t*, char[], wchar_t, wxString, MyStringClass, ...
    • @@ -639,7 +616,7 @@ Type Safety
    • structured types: any to-string-convertible type, STL containers, std::pair, structured user types

    These categories can be seen as a sequence of inclusive sets:

    -
    -----------------------------
    +
    -----------------------------
     | structured                |  Used as: XML element value
     | ------------------------- |           Conversion via: readStruc(), writeStruc() - may be specialized for user-defined types!
     | | to-string-convertible | |  Used as: XML element/attribute value
    @@ -648,32 +625,30 @@ Type Safety
     | | ---------------       | |           Conversion via: utfCvrtTo<>()
     | ------------------------- |
     -----------------------------
    -

    A practical implication of this design is that conversions that do not make sense in a particular context simply lead to compile-time errors:

    -
    zen::XmlOut out(doc);
    -out[L'Z'](someValue); //fine: a wchar_t is acceptable as an element name
    -out[1234](someValue); //compiler error: an integer is NOT "string-like"!
    -


    -

    -
    int i = 0;
    -std::vector<int> v;
    -
    -zen::XmlOut out(doc);
    -out["elem1"](i); //fine: both i and v can be converted to an XML element
    -out["elem2"](v); //
    -
    -out["elem"].attribute("attr1", i); //fine: an integer can be converted to an XML attribute
    -out["elem"].attribute("attr2", v); //compiler error: a std::vector<int> is NOT "to-string-convertible"!
    -
    Author:
    Zenju
    +

    A practical implication of this design is that conversions that do not make sense in a particular context simply lead to compile-time errors:

    +
    zen::XmlOut out(doc);
    +
    out[L'Z'](someValue); //fine: a wchar_t is acceptable as an element name
    +
    out[1234](someValue); //compiler error: an integer is NOT "string-like"!
    +


    +

    +
    int i = 0;
    +
    std::vector<int> v;
    +
    +
    zen::XmlOut out(doc);
    +
    out["elem1"](i); //fine: both i and v can be converted to an XML element
    +
    out["elem2"](v); //
    +
    +
    out["elem"].attribute("attr1", i); //fine: an integer can be converted to an XML attribute
    +
    out["elem"].attribute("attr2", v); //compiler error: a std::vector<int> is NOT "to-string-convertible"!
    +
    Author
    Zenju

    Email: zenju AT gmx DOT de
    - - + - diff --git a/zenxml/doc/io_8h_source.html b/zenxml/doc/io_8h_source.html index 09ec749d..825df7ca 100644 --- a/zenxml/doc/io_8h_source.html +++ b/zenxml/doc/io_8h_source.html @@ -3,46 +3,36 @@ + zen::Xml: io.h Source File - - - - + + - + -
    - - +
    - - - - - -
    zen::Xml -
    Simple C++ XML Processing
    - - + + @@ -51,7 +41,6 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • Main Page
  • Namespaces
  • Classes
  • -
  • Files
  • @@ -70,18 +59,12 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • - -
    + All Classes Namespaces Functions Variables Pages
    @@ -90,124 +73,133 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    + +
    io.h
    -
    00001 // **************************************************************************
    -00002 // * This file is part of the zen::Xml project. It is distributed under the *
    -00003 // * Boost Software License: http://www.boost.org/LICENSE_1_0.txt           *
    -00004 // * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved        *
    -00005 // **************************************************************************
    -00006 
    -00007 #ifndef ZEN_XML_IO_HEADER_8917640501480763248343343
    -00008 #define ZEN_XML_IO_HEADER_8917640501480763248343343
    -00009 
    -00010 #include <cstdio>
    -00011 #include <cerrno>
    -00012 #include <zen/scope_guard.h>
    -00013 #include <zen/utf.h>
    -00014 #include "error.h"
    -00015 
    -00016 namespace zen
    -00017 {
    -00023 #if !defined(ZEN_PLATFORM_WINDOWS) && !defined(ZEN_PLATFORM_OTHER)
    -00024 #error Please specify your platform: #define ZEN_PLATFORM_WINDOWS or ZEN_PLATFORM_OTHER
    -00025 #endif
    -00026 
    -00028 struct XmlFileError : public XmlError
    -00029 {
    -00030     typedef int ErrorCode;
    -00031 
    -00032     explicit XmlFileError(ErrorCode ec) : lastError(ec) {}
    -00034     ErrorCode lastError;
    -00035 };
    -00036 
    -00037 
    -00038 #ifdef ZEN_PLATFORM_WINDOWS
    -00039 namespace implemenation //sad but true
    -00040 {
    -00041 template <class String> inline
    -00042 FILE* fopen(const String& filename, const wchar_t* mode)
    -00043 {
    -00044 #ifdef _MSC_VER
    -00045     FILE* handle = nullptr;
    -00046     errno_t rv = ::_wfopen_s(&handle, utfCvrtTo<std::wstring>(filename).c_str(), mode); //more secure?
    -00047     (void)rv;
    -00048     return handle;
    -00049 #else
    -00050     return ::_wfopen(utfCvrtTo<std::wstring>(filename).c_str(), mode);
    -00051 #endif
    -00052 }
    -00053 }
    -00054 #endif
    -00055 
    -00056 
    -00058 
    -00064 template <class String>
    -00065 void saveStream(const std::string& stream, const String& filename) //throw XmlFileError
    -00066 {
    -00067 #ifdef ZEN_PLATFORM_WINDOWS
    -00068     FILE* handle = implemenation::fopen(utfCvrtTo<std::wstring>(filename).c_str(), L"wb");
    -00069 #else
    -00070     FILE* handle = ::fopen(utfCvrtTo<std::string>(filename).c_str(), "w");
    -00071 #endif
    -00072     if (handle == nullptr)
    -00073         throw XmlFileError(errno);
    -00074     ZEN_ON_SCOPE_EXIT(::fclose(handle));
    -00075 
    -00076     const size_t bytesWritten = ::fwrite(stream.c_str(), 1, stream.size(), handle);
    -00077     if (::ferror(handle) != 0)
    -00078         throw XmlFileError(errno);
    -00079 
    -00080     (void)bytesWritten;
    -00081     assert(bytesWritten == stream.size());
    -00082 }
    -00083 
    -00084 
    -00086 
    -00092 template <class String>
    -00093 std::string loadStream(const String& filename) //throw XmlFileError
    -00094 {
    -00095 #ifdef ZEN_PLATFORM_WINDOWS
    -00096     FILE* handle = implemenation::fopen(utfCvrtTo<std::wstring>(filename).c_str(), L"rb");
    -00097 #else
    -00098     FILE* handle = ::fopen(utfCvrtTo<std::string>(filename).c_str(), "r");
    -00099 #endif
    -00100     if (handle == nullptr)
    -00101         throw XmlFileError(errno);
    -00102     ZEN_ON_SCOPE_EXIT(::fclose(handle));
    -00103 
    -00104     std::string stream;
    -00105     const size_t blockSize = 64 * 1024;
    -00106     do
    -00107     {
    -00108         stream.resize(stream.size() + blockSize); //let's pray std::string implements exponential growth!
    -00109 
    -00110         const size_t bytesRead = ::fread(&*(stream.begin() + stream.size() - blockSize), 1, blockSize, handle);
    -00111         if (::ferror(handle))
    -00112             throw XmlFileError(errno);
    -00113         if (bytesRead > blockSize)
    -00114             throw XmlFileError(0);
    -00115         if (bytesRead < blockSize)
    -00116             stream.resize(stream.size() - (blockSize - bytesRead)); //caveat: unsigned arithmetics
    -00117     }
    -00118     while (!::feof(handle));
    -00119 
    -00120     return stream;
    -00121 }
    -00122 }
    -00123 
    -00124 #endif //ZEN_XML_IO_HEADER_8917640501480763248343343
    -
    - - +
    1 // **************************************************************************
    +
    2 // * This file is part of the FreeFileSync project. It is distributed under *
    +
    3 // * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
    +
    4 // * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved *
    +
    5 // **************************************************************************
    +
    6 
    +
    7 #ifndef ZEN_XML_IO_HEADER_8917640501480763248343343
    +
    8 #define ZEN_XML_IO_HEADER_8917640501480763248343343
    +
    9 
    +
    10 #include <cstdio>
    +
    11 #include <cerrno>
    +
    12 #include <zen/scope_guard.h>
    +
    13 #include <zen/utf.h>
    +
    14 #include "error.h"
    +
    15 
    +
    16 namespace zen
    +
    17 {
    +
    23 #if !defined(ZEN_WIN) && !defined(ZEN_LINUX) && !defined(ZEN_MAC)
    +
    24 #error Please specify your platform: #define ZEN_WIN, ZEN_LINUX or ZEN_MAC
    +
    25 #endif
    +
    26 
    +
    27 
    +
    29 struct XmlFileError : public XmlError
    +
    30 {
    +
    31  typedef int ErrorCode;
    +
    32 
    +
    33  explicit XmlFileError(ErrorCode ec) : lastError(ec) {}
    +
    35  ErrorCode lastError;
    +
    36 };
    +
    37 
    +
    38 
    +
    39 #ifdef ZEN_WIN
    +
    40 namespace implemenation //sad but true
    +
    41 {
    +
    42 template <class String> inline
    +
    43 FILE* fopen(const String& filename, const wchar_t* mode)
    +
    44 {
    +
    45 #ifdef _MSC_VER
    +
    46  FILE* handle = nullptr;
    +
    47  errno_t rv = ::_wfopen_s(&handle, utfCvrtTo<std::wstring>(filename).c_str(), mode); //more secure?
    +
    48  (void)rv;
    +
    49  return handle;
    +
    50 #else
    +
    51  return ::_wfopen(utfCvrtTo<std::wstring>(filename).c_str(), mode);
    +
    52 #endif
    +
    53 }
    +
    54 }
    +
    55 #endif
    +
    56 
    +
    57 
    +
    59 
    +
    65 template <class String>
    +
    66 void saveStream(const std::string& stream, const String& filename) //throw XmlFileError
    +
    67 {
    +
    68 #ifdef ZEN_WIN
    +
    69  FILE* handle = implemenation::fopen(utfCvrtTo<std::wstring>(filename).c_str(), L"wb");
    +
    70 #else
    +
    71  FILE* handle = ::fopen(utfCvrtTo<std::string>(filename).c_str(), "w");
    +
    72 #endif
    +
    73  if (handle == nullptr)
    +
    74  throw XmlFileError(errno);
    +
    75  ZEN_ON_SCOPE_EXIT(::fclose(handle));
    +
    76 
    +
    77  const size_t bytesWritten = ::fwrite(stream.c_str(), 1, stream.size(), handle);
    +
    78  if (::ferror(handle) != 0)
    +
    79  throw XmlFileError(errno);
    +
    80 
    +
    81  (void)bytesWritten;
    +
    82  assert(bytesWritten == stream.size());
    +
    83 }
    +
    84 
    +
    85 
    +
    87 
    +
    93 template <class String>
    +
    94 std::string loadStream(const String& filename) //throw XmlFileError
    +
    95 {
    +
    96 #ifdef ZEN_WIN
    +
    97  FILE* handle = implemenation::fopen(utfCvrtTo<std::wstring>(filename).c_str(), L"rb");
    +
    98 #else
    +
    99  FILE* handle = ::fopen(utfCvrtTo<std::string>(filename).c_str(), "r");
    +
    100 #endif
    +
    101  if (handle == nullptr)
    +
    102  throw XmlFileError(errno);
    +
    103  ZEN_ON_SCOPE_EXIT(::fclose(handle));
    +
    104 
    +
    105  std::string stream;
    +
    106  const size_t blockSize = 64 * 1024;
    +
    107  do
    +
    108  {
    +
    109  stream.resize(stream.size() + blockSize); //let's pray std::string implements exponential growth!
    +
    110 
    +
    111  const size_t bytesRead = ::fread(&*(stream.begin() + stream.size() - blockSize), 1, blockSize, handle);
    +
    112  if (::ferror(handle))
    +
    113  throw XmlFileError(errno);
    +
    114  if (bytesRead > blockSize)
    +
    115  throw XmlFileError(0);
    +
    116  if (bytesRead < blockSize)
    +
    117  stream.resize(stream.size() - (blockSize - bytesRead)); //caveat: unsigned arithmetics
    +
    118  }
    +
    119  while (!::feof(handle));
    +
    120 
    +
    121  return stream;
    +
    122 }
    +
    123 }
    +
    124 
    +
    125 #endif //ZEN_XML_IO_HEADER_8917640501480763248343343
    +
    void saveStream(const std::string &stream, const String &filename)
    Save byte stream to a file.
    Definition: io.h:66
    +
    std::string loadStream(const String &filename)
    Load byte stream from a file.
    Definition: io.h:94
    +
    ErrorCode lastError
    Native error code: errno.
    Definition: io.h:35
    +
    Exception thrown due to failed file I/O.
    Definition: io.h:29
    +
    Exception base class for zen::Xml.
    Definition: error.h:13
    +
    + - diff --git a/zenxml/doc/jquery.js b/zenxml/doc/jquery.js index 90b3a2bc..c197801c 100644 --- a/zenxml/doc/jquery.js +++ b/zenxml/doc/jquery.js @@ -1,64 +1,31 @@ -/* - * jQuery JavaScript Library v1.3.2 +/*! + * jQuery JavaScript Library v1.7.1 * http://jquery.com/ * - * Copyright (c) 2009 John Resig - * Dual licensed under the MIT and GPL licenses. - * http://docs.jquery.com/License + * Copyright 2011, John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license * - * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009) - * Revision: 6246 + * Includes Sizzle.js + * http://sizzlejs.com/ + * Copyright 2011, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * + * Date: Mon Nov 21 21:11:03 2011 -0500 */ -(function(){var l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),"find",E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find("*").andSelf(),F=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F=="width"||F=="height"){var L,G={position:"absolute",visibility:"hidden",display:"block"},K=F=="width"?["Left","Right"]:["Top","Bottom"];function I(){L=F=="width"?H.offsetWidth:H.offsetHeight;if(E==="border"){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,"padding"+this,true))||0}if(E==="margin"){L+=parseFloat(o.curCSS(H,"margin"+this,true))||0}else{L-=parseFloat(o.curCSS(H,"border"+this+"Width",true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,S){if(typeof S==="number"){S+=""}if(!S){return}if(typeof S==="string"){S=S.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+">"});var O=S.replace(/^\s+/,"").substring(0,10).toLowerCase();var Q=!O.indexOf("",""]||!O.indexOf("",""]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"","
    "]||!O.indexOf("",""]||(!O.indexOf("",""]||!O.indexOf("",""]||!o.support.htmlSerialize&&[1,"div
    ","
    "]||[0,"",""];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/"&&!R?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!o.className.has(this,F)}o.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}}); -/* - * Sizzle CSS Selector Engine - v0.9.3 - * Copyright 2009, The Dojo Foundation +(function(bb,L){var av=bb.document,bu=bb.navigator,bl=bb.location;var b=(function(){var bF=function(b0,b1){return new bF.fn.init(b0,b1,bD)},bU=bb.jQuery,bH=bb.$,bD,bY=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,bM=/\S/,bI=/^\s+/,bE=/\s+$/,bA=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,bN=/^[\],:{}\s]*$/,bW=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,bP=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,bJ=/(?:^|:|,)(?:\s*\[)+/g,by=/(webkit)[ \/]([\w.]+)/,bR=/(opera)(?:.*version)?[ \/]([\w.]+)/,bQ=/(msie) ([\w.]+)/,bS=/(mozilla)(?:.*? rv:([\w.]+))?/,bB=/-([a-z]|[0-9])/ig,bZ=/^-ms-/,bT=function(b0,b1){return(b1+"").toUpperCase()},bX=bu.userAgent,bV,bC,e,bL=Object.prototype.toString,bG=Object.prototype.hasOwnProperty,bz=Array.prototype.push,bK=Array.prototype.slice,bO=String.prototype.trim,bv=Array.prototype.indexOf,bx={};bF.fn=bF.prototype={constructor:bF,init:function(b0,b4,b3){var b2,b5,b1,b6;if(!b0){return this}if(b0.nodeType){this.context=this[0]=b0;this.length=1;return this}if(b0==="body"&&!b4&&av.body){this.context=av;this[0]=av.body;this.selector=b0;this.length=1;return this}if(typeof b0==="string"){if(b0.charAt(0)==="<"&&b0.charAt(b0.length-1)===">"&&b0.length>=3){b2=[null,b0,null]}else{b2=bY.exec(b0)}if(b2&&(b2[1]||!b4)){if(b2[1]){b4=b4 instanceof bF?b4[0]:b4;b6=(b4?b4.ownerDocument||b4:av);b1=bA.exec(b0);if(b1){if(bF.isPlainObject(b4)){b0=[av.createElement(b1[1])];bF.fn.attr.call(b0,b4,true)}else{b0=[b6.createElement(b1[1])]}}else{b1=bF.buildFragment([b2[1]],[b6]);b0=(b1.cacheable?bF.clone(b1.fragment):b1.fragment).childNodes}return bF.merge(this,b0)}else{b5=av.getElementById(b2[2]);if(b5&&b5.parentNode){if(b5.id!==b2[2]){return b3.find(b0)}this.length=1;this[0]=b5}this.context=av;this.selector=b0;return this}}else{if(!b4||b4.jquery){return(b4||b3).find(b0)}else{return this.constructor(b4).find(b0)}}}else{if(bF.isFunction(b0)){return b3.ready(b0)}}if(b0.selector!==L){this.selector=b0.selector;this.context=b0.context}return bF.makeArray(b0,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return bK.call(this,0)},get:function(b0){return b0==null?this.toArray():(b0<0?this[this.length+b0]:this[b0])},pushStack:function(b1,b3,b0){var b2=this.constructor();if(bF.isArray(b1)){bz.apply(b2,b1)}else{bF.merge(b2,b1)}b2.prevObject=this;b2.context=this.context;if(b3==="find"){b2.selector=this.selector+(this.selector?" ":"")+b0}else{if(b3){b2.selector=this.selector+"."+b3+"("+b0+")"}}return b2},each:function(b1,b0){return bF.each(this,b1,b0)},ready:function(b0){bF.bindReady();bC.add(b0);return this},eq:function(b0){b0=+b0;return b0===-1?this.slice(b0):this.slice(b0,b0+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(bK.apply(this,arguments),"slice",bK.call(arguments).join(","))},map:function(b0){return this.pushStack(bF.map(this,function(b2,b1){return b0.call(b2,b1,b2)}))},end:function(){return this.prevObject||this.constructor(null)},push:bz,sort:[].sort,splice:[].splice};bF.fn.init.prototype=bF.fn;bF.extend=bF.fn.extend=function(){var b9,b2,b0,b1,b6,b7,b5=arguments[0]||{},b4=1,b3=arguments.length,b8=false;if(typeof b5==="boolean"){b8=b5;b5=arguments[1]||{};b4=2}if(typeof b5!=="object"&&!bF.isFunction(b5)){b5={}}if(b3===b4){b5=this;--b4}for(;b40){return}bC.fireWith(av,[bF]);if(bF.fn.trigger){bF(av).trigger("ready").off("ready")}}},bindReady:function(){if(bC){return}bC=bF.Callbacks("once memory");if(av.readyState==="complete"){return setTimeout(bF.ready,1)}if(av.addEventListener){av.addEventListener("DOMContentLoaded",e,false);bb.addEventListener("load",bF.ready,false)}else{if(av.attachEvent){av.attachEvent("onreadystatechange",e);bb.attachEvent("onload",bF.ready);var b0=false;try{b0=bb.frameElement==null}catch(b1){}if(av.documentElement.doScroll&&b0){bw()}}}},isFunction:function(b0){return bF.type(b0)==="function"},isArray:Array.isArray||function(b0){return bF.type(b0)==="array"},isWindow:function(b0){return b0&&typeof b0==="object"&&"setInterval" in b0},isNumeric:function(b0){return !isNaN(parseFloat(b0))&&isFinite(b0)},type:function(b0){return b0==null?String(b0):bx[bL.call(b0)]||"object"},isPlainObject:function(b2){if(!b2||bF.type(b2)!=="object"||b2.nodeType||bF.isWindow(b2)){return false}try{if(b2.constructor&&!bG.call(b2,"constructor")&&!bG.call(b2.constructor.prototype,"isPrototypeOf")){return false}}catch(b1){return false}var b0;for(b0 in b2){}return b0===L||bG.call(b2,b0)},isEmptyObject:function(b1){for(var b0 in b1){return false}return true},error:function(b0){throw new Error(b0)},parseJSON:function(b0){if(typeof b0!=="string"||!b0){return null}b0=bF.trim(b0);if(bb.JSON&&bb.JSON.parse){return bb.JSON.parse(b0)}if(bN.test(b0.replace(bW,"@").replace(bP,"]").replace(bJ,""))){return(new Function("return "+b0))()}bF.error("Invalid JSON: "+b0)},parseXML:function(b2){var b0,b1;try{if(bb.DOMParser){b1=new DOMParser();b0=b1.parseFromString(b2,"text/xml")}else{b0=new ActiveXObject("Microsoft.XMLDOM");b0.async="false";b0.loadXML(b2)}}catch(b3){b0=L}if(!b0||!b0.documentElement||b0.getElementsByTagName("parsererror").length){bF.error("Invalid XML: "+b2)}return b0},noop:function(){},globalEval:function(b0){if(b0&&bM.test(b0)){(bb.execScript||function(b1){bb["eval"].call(bb,b1)})(b0)}},camelCase:function(b0){return b0.replace(bZ,"ms-").replace(bB,bT)},nodeName:function(b1,b0){return b1.nodeName&&b1.nodeName.toUpperCase()===b0.toUpperCase()},each:function(b3,b6,b2){var b1,b4=0,b5=b3.length,b0=b5===L||bF.isFunction(b3);if(b2){if(b0){for(b1 in b3){if(b6.apply(b3[b1],b2)===false){break}}}else{for(;b40&&b0[0]&&b0[b1-1])||b1===0||bF.isArray(b0));if(b3){for(;b21?aJ.call(arguments,0):bG;if(!(--bw)){bC.resolveWith(bC,bx)}}}function bz(bF){return function(bG){bB[bF]=arguments.length>1?aJ.call(arguments,0):bG;bC.notifyWith(bE,bB)}}if(e>1){for(;bv
    a";bI=bv.getElementsByTagName("*");bF=bv.getElementsByTagName("a")[0];if(!bI||!bI.length||!bF){return{}}bG=av.createElement("select");bx=bG.appendChild(av.createElement("option"));bE=bv.getElementsByTagName("input")[0];bJ={leadingWhitespace:(bv.firstChild.nodeType===3),tbody:!bv.getElementsByTagName("tbody").length,htmlSerialize:!!bv.getElementsByTagName("link").length,style:/top/.test(bF.getAttribute("style")),hrefNormalized:(bF.getAttribute("href")==="/a"),opacity:/^0.55/.test(bF.style.opacity),cssFloat:!!bF.style.cssFloat,checkOn:(bE.value==="on"),optSelected:bx.selected,getSetAttribute:bv.className!=="t",enctype:!!av.createElement("form").enctype,html5Clone:av.createElement("nav").cloneNode(true).outerHTML!=="<:nav>",submitBubbles:true,changeBubbles:true,focusinBubbles:false,deleteExpando:true,noCloneEvent:true,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableMarginRight:true};bE.checked=true;bJ.noCloneChecked=bE.cloneNode(true).checked;bG.disabled=true;bJ.optDisabled=!bx.disabled;try{delete bv.test}catch(bC){bJ.deleteExpando=false}if(!bv.addEventListener&&bv.attachEvent&&bv.fireEvent){bv.attachEvent("onclick",function(){bJ.noCloneEvent=false});bv.cloneNode(true).fireEvent("onclick")}bE=av.createElement("input");bE.value="t";bE.setAttribute("type","radio");bJ.radioValue=bE.value==="t";bE.setAttribute("checked","checked");bv.appendChild(bE);bD=av.createDocumentFragment();bD.appendChild(bv.lastChild);bJ.checkClone=bD.cloneNode(true).cloneNode(true).lastChild.checked;bJ.appendChecked=bE.checked;bD.removeChild(bE);bD.appendChild(bv);bv.innerHTML="";if(bb.getComputedStyle){bA=av.createElement("div");bA.style.width="0";bA.style.marginRight="0";bv.style.width="2px";bv.appendChild(bA);bJ.reliableMarginRight=(parseInt((bb.getComputedStyle(bA,null)||{marginRight:0}).marginRight,10)||0)===0}if(bv.attachEvent){for(by in {submit:1,change:1,focusin:1}){bB="on"+by;bw=(bB in bv);if(!bw){bv.setAttribute(bB,"return;");bw=(typeof bv[bB]==="function")}bJ[by+"Bubbles"]=bw}}bD.removeChild(bv);bD=bG=bx=bA=bv=bE=null;b(function(){var bM,bU,bV,bT,bN,bO,bL,bS,bR,e,bP,bQ=av.getElementsByTagName("body")[0];if(!bQ){return}bL=1;bS="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;";bR="visibility:hidden;border:0;";e="style='"+bS+"border:5px solid #000;padding:0;'";bP="
    ";bM=av.createElement("div");bM.style.cssText=bR+"width:0;height:0;position:static;top:0;margin-top:"+bL+"px";bQ.insertBefore(bM,bQ.firstChild);bv=av.createElement("div");bM.appendChild(bv);bv.innerHTML="
    t
    ";bz=bv.getElementsByTagName("td");bw=(bz[0].offsetHeight===0);bz[0].style.display="";bz[1].style.display="none";bJ.reliableHiddenOffsets=bw&&(bz[0].offsetHeight===0);bv.innerHTML="";bv.style.width=bv.style.paddingLeft="1px";b.boxModel=bJ.boxModel=bv.offsetWidth===2;if(typeof bv.style.zoom!=="undefined"){bv.style.display="inline";bv.style.zoom=1;bJ.inlineBlockNeedsLayout=(bv.offsetWidth===2);bv.style.display="";bv.innerHTML="
    ";bJ.shrinkWrapBlocks=(bv.offsetWidth!==2)}bv.style.cssText=bS+bR;bv.innerHTML=bP;bU=bv.firstChild;bV=bU.firstChild;bN=bU.nextSibling.firstChild.firstChild;bO={doesNotAddBorder:(bV.offsetTop!==5),doesAddBorderForTableAndCells:(bN.offsetTop===5)};bV.style.position="fixed";bV.style.top="20px";bO.fixedPosition=(bV.offsetTop===20||bV.offsetTop===15);bV.style.position=bV.style.top="";bU.style.overflow="hidden";bU.style.position="relative";bO.subtractsBorderForOverflowNotVisible=(bV.offsetTop===-5);bO.doesNotIncludeMarginInBodyOffset=(bQ.offsetTop!==bL);bQ.removeChild(bM);bv=bM=null;b.extend(bJ,bO)});return bJ})();var aS=/^(?:\{.*\}|\[.*\])$/,aA=/([A-Z])/g;b.extend({cache:{},uuid:0,expando:"jQuery"+(b.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},hasData:function(e){e=e.nodeType?b.cache[e[b.expando]]:e[b.expando];return !!e&&!S(e)},data:function(bx,bv,bz,by){if(!b.acceptData(bx)){return}var bG,bA,bD,bE=b.expando,bC=typeof bv==="string",bF=bx.nodeType,e=bF?b.cache:bx,bw=bF?bx[bE]:bx[bE]&&bE,bB=bv==="events";if((!bw||!e[bw]||(!bB&&!by&&!e[bw].data))&&bC&&bz===L){return}if(!bw){if(bF){bx[bE]=bw=++b.uuid}else{bw=bE}}if(!e[bw]){e[bw]={};if(!bF){e[bw].toJSON=b.noop}}if(typeof bv==="object"||typeof bv==="function"){if(by){e[bw]=b.extend(e[bw],bv)}else{e[bw].data=b.extend(e[bw].data,bv)}}bG=bA=e[bw];if(!by){if(!bA.data){bA.data={}}bA=bA.data}if(bz!==L){bA[b.camelCase(bv)]=bz}if(bB&&!bA[bv]){return bG.events}if(bC){bD=bA[bv];if(bD==null){bD=bA[b.camelCase(bv)]}}else{bD=bA}return bD},removeData:function(bx,bv,by){if(!b.acceptData(bx)){return}var bB,bA,bz,bC=b.expando,bD=bx.nodeType,e=bD?b.cache:bx,bw=bD?bx[bC]:bC;if(!e[bw]){return}if(bv){bB=by?e[bw]:e[bw].data;if(bB){if(!b.isArray(bv)){if(bv in bB){bv=[bv]}else{bv=b.camelCase(bv);if(bv in bB){bv=[bv]}else{bv=bv.split(" ")}}}for(bA=0,bz=bv.length;bA-1){return true}}return false},val:function(bx){var e,bv,by,bw=this[0];if(!arguments.length){if(bw){e=b.valHooks[bw.nodeName.toLowerCase()]||b.valHooks[bw.type];if(e&&"get" in e&&(bv=e.get(bw,"value"))!==L){return bv}bv=bw.value;return typeof bv==="string"?bv.replace(aU,""):bv==null?"":bv}return}by=b.isFunction(bx);return this.each(function(bA){var bz=b(this),bB;if(this.nodeType!==1){return}if(by){bB=bx.call(this,bA,bz.val())}else{bB=bx}if(bB==null){bB=""}else{if(typeof bB==="number"){bB+=""}else{if(b.isArray(bB)){bB=b.map(bB,function(bC){return bC==null?"":bC+""})}}}e=b.valHooks[this.nodeName.toLowerCase()]||b.valHooks[this.type];if(!e||!("set" in e)||e.set(this,bB,"value")===L){this.value=bB}})}});b.extend({valHooks:{option:{get:function(e){var bv=e.attributes.value;return !bv||bv.specified?e.value:e.text}},select:{get:function(e){var bA,bv,bz,bx,by=e.selectedIndex,bB=[],bC=e.options,bw=e.type==="select-one";if(by<0){return null}bv=bw?by:0;bz=bw?by+1:bC.length;for(;bv=0});if(!e.length){bv.selectedIndex=-1}return e}}},attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(bA,bx,bB,bz){var bw,e,by,bv=bA.nodeType; +if(!bA||bv===3||bv===8||bv===2){return}if(bz&&bx in b.attrFn){return b(bA)[bx](bB)}if(typeof bA.getAttribute==="undefined"){return b.prop(bA,bx,bB)}by=bv!==1||!b.isXMLDoc(bA);if(by){bx=bx.toLowerCase();e=b.attrHooks[bx]||(ao.test(bx)?aY:be)}if(bB!==L){if(bB===null){b.removeAttr(bA,bx);return}else{if(e&&"set" in e&&by&&(bw=e.set(bA,bB,bx))!==L){return bw}else{bA.setAttribute(bx,""+bB);return bB}}}else{if(e&&"get" in e&&by&&(bw=e.get(bA,bx))!==null){return bw}else{bw=bA.getAttribute(bx);return bw===null?L:bw}}},removeAttr:function(bx,bz){var by,bA,bv,e,bw=0;if(bz&&bx.nodeType===1){bA=bz.toLowerCase().split(af);e=bA.length;for(;bw=0)}}})});var bd=/^(?:textarea|input|select)$/i,n=/^([^\.]*)?(?:\.(.+))?$/,J=/\bhover(\.\S+)?\b/,aO=/^key/,bf=/^(?:mouse|contextmenu)|click/,T=/^(?:focusinfocus|focusoutblur)$/,U=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,Y=function(e){var bv=U.exec(e);if(bv){bv[1]=(bv[1]||"").toLowerCase();bv[3]=bv[3]&&new RegExp("(?:^|\\s)"+bv[3]+"(?:\\s|$)")}return bv},j=function(bw,e){var bv=bw.attributes||{};return((!e[1]||bw.nodeName.toLowerCase()===e[1])&&(!e[2]||(bv.id||{}).value===e[2])&&(!e[3]||e[3].test((bv["class"]||{}).value)))},bt=function(e){return b.event.special.hover?e:e.replace(J,"mouseenter$1 mouseleave$1")};b.event={add:function(bx,bC,bJ,bA,by){var bD,bB,bK,bI,bH,bF,e,bG,bv,bz,bw,bE;if(bx.nodeType===3||bx.nodeType===8||!bC||!bJ||!(bD=b._data(bx))){return}if(bJ.handler){bv=bJ;bJ=bv.handler}if(!bJ.guid){bJ.guid=b.guid++}bK=bD.events;if(!bK){bD.events=bK={}}bB=bD.handle;if(!bB){bD.handle=bB=function(bL){return typeof b!=="undefined"&&(!bL||b.event.triggered!==bL.type)?b.event.dispatch.apply(bB.elem,arguments):L};bB.elem=bx}bC=b.trim(bt(bC)).split(" ");for(bI=0;bI=0){bG=bG.slice(0,-1);bw=true}if(bG.indexOf(".")>=0){bx=bG.split(".");bG=bx.shift();bx.sort()}if((!bA||b.event.customEvent[bG])&&!b.event.global[bG]){return}bv=typeof bv==="object"?bv[b.expando]?bv:new b.Event(bG,bv):new b.Event(bG);bv.type=bG;bv.isTrigger=true;bv.exclusive=bw;bv.namespace=bx.join(".");bv.namespace_re=bv.namespace?new RegExp("(^|\\.)"+bx.join("\\.(?:.*\\.)?")+"(\\.|$)"):null;by=bG.indexOf(":")<0?"on"+bG:"";if(!bA){e=b.cache;for(bC in e){if(e[bC].events&&e[bC].events[bG]){b.event.trigger(bv,bD,e[bC].handle.elem,true)}}return}bv.result=L;if(!bv.target){bv.target=bA}bD=bD!=null?b.makeArray(bD):[];bD.unshift(bv);bF=b.event.special[bG]||{};if(bF.trigger&&bF.trigger.apply(bA,bD)===false){return}bB=[[bA,bF.bindType||bG]];if(!bJ&&!bF.noBubble&&!b.isWindow(bA)){bI=bF.delegateType||bG;bH=T.test(bI+bG)?bA:bA.parentNode;bz=null;for(;bH;bH=bH.parentNode){bB.push([bH,bI]);bz=bH}if(bz&&bz===bA.ownerDocument){bB.push([bz.defaultView||bz.parentWindow||bb,bI])}}for(bC=0;bCbA){bH.push({elem:this,matches:bz.slice(bA)})}for(bC=0;bC0?this.on(e,null,bx,bw):this.trigger(e)};if(b.attrFn){b.attrFn[e]=true}if(aO.test(e)){b.event.fixHooks[e]=b.event.keyHooks}if(bf.test(e)){b.event.fixHooks[e]=b.event.mouseHooks}}); +/*! + * Sizzle CSS Selector Engine + * Copyright 2011, The Dojo Foundation * Released under the MIT, BSD, and GPL Licenses. * More information: http://sizzlejs.com/ */ -(function(){var R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&&U.nodeType!==9){return[]}if(!Y||typeof Y!=="string"){return ab}var Z=[],W,af,ai,T,ad,V,X=true;R.lastIndex=0;while((W=R.exec(Y))!==null){Z.push(W[1]);if(W[2]){V=RegExp.rightContext;break}}if(Z.length>1&&M.exec(Y)){if(Z.length===2&&I.relative[Z[0]]){af=J(Z[0]+Z[1],U)}else{af=I.relative[Z[0]]?[U]:F(Z.shift(),U);while(Z.length){Y=Z.shift();if(I.relative[Y]){Y+=Z.shift()}af=J(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:F.find(Z.pop(),Z.length===1&&U.parentNode?U.parentNode:U,Q(U));af=F.filter(ae.expr,ae.set);if(Z.length>0){ai=E(af)}else{X=false}while(Z.length){var ah=Z.pop(),ag=ah;if(!I.relative[ah]){ah=""}else{ag=Z.pop()}if(ag==null){ag=U}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw"Syntax error, unrecognized expression: "+(ah||Y)}if(H.call(ai)==="[object Array]"){if(!X){ab.push.apply(ab,ai)}else{if(U.nodeType===1){for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&(ai[aa]===true||ai[aa].nodeType===1&&K(U,ai[aa]))){ab.push(af[aa])}}}else{for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&ai[aa].nodeType===1){ab.push(af[aa])}}}}}else{E(ai,ab)}if(V){F(V,U,ab,ac);if(G){hasDuplicate=false;ab.sort(G);if(hasDuplicate){for(var aa=1;aa":function(Z,U,aa){var X=typeof U==="string";if(X&&!/\W/.test(U)){U=aa?U:U.toUpperCase();for(var V=0,T=Z.length;V=0)){if(!V){T.push(Y)}}else{if(V){U[X]=false}}}}return false},ID:function(T){return T[1].replace(/\\/g,"")},TAG:function(U,T){for(var V=0;T[V]===false;V++){}return T[V]&&Q(T[V])?U[1]:U[1].toUpperCase()},CHILD:function(T){if(T[1]=="nth"){var U=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2]=="even"&&"2n"||T[2]=="odd"&&"2n+1"||!/\D/.test(T[2])&&"0n+"+T[2]||T[2]);T[2]=(U[1]+(U[2]||1))-0;T[3]=U[3]-0}T[0]=L++;return T},ATTR:function(X,U,V,T,Y,Z){var W=X[1].replace(/\\/g,"");if(!Z&&I.attrMap[W]){X[1]=I.attrMap[W]}if(X[2]==="~="){X[4]=" "+X[4]+" "}return X},PSEUDO:function(X,U,V,T,Y){if(X[1]==="not"){if(X[3].match(R).length>1||/^\w/.test(X[3])){X[3]=F(X[3],null,null,U)}else{var W=F.filter(X[3],U,V,true^Y);if(!V){T.push.apply(T,W)}return false}}else{if(I.match.POS.test(X[0])||I.match.CHILD.test(X[0])){return true}}return X},POS:function(T){T.unshift(true);return T}},filters:{enabled:function(T){return T.disabled===false&&T.type!=="hidden"},disabled:function(T){return T.disabled===true},checked:function(T){return T.checked===true},selected:function(T){T.parentNode.selectedIndex;return T.selected===true},parent:function(T){return !!T.firstChild},empty:function(T){return !T.firstChild},has:function(V,U,T){return !!F(T[3],V).length},header:function(T){return/h\d/i.test(T.nodeName)},text:function(T){return"text"===T.type},radio:function(T){return"radio"===T.type},checkbox:function(T){return"checkbox"===T.type},file:function(T){return"file"===T.type},password:function(T){return"password"===T.type},submit:function(T){return"submit"===T.type},image:function(T){return"image"===T.type},reset:function(T){return"reset"===T.type},button:function(T){return"button"===T.type||T.nodeName.toUpperCase()==="BUTTON"},input:function(T){return/input|select|textarea|button/i.test(T.nodeName)}},setFilters:{first:function(U,T){return T===0},last:function(V,U,T,W){return U===W.length-1},even:function(U,T){return T%2===0},odd:function(U,T){return T%2===1},lt:function(V,U,T){return UT[3]-0},nth:function(V,U,T){return T[3]-0==U},eq:function(V,U,T){return T[3]-0==U}},filter:{PSEUDO:function(Z,V,W,aa){var U=V[1],X=I.filters[U];if(X){return X(Z,W,V,aa)}else{if(U==="contains"){return(Z.textContent||Z.innerText||"").indexOf(V[3])>=0}else{if(U==="not"){var Y=V[3];for(var W=0,T=Y.length;W=0)}}},ID:function(U,T){return U.nodeType===1&&U.getAttribute("id")===T},TAG:function(U,T){return(T==="*"&&U.nodeType===1)||U.nodeName===T},CLASS:function(U,T){return(" "+(U.className||U.getAttribute("class"))+" ").indexOf(T)>-1},ATTR:function(Y,W){var V=W[1],T=I.attrHandle[V]?I.attrHandle[V](Y):Y[V]!=null?Y[V]:Y.getAttribute(V),Z=T+"",X=W[2],U=W[4];return T==null?X==="!=":X==="="?Z===U:X==="*="?Z.indexOf(U)>=0:X==="~="?(" "+Z+" ").indexOf(U)>=0:!U?Z&&T!==false:X==="!="?Z!=U:X==="^="?Z.indexOf(U)===0:X==="$="?Z.substr(Z.length-U.length)===U:X==="|="?Z===U||Z.substr(0,U.length+1)===U+"-":false},POS:function(X,U,V,Y){var T=U[2],W=I.setFilters[T];if(W){return W(X,V,U,Y)}}}};var M=I.match.POS;for(var O in I.match){I.match[O]=RegExp(I.match[O].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(U,T){U=Array.prototype.slice.call(U);if(T){T.push.apply(T,U);return T}return U};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(N){E=function(X,W){var U=W||[];if(H.call(X)==="[object Array]"){Array.prototype.push.apply(U,X)}else{if(typeof X.length==="number"){for(var V=0,T=X.length;V";var T=document.documentElement;T.insertBefore(U,T.firstChild);if(!!document.getElementById(V)){I.find.ID=function(X,Y,Z){if(typeof Y.getElementById!=="undefined"&&!Z){var W=Y.getElementById(X[1]);return W?W.id===X[1]||typeof W.getAttributeNode!=="undefined"&&W.getAttributeNode("id").nodeValue===X[1]?[W]:g:[]}};I.filter.ID=function(Y,W){var X=typeof Y.getAttributeNode!=="undefined"&&Y.getAttributeNode("id");return Y.nodeType===1&&X&&X.nodeValue===W}}T.removeChild(U)})();(function(){var T=document.createElement("div");T.appendChild(document.createComment(""));if(T.getElementsByTagName("*").length>0){I.find.TAG=function(U,Y){var X=Y.getElementsByTagName(U[1]);if(U[1]==="*"){var W=[];for(var V=0;X[V];V++){if(X[V].nodeType===1){W.push(X[V])}}X=W}return X}}T.innerHTML="";if(T.firstChild&&typeof T.firstChild.getAttribute!=="undefined"&&T.firstChild.getAttribute("href")!=="#"){I.attrHandle.href=function(U){return U.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var T=F,U=document.createElement("div");U.innerHTML="

    ";if(U.querySelectorAll&&U.querySelectorAll(".TEST").length===0){return}F=function(Y,X,V,W){X=X||document;if(!W&&X.nodeType===9&&!Q(X)){try{return E(X.querySelectorAll(Y),V)}catch(Z){}}return T(Y,X,V,W)};F.find=T.find;F.filter=T.filter;F.selectors=T.selectors;F.matches=T.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var T=document.createElement("div");T.innerHTML="
    ";if(T.getElementsByClassName("e").length===0){return}T.lastChild.className="e";if(T.getElementsByClassName("e").length===1){return}I.order.splice(1,0,"CLASS");I.find.CLASS=function(U,V,W){if(typeof V.getElementsByClassName!=="undefined"&&!W){return V.getElementsByClassName(U[1])}}})()}function P(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W0){X=T;break}}}T=T[U]}ad[W]=X}}}var K=document.compareDocumentPosition?function(U,T){return U.compareDocumentPosition(T)&16}:function(U,T){return U!==T&&(U.contains?U.contains(T):true)};var Q=function(T){return T.nodeType===9&&T.documentElement.nodeName!=="HTML"||!!T.ownerDocument&&Q(T.ownerDocument)};var J=function(T,aa){var W=[],X="",Y,V=aa.nodeType?[aa]:aa;while((Y=I.match.PSEUDO.exec(T))){X+=Y[0];T=T.replace(I.match.PSEUDO,"")}T=I.relative[T]?T+"*":T;for(var Z=0,U=V.length;Z0||T.offsetHeight>0};F.selectors.filters.animated=function(T){return o.grep(o.timers,function(U){return T===U.elem}).length};o.multiFilter=function(V,T,U){if(U){V=":not("+V+")"}return F.matches(V,T)};o.dir=function(V,U){var T=[],W=V[U];while(W&&W!=document){if(W.nodeType==1){T.push(W)}W=W[U]}return T};o.nth=function(X,T,V,W){T=T||1;var U=0;for(;X;X=X[V]){if(X.nodeType==1&&++U==T){break}}return X};o.sibling=function(V,U){var T=[];for(;V;V=V.nextSibling){if(V.nodeType==1&&V!=U){T.push(V)}}return T};return;l.Sizzle=F})();o.event={add:function(I,F,H,K){if(I.nodeType==3||I.nodeType==8){return}if(I.setInterval&&I!=l){I=l}if(!H.guid){H.guid=this.guid++}if(K!==g){var G=H;H=this.proxy(G);H.data=K}var E=o.data(I,"events")||o.data(I,"events",{}),J=o.data(I,"handle")||o.data(I,"handle",function(){return typeof o!=="undefined"&&!o.event.triggered?o.event.handle.apply(arguments.callee.elem,arguments):g});J.elem=I;o.each(F.split(/\s+/),function(M,N){var O=N.split(".");N=O.shift();H.type=O.slice().sort().join(".");var L=E[N];if(o.event.specialAll[N]){o.event.specialAll[N].setup.call(I,K,O)}if(!L){L=E[N]={};if(!o.event.special[N]||o.event.special[N].setup.call(I,K,O)===false){if(I.addEventListener){I.addEventListener(N,J,false)}else{if(I.attachEvent){I.attachEvent("on"+N,J)}}}}L[H.guid]=H;o.event.global[N]=true});I=null},guid:1,global:{},remove:function(K,H,J){if(K.nodeType==3||K.nodeType==8){return}var G=o.data(K,"events"),F,E;if(G){if(H===g||(typeof H==="string"&&H.charAt(0)==".")){for(var I in G){this.remove(K,I+(H||""))}}else{if(H.type){J=H.handler;H=H.type}o.each(H.split(/\s+/),function(M,O){var Q=O.split(".");O=Q.shift();var N=RegExp("(^|\\.)"+Q.slice().sort().join(".*\\.")+"(\\.|$)");if(G[O]){if(J){delete G[O][J.guid]}else{for(var P in G[O]){if(N.test(G[O][P].type)){delete G[O][P]}}}if(o.event.specialAll[O]){o.event.specialAll[O].teardown.call(K,Q)}for(F in G[O]){break}if(!F){if(!o.event.special[O]||o.event.special[O].teardown.call(K,Q)===false){if(K.removeEventListener){K.removeEventListener(O,o.data(K,"handle"),false)}else{if(K.detachEvent){K.detachEvent("on"+O,o.data(K,"handle"))}}}F=null;delete G[O]}}})}for(F in G){break}if(!F){var L=o.data(K,"handle");if(L){L.elem=null}o.removeData(K,"events");o.removeData(K,"handle")}}},trigger:function(I,K,H,E){var G=I.type||I;if(!E){I=typeof I==="object"?I[h]?I:o.extend(o.Event(G),I):o.Event(G);if(G.indexOf("!")>=0) -{I.type=G=G.slice(0,-1);I.exclusive=true}if(!H){I.stopPropagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&&this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.nodeType==3||H.nodeType==8){return g}I.result=g;I.target=H;K=o.makeArray(K);K.unshift(I)}I.currentTarget=H;var J=o.data(H,"handle");if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,"a")&&G=="click"))&&H["on"+G]&&H["on"+G].apply(H,K)===false){I.result=false}if(!E&&H[G]&&!I.isDefaultPrevented()&&!(o.nodeName(H,"a")&&G=="click")){this.triggered=true;try{H[G]()}catch(L){}}this.triggered=false;if(!I.isPropagationStopped()){var F=H.parentNode||H.ownerDocument;if(F){o.event.trigger(I,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=o.event.fix(K||l.event);K.currentTarget=this;var L=K.type.split(".");K.type=L.shift();J=!L.length&&!K.exclusive;var I=RegExp("(^|\\.)"+L.slice().sort().join(".*\\.")+"(\\.|$)");E=(o.data(this,"events")||{})[K.type];for(var G in E){var H=E[G];if(J||I.test(H.type)){K.handler=H;K.data=H.data;var F=H.apply(this,arguments);if(F!==g){K.result=F;if(F===false){K.preventDefault();K.stopPropagation()}}if(K.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(H){if(H[h]){return H}var F=H;H=o.Event(F);for(var G=this.props.length,J;G;){J=this.props[--G];H[J]=F[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&&H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&&H.clientX!=null){var I=document.documentElement,E=document.body;H.pageX=H.clientX+(I&&I.scrollLeft||E&&E.scrollLeft||0)-(I.clientLeft||0);H.pageY=H.clientY+(I&&I.scrollTop||E&&E.scrollTop||0)-(I.clientTop||0)}if(!H.which&&((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&&H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&&H.button){H.which=(H.button&1?1:(H.button&2?3:(H.button&4?2:0)))}return H},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)};E.guid=F.guid=F.guid||E.guid||this.guid++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function(G){if(G.length){var E=0,F=RegExp("(^|\\.)"+G[0]+"(\\.|$)");o.each((o.data(this,"events").live||{}),function(){if(F.test(this.type)){E++}});if(E<1){o.event.remove(this,G[0],c)}}}}}};o.Event=function(E){if(!this.preventDefault){return new o.Event(E)}if(E&&E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=e();this[h]=true};function k(){return false}function u(){return true}o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=u;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=u;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(F){var E=F.relatedTarget;while(E&&E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){o.event.special[E]={setup:function(){o.event.add(this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.extend({bind:function(F,G,E){return F=="unload"?this.one(F,G,E):this.each(function(){o.event.add(this,F,E||G,E&&G)})},one:function(G,H,F){var E=o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F||H).apply(this,arguments)});return this.each(function(){o.event.add(this,G,E,F&&H)})},unbind:function(F,E){return this.each(function(){o.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=o.Event(E);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F=0){var E=G.slice(I,G.length);G=G.slice(0,I)}var H="GET";if(J){if(o.isFunction(J)){K=J;J=null}else{if(typeof J==="object"){J=o.param(J);H="POST"}}}var F=this;o.ajax({url:G,type:H,dataType:"html",data:J,complete:function(M,L){if(L=="success"||L=="notmodified"){F.html(E?o("
    ").append(M.responseText.replace(//g,"")).find(E):M.responseText)}if(K){F.each(K,[M.responseText,L,M])}}});return this},serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(E,F){var G=o(this).val();return G==null?null:o.isArray(G)?o.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(E,F){o.fn[F]=function(G){return this.bind(F,G)}});var r=e();o.extend({get:function(E,G,H,F){if(o.isFunction(G)){H=G;G=null}return o.ajax({type:"GET",url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return o.get(E,null,F,"script")},getJSON:function(E,F,G){return o.get(E,F,G,"json")},post:function(E,G,H,F){if(o.isFunction(G)){H=G;G={}}return o.ajax({type:"POST",url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){o.extend(o.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(M){M=o.extend(true,M,o.extend(true,{},o.ajaxSettings,M));var W,F=/=\?(&|$)/g,R,V,G=M.type.toUpperCase();if(M.data&&M.processData&&typeof M.data!=="string"){M.data=o.param(M.data)}if(M.dataType=="jsonp"){if(G=="GET"){if(!M.url.match(F)){M.url+=(M.url.match(/\?/)?"&":"?")+(M.jsonp||"callback")+"=?"}}else{if(!M.data||!M.data.match(F)){M.data=(M.data?M.data+"&":"")+(M.jsonp||"callback")+"=?"}}M.dataType="json"}if(M.dataType=="json"&&(M.data&&M.data.match(F)||M.url.match(F))){W="jsonp"+r++;if(M.data){M.data=(M.data+"").replace(F,"="+W+"$1")}M.url=M.url.replace(F,"="+W+"$1");M.dataType="script";l[W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}}if(M.dataType=="script"&&M.cache==null){M.cache=false}if(M.cache===false&&G=="GET"){var E=e();var U=M.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+E+"$2");M.url=U+((U==M.url)?(M.url.match(/\?/)?"&":"?")+"_="+E:"")}if(M.data&&G=="GET"){M.url+=(M.url.match(/\?/)?"&":"?")+M.data;M.data=null}if(M.global&&!o.active++){o.event.trigger("ajaxStart")}var Q=/^(\w+:)?\/\/([^\/?#]+)/.exec(M.url);if(M.dataType=="script"&&G=="GET"&&Q&&(Q[1]&&Q[1]!=location.protocol||Q[2]!=location.host)){var H=document.getElementsByTagName("head")[0];var T=document.createElement("script");T.src=M.url;if(M.scriptCharset){T.charset=M.scriptCharset}if(!W){var O=false;T.onload=T.onreadystatechange=function(){if(!O&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){O=true;I();L();T.onload=T.onreadystatechange=null;H.removeChild(T)}}}H.appendChild(T);return g}var K=false;var J=M.xhr();if(M.username){J.open(G,M.url,M.async,M.username,M.password)}else{J.open(G,M.url,M.async)}try{if(M.data){J.setRequestHeader("Content-Type",M.contentType)}if(M.ifModified){J.setRequestHeader("If-Modified-Since",o.lastModified[M.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}J.setRequestHeader("X-Requested-With","XMLHttpRequest");J.setRequestHeader("Accept",M.dataType&&M.accepts[M.dataType]?M.accepts[M.dataType]+", */*":M.accepts._default)}catch(S){}if(M.beforeSend&&M.beforeSend(J,M)===false){if(M.global&&!--o.active){o.event.trigger("ajaxStop")}J.abort();return false}if(M.global){o.event.trigger("ajaxSend",[J,M])}var N=function(X){if(J.readyState==0){if(P){clearInterval(P);P=null;if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}}else{if(!K&&J&&(J.readyState==4||X=="timeout")){K=true;if(P){clearInterval(P);P=null}R=X=="timeout"?"timeout":!o.httpSuccess(J)?"error":M.ifModified&&o.httpNotModified(J,M.url)?"notmodified":"success";if(R=="success"){try{V=o.httpData(J,M.dataType,M)}catch(Z){R="parsererror"}}if(R=="success"){var Y;try{Y=J.getResponseHeader("Last-Modified")}catch(Z){}if(M.ifModified&&Y){o.lastModified[M.url]=Y}if(!W){I()}}else{o.handleError(M,J,R)}L();if(X){J.abort()}if(M.async){J=null}}}};if(M.async){var P=setInterval(N,13);if(M.timeout>0){setTimeout(function(){if(J&&!K){N("timeout")}},M.timeout)}}try{J.send(M.data)}catch(S){o.handleError(M,J,null,S)}if(!M.async){N()}function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger("ajaxSuccess",[J,M])}}function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger("ajaxComplete",[J,M])}if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}return J},handleError:function(F,H,E,G){if(F.error){F.error(H,E,G)}if(F.global){o.event.trigger("ajaxError",[H,F,G])}},active:0,httpSuccess:function(F){try{return !F.status&&location.protocol=="file:"||(F.status>=200&&F.status<300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(G,E){try{var H=G.getResponseHeader("Last-Modified");return G.status==304||H==o.lastModified[E]}catch(F){}return false},httpData:function(J,H,G){var F=J.getResponseHeader("content-type"),E=H=="xml"||!H&&F&&F.indexOf("xml")>=0,I=E?J.responseXML:J.responseText;if(E&&I.documentElement.tagName=="parsererror"){throw"parsererror"}if(G&&G.dataFilter){I=G.dataFilter(I,H)}if(typeof I==="string"){if(H=="script"){o.globalEval(I)}if(H=="json"){I=l["eval"]("("+I+")")}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+"="+encodeURIComponent(J)}if(o.isArray(E)||E.jquery){o.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(o.isArray(E[F])){o.each(E[F],function(){H(F,this)})}else{H(F,o.isFunction(E[F])?E[F]():E[F])}}}return G.join("&").replace(/%20/g,"+")}});var m={},n,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function t(F,E){var G={};o.each(d.concat.apply([],d.slice(0,E)),function() -{G[this]=F});return G}o.fn.extend({show:function(J,L){if(J){return this.animate(t("show",3),J,L)}else{for(var H=0,F=this.length;H").appendTo("body");K=I.css("display");if(K==="none"){K="block"}I.remove();m[G]=K}o.data(this[H],"olddisplay",K)}}for(var H=0,F=this.length;H=0;H--){if(G[H].elem==this){if(E){G[H](true)}G.splice(H,1)}}});if(!E){this.dequeue()}return this}});o.each({slideDown:t("show",1),slideUp:t("hide",1),slideToggle:t("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(E,F){o.fn[E]=function(G,H){return this.animate(F,G,H)}});o.extend({speed:function(G,H,F){var E=typeof G==="object"?G:{complete:F||!F&&H||o.isFunction(G)&&G,duration:G,easing:F&&H||H&&!o.isFunction(H)&&H};E.duration=o.fx.off?0:typeof E.duration==="number"?E.duration:o.fx.speeds[E.duration]||o.fx.speeds._default;E.old=E.complete;E.complete=function(){if(E.queue!==false){o(this).dequeue()}if(o.isFunction(E.old)){E.old.call(this)}};return E},easing:{linear:function(G,H,E,F){return E+F*G},swing:function(G,H,E,F){return((-Math.cos(G*Math.PI)/2)+0.5)*F+E}},timers:[],fx:function(F,E,G){this.options=E;this.elem=F;this.prop=G;if(!E.orig){E.orig={}}}});o.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(o.fx.step[this.prop]||o.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(F){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var E=parseFloat(o.css(this.elem,this.prop,F));return E&&E>-10000?E:parseFloat(o.curCSS(this.elem,this.prop))||0},custom:function(I,H,G){this.startTime=e();this.start=I;this.end=H;this.unit=G||this.unit||"px";this.now=this.start;this.pos=this.state=0;var E=this;function F(J){return E.step(J)}F.elem=this.elem;if(F()&&o.timers.push(F)&&!n){n=setInterval(function(){var K=o.timers;for(var J=0;J=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var F in this.options.curAnim){if(this.options.curAnim[F]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(o.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){o.attr(this.elem.style,I,this.options.orig[I])}}this.options.complete.call(this.elem)}return false}else{var J=G-this.startTime;this.state=J/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?"swing":"linear")](this.state,J,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){o.attr(E.elem.style,"opacity",E.now)},_default:function(E){if(E.elem.style&&E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),J=this[0].ownerDocument,F=J.body,E=J.documentElement,L=E.clientTop||F.clientTop||0,K=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||o.boxModel&&E.scrollTop||F.scrollTop)-L,H=G.left+(self.pageXOffset||o.boxModel&&E.scrollLeft||F.scrollLeft)-K;return{top:I,left:H}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.offset.initialized||o.offset.initialize();var J=this[0],G=J.offsetParent,F=J,O=J.ownerDocument,M,H=O.documentElement,K=O.body,L=O.defaultView,E=L.getComputedStyle(J,null),N=J.offsetTop,I=J.offsetLeft;while((J=J.parentNode)&&J!==K&&J!==H){M=L.getComputedStyle(J,null);N-=J.scrollTop,I-=J.scrollLeft;if(J===G){N+=J.offsetTop,I+=J.offsetLeft;if(o.offset.doesNotAddBorder&&!(o.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(J.tagName))){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}F=G,G=J.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&&M.overflow!=="visible"){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}E=M}if(E.position==="relative"||E.position==="static"){N+=K.offsetTop,I+=K.offsetLeft}if(E.position==="fixed"){N+=Math.max(H.scrollTop,K.scrollTop),I+=Math.max(H.scrollLeft,K.scrollLeft)}return{top:N,left:I}}}o.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElement("div"),H,G,N,I,M,E,J=L.style.marginTop,K='
    ';M={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(E in M){F.style[E]=M[E]}F.innerHTML=K;L.insertBefore(F,L.firstChild);H=F.firstChild,G=H.firstChild,I=H.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(G.offsetTop!==5);this.doesAddBorderForTableAndCells=(I.offsetTop===5);H.style.overflow="hidden",H.style.position="relative";this.subtractsBorderForOverflowNotVisible=(G.offsetTop===-5);L.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=J;L.removeChild(F);this.initialized=true},bodyOffset:function(E){o.offset.initialized||o.offset.initialize();var G=E.offsetTop,F=E.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(o.curCSS(E,"marginTop",true),10)||0,F+=parseInt(o.curCSS(E,"marginLeft",true),10)||0}return{top:G,left:F}}};o.fn.extend({position:function(){var I=0,H=0,F;if(this[0]){var G=this.offsetParent(),J=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();J.top-=j(this,"marginTop");J.left-=j(this,"marginLeft");E.top+=j(G,"borderTopWidth");E.left+=j(G,"borderLeftWidth");F={top:J.top-E.top,left:J.left-E.left}}return F},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&&(!/^body|html$/i.test(E.tagName)&&o.css(E,"position")=="static")){E=E.offsetParent}return o(E)}});o.each(["Left","Top"],function(F,E){var G="scroll"+E;o.fn[G]=function(H){if(!this[0]){return null}return H!==g?this.each(function(){this==l||this==document?l.scrollTo(!F?H:o(l).scrollLeft(),F?H:o(l).scrollTop()):this[G]=H}):this[0]==l||this[0]==document?self[F?"pageYOffset":"pageXOffset"]||o.boxModel&&document.documentElement[G]||document.body[G]:this[0][G]}});o.each(["Height","Width"],function(I,G){var E=I?"Left":"Top",H=I?"Right":"Bottom",F=G.toLowerCase();o.fn["inner"+G]=function(){return this[0]?o.css(this[0],F,false,"padding"):null};o.fn["outer"+G]=function(K){return this[0]?o.css(this[0],F,false,K?"margin":"border"):null};var J=G.toLowerCase();o.fn[J]=function(K){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+G]||document.body["client"+G]:this[0]==document?Math.max(document.documentElement["client"+G],document.body["scroll"+G],document.documentElement["scroll"+G],document.body["offset"+G],document.documentElement["offset"+G]):K===g?(this.length?o.css(this[0],J):null):this.css(J,typeof K==="string"?K:K+"px")}})})(); - -/* - * jQuery hashchange event - v1.3 - 7/21/2010 - * http://benalman.com/projects/jquery-hashchange-plugin/ - * - * Copyright (c) 2010 "Cowboy" Ben Alman - * Dual licensed under the MIT and GPL licenses. - * http://benalman.com/about/license/ - */ -(function($,e,b){var c="hashchange",h=document,f,g=$.event.special,i=h.documentMode,d="on"+c in e&&(i===b||i>7);function a(j){j=j||location.href;return"#"+j.replace(/^[^#]*#?(.*)$/,"$1")}$.fn[c]=function(j){return j?this.bind(c,j):this.trigger(c)};$.fn[c].delay=50;g[c]=$.extend(g[c],{setup:function(){if(d){return false}$(f.start)},teardown:function(){if(d){return false}$(f.stop)}});f=(function(){var j={},p,m=a(),k=function(q){return q},l=k,o=k;j.start=function(){p||n()};j.stop=function(){p&&clearTimeout(p);p=b};function n(){var r=a(),q=o(m);if(r!==m){l(m=r,q);$(e).trigger(c)}else{if(q!==m){location.href=location.href.replace(/#.*/,"")+q}}p=setTimeout(n,$.fn[c].delay)}$.browser.msie&&!d&&(function(){var q,r;j.start=function(){if(!q){r=$.fn[c].src;r=r&&r+a();q=$('
    - +
    Classes | @@ -103,102 +92,109 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');

    The zen::Xml namespace. More...

    - + + + + + + - +

    +

    Classes

    class  XmlOut
     Proxy class to conveniently convert user data into XML structure. More...
     
    class  XmlIn
     Proxy class to conveniently convert XML structure to user data. More...
     
    class  XmlElement
     An XML element. More...
     
    class  XmlDoc
     The complete XML document. More...
     
    struct  XmlError
     Exception base class for zen::Xml. More...
     
    struct  XmlFileError
     Exception thrown due to failed file I/O. More...
     
    struct  XmlParsingError
     Exception thrown due to an XML parsing error. More...

    +

     
    + - - - + + + + - + + - + + - + + - + + - + + - + + - + + - - - + + + + +

    Functions

    template<class String >
    void load (const String &filename, XmlDoc &doc)
     Load XML document from a file.
    template<class String >
    XmlDoc load (const String &filename)
     Load XML document from a file. More...
     
    template<class String >
    void save (const XmlDoc &doc, const String &filename, const std::string &lineBreak="\r\n", const std::string &indent=" ")
     Save XML document to a file.
     Save XML document to a file. More...
     
    template<class T >
    bool readStruc (const XmlElement &input, T &value)
     Convert XML element to structured user data.
     Convert XML element to structured user data. More...
     
    template<class T >
    void writeStruc (const T &value, XmlElement &output)
     Convert structured user data into an XML element.
     Convert structured user data into an XML element. More...
     
    template<class T >
    bool readText (const std::string &input, T &value)
     Convert text to user data - used by XML elements and attributes.
     Convert text to user data - used by XML elements and attributes. More...
     
    template<class T >
    void writeText (const T &value, std::string &output)
     Convert user data into text - used by XML elements and attributes.
     Convert user data into text - used by XML elements and attributes. More...
     
    template<class String >
    void saveStream (const std::string &stream, const String &filename)
     Save byte stream to a file.
     Save byte stream to a file. More...
     
    template<class String >
    std::string loadStream (const String &filename)
     Load byte stream from a file.
     Load byte stream from a file. More...
     
    std::string serialize (const XmlDoc &doc, const std::string &lineBreak="\r\n", const std::string &indent=" ")
     Save XML document as a byte stream.
    void parse (const std::string &stream, XmlDoc &doc)
     Load XML document from a byte stream.
     Save XML document as a byte stream. More...
     
    XmlDoc parse (const std::string &stream)
     Load XML document from a byte stream. More...
     
    -

    Detailed Description

    +

    Detailed Description

    The zen::Xml namespace.

    -

    Function Documentation

    - +

    Function Documentation

    +
    template<class String >
    - + - - - - - - - - - + - -
    void zen::load XmlDoc zen::load ( const String & filename,
    XmlDoc & doc 
    filename) )
    -
    -
    +

    Load XML document from a file.

    -

    Convenience function that does nothing more than calling loadStream() and parse().

    -
    Template Parameters:
    - +

    Convenience function that does nothing more than calling loadStream() and parse().

    +
    Template Parameters
    +
    StringArbitrary string-like type: e.g. std::string, wchar_t*, char[], wchar_t, wxString, MyStringClass, ...
    -
    Parameters:
    +
    Parameters
    -
    filenameInput file name
    docThe XML document to load
    -
    Exceptions:
    +
    Returns
    The loaded XML document
    +
    Exceptions
    - - + +
    XmlFileError
    XmlParsingError
    XmlFileError
    XmlParsingError
    @@ -212,75 +208,63 @@ template<class String >
    template<class String >
    - +
    std::string zen::loadStream std::string zen::loadStream ( const String &  filename)
    -
    -
    +

    Load byte stream from a file.

    -
    Template Parameters:
    - +
    Template Parameters
    +
    StringArbitrary string-like type: e.g. std::string, wchar_t*, char[], wchar_t, wxString, MyStringClass, ...
    -
    Parameters:
    +
    Parameters
    filenameInput file name
    -
    Returns:
    Output byte stream
    -
    Exceptions:
    +
    Returns
    Output byte stream
    +
    Exceptions
    - +
    XmlFileError
    XmlFileError
    - +
    - + - - - - + - - - - - - -
    void zen::parse XmlDoc zen::parse ( const std::string & stream,
    stream) XmlDoc & doc 
    )
    -
    -
    +

    Load XML document from a byte stream.

    -
    Parameters:
    +
    Parameters
    -
    streamInput byte stream
    docOutput XML document
    -
    Exceptions:
    +
    Returns
    Output XML document
    +
    Exceptions
    - +
    XmlParsingError
    XmlParsingError
    @@ -294,7 +278,7 @@ template<class String >
    template<class T >
    - + @@ -311,18 +295,17 @@ template<class T >
    bool zen::readStruc bool zen::readStruc ( const XmlElement &  input,
    - -
    +

    Convert XML element to structured user data.

    -
    Parameters:
    +
    Parameters
    inputThe input XML element.
    valueConversion target value.
    -
    Returns:
    "true" if value was read successfully.
    +
    Returns
    "true" if value was read successfully.
    @@ -333,7 +316,7 @@ template<class T > template<class T > - + @@ -350,18 +333,17 @@ template<class T >
    bool zen::readText bool zen::readText ( const std::string &  input,
    - -
    +

    Convert text to user data - used by XML elements and attributes.

    -
    Parameters:
    +
    Parameters
    inputInput text.
    valueConversion target value.
    -
    Returns:
    "true" if value was read successfully.
    +
    Returns
    "true" if value was read successfully.
    @@ -372,7 +354,7 @@ template<class T > template<class String > - + @@ -401,18 +383,17 @@ template<class String >
    void zen::save void zen::save ( const XmlDoc &  doc,
    - -
    +

    Save XML document to a file.

    -

    Convenience function that does nothing more than calling serialize() and saveStream().

    -
    Template Parameters:
    - +

    Convenience function that does nothing more than calling serialize() and saveStream().

    +
    Template Parameters
    +
    StringArbitrary string-like type: e.g. std::string, wchar_t*, char[], wchar_t, wxString, MyStringClass, ...
    -
    Parameters:
    +
    Parameters
    @@ -421,9 +402,9 @@ template<class String >
    docThe XML document to save
    filenameOutput file name
    -
    Exceptions:
    +
    Exceptions
    - +
    XmlFileError
    XmlFileError
    @@ -437,7 +418,7 @@ template<class String >
    template<class String > - + @@ -454,26 +435,25 @@ template<class String >
    void zen::saveStream void zen::saveStream ( const std::string &  stream,
    - -
    +

    Save byte stream to a file.

    -
    Template Parameters:
    - +
    Template Parameters
    +
    StringArbitrary string-like type: e.g. std::string, wchar_t*, char[], wchar_t, wxString, MyStringClass, ...
    -
    Parameters:
    +
    Parameters
    streamInput byte stream
    filenameOutput file name
    -
    Exceptions:
    +
    Exceptions
    - +
    XmlFileError
    XmlFileError
    @@ -485,7 +465,7 @@ template<class String >
    - + @@ -508,11 +488,10 @@ template<class String >
    std::string zen::serialize std::string zen::serialize ( const XmlDoc &  doc,
    -
    -
    +

    Save XML document as a byte stream.

    -
    Parameters:
    +
    Parameters
    @@ -520,7 +499,7 @@ template<class String >
    docInput XML document
    lineBreakLine break, default: carriage return + new line
    -
    Returns:
    Output byte stream
    +
    Returns
    Output byte stream
    @@ -531,7 +510,7 @@ template<class String > template<class T > - + @@ -548,11 +527,10 @@ template<class T >
    void zen::writeStruc void zen::writeStruc ( const T &  value,
    - -
    +

    Convert structured user data into an XML element.

    -
    Parameters:
    +
    Parameters
    @@ -569,7 +547,7 @@ template<class T > template<class T >
    valueThe value to be converted.
    outputThe output XML element.
    - + @@ -586,11 +564,10 @@ template<class T >
    void zen::writeText void zen::writeText ( const T &  value,
    -
    -
    +

    Convert user data into text - used by XML elements and attributes.

    -
    Parameters:
    +
    Parameters
    @@ -601,13 +578,11 @@ template<class T > - - + - diff --git a/zenxml/doc/nav_f.png b/zenxml/doc/nav_f.png index 1b07a162..72a58a52 100644 Binary files a/zenxml/doc/nav_f.png and b/zenxml/doc/nav_f.png differ diff --git a/zenxml/doc/nav_h.png b/zenxml/doc/nav_h.png index 01f5fa6a..33389b10 100644 Binary files a/zenxml/doc/nav_h.png and b/zenxml/doc/nav_h.png differ diff --git a/zenxml/doc/open.png b/zenxml/doc/open.png index 7b35d2c2..30f75c7e 100644 Binary files a/zenxml/doc/open.png and b/zenxml/doc/open.png differ diff --git a/zenxml/doc/parser_8h_source.html b/zenxml/doc/parser_8h_source.html index 97bdc7e3..d049c188 100644 --- a/zenxml/doc/parser_8h_source.html +++ b/zenxml/doc/parser_8h_source.html @@ -3,46 +3,36 @@ +zen::Xml: parser.h Source File - - - - + + - + -
    - - +
    valueThe value to be converted.
    outputOutput text.
    - - - - - -
    zen::Xml -
    Simple C++ XML Processing
    - - + + @@ -51,7 +41,6 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • Main Page
  • Namespaces
  • Classes
  • -
  • Files
  • @@ -70,18 +59,12 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • - - + All Classes Namespaces Functions Variables Pages
    @@ -90,598 +73,628 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    + +
    parser.h
    -
    00001 // **************************************************************************
    -00002 // * This file is part of the zen::Xml project. It is distributed under the *
    -00003 // * Boost Software License: http://www.boost.org/LICENSE_1_0.txt           *
    -00004 // * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved        *
    -00005 // **************************************************************************
    -00006 
    -00007 #ifndef ZEN_XML_PARSER_HEADER_81248670213764583021432
    -00008 #define ZEN_XML_PARSER_HEADER_81248670213764583021432
    -00009 
    -00010 #include <cstdio>
    -00011 #include <cstddef> //ptrdiff_t; req. on Linux
    -00012 #include <zen/string_traits.h>
    -00013 #include "dom.h"
    -00014 #include "error.h"
    -00015 
    -00016 namespace zen
    -00017 {
    -00023 
    -00024 
    -00030 std::string serialize(const XmlDoc& doc,
    -00031                       const std::string& lineBreak = "\r\n",
    -00032                       const std::string& indent = "    "); //throw ()
    -00033 
    -00035 struct XmlParsingError : public XmlError
    -00036 {
    -00037     XmlParsingError(size_t rowNo, size_t colNo) : row(rowNo), col(colNo) {}
    -00039     size_t row; //beginning with 0
    -00041     size_t col; //
    -00042 };
    -00043 
    -00044 
    -00046 
    -00051 void parse(const std::string& stream, XmlDoc& doc); //throw XmlParsingError
    -00052 
    -00053 
    -00054 
    -00055 
    -00056 
    -00057 
    -00058 
    -00059 
    -00060 
    -00061 
    -00062 
    -00063 
    -00064 
    -00065 
    -00066 
    -00067 
    -00068 
    -00069 
    -00070 
    -00071 
    -00072 //---------------------------- implementation ----------------------------
    -00073 //see: http://www.w3.org/TR/xml/
    -00074 
    -00075 namespace implementation
    -00076 {
    -00077 inline
    -00078 std::pair<char, char> hexify(unsigned char c)
    -00079 {
    -00080     auto hexifyDigit = [](int num) -> char //input [0, 15], output 0-9, A-F
    -00081     {
    -00082         assert(0 <= num&&  num <= 15); //guaranteed by design below!
    -00083         return static_cast<char>(num <= 9 ? //no signed/unsigned char problem here!
    -00084         '0' + num :
    -00085         'A' + (num - 10));
    -00086     };
    -00087     return std::make_pair(hexifyDigit(c / 16), hexifyDigit(c % 16));
    -00088 }
    -00089 
    -00090 
    -00091 inline
    -00092 char unhexify(char high, char low)
    -00093 {
    -00094     auto unhexifyDigit = [](char hex) -> int //input 0-9, a-f, A-F; output range: [0, 15]
    -00095     {
    -00096         if ('0' <= hex && hex <= '9') //no signed/unsigned char problem here!
    -00097             return hex - '0';
    -00098         else if ('A' <= hex && hex <= 'F')
    -00099             return (hex - 'A') + 10;
    -00100         else if ('a' <= hex && hex <= 'f')
    -00101             return (hex - 'a') + 10;
    -00102         assert(false);
    -00103         return 0;
    -00104     };
    -00105     return static_cast<unsigned char>(16 * unhexifyDigit(high) + unhexifyDigit(low)); //[!] convert to unsigned char first, then to char (which may be signed)
    -00106 };
    -00107 
    -00108 
    -00109 template <class Predicate> inline
    -00110 std::string normalize(const std::string& str, Predicate pred) //pred: unary function taking a char, return true if value shall be encoded as hex
    -00111 {
    -00112     std::string output;
    -00113     std::for_each(str.begin(), str.end(),
    -00114                   [&](char c)
    -00115     {
    -00116         if (c == '&')      //
    -00117             output += "&amp;";
    -00118         else if (c == '<') //normalization mandatory: http://www.w3.org/TR/xml/#syntax
    -00119             output += "&lt;";
    -00120         else if (c == '>') //
    -00121             output += "&gt;";
    -00122         else if (pred(c))
    -00123         {
    -00124             if (c == '\'')
    -00125                 output += "&apos;";
    -00126             else if (c == '\"')
    -00127                 output += "&quot;";
    -00128             else
    -00129             {
    -00130                 output += "&#x";
    -00131                 const auto hexDigits = hexify(c); //hexify beats "printNumber<std::string>("&#x%02X;", c)" by a nice factor of 3!
    -00132                 output += hexDigits.first;
    -00133                 output += hexDigits.second;
    -00134                 output += ';';
    -00135             }
    -00136         }
    -00137         else
    -00138             output += c;
    -00139     });
    -00140     return output;
    -00141 }
    -00142 
    -00143 inline
    -00144 std::string normalizeName(const std::string& str)
    -00145 {
    -00146     return normalize(str, [](char c) { return isWhiteSpace(c) || c == '=' || c == '/' || c == '\'' || c == '\"'; });
    -00147 }
    -00148 
    -00149 inline
    -00150 std::string normalizeElementValue(const std::string& str)
    -00151 {
    -00152     return normalize(str, [](char c) { return static_cast<unsigned char>(c) < 32; });
    -00153 }
    -00154 
    -00155 inline
    -00156 std::string normalizeAttribValue(const std::string& str)
    -00157 {
    -00158     return normalize(str, [](char c) { return static_cast<unsigned char>(c) < 32 || c == '\'' || c == '\"'; });
    -00159 }
    -00160 
    -00161 
    -00162 template <class CharIterator, size_t N> inline
    -00163 bool checkEntity(CharIterator& first, CharIterator last, const char (&placeholder)[N])
    -00164 {
    -00165     assert(placeholder[N - 1] == 0);
    -00166     const ptrdiff_t strLen = N - 1; //don't count null-terminator
    -00167     if (last - first >= strLen && std::equal(first, first + strLen, placeholder))
    -00168     {
    -00169         first += strLen - 1;
    -00170         return true;
    -00171     }
    -00172     return false;
    -00173 }
    -00174 
    -00175 
    -00176 namespace
    -00177 {
    -00178 std::string denormalize(const std::string& str)
    -00179 {
    -00180     std::string output;
    -00181     for (auto it = str.begin(); it != str.end(); ++it)
    -00182     {
    -00183         const char c = *it;
    -00184 
    -00185         if (c == '&')
    -00186         {
    -00187             if (checkEntity(it, str.end(), "&amp;"))
    -00188                 output += '&';
    -00189             else if (checkEntity(it, str.end(), "&lt;"))
    -00190                 output += '<';
    -00191             else if (checkEntity(it, str.end(), "&gt;"))
    -00192                 output += '>';
    -00193             else if (checkEntity(it, str.end(), "&apos;"))
    -00194                 output += '\'';
    -00195             else if (checkEntity(it, str.end(), "&quot;"))
    -00196                 output += '\"';
    -00197             else if (str.end() - it >= 6 &&
    -00198                      it[1] == '#' &&
    -00199                      it[2] == 'x' &&
    -00200                      it[5] == ';')
    -00201             {
    -00202                 output += unhexify(it[3], it[4]); //unhexify beats "::sscanf(&it[3], "%02X", &tmp)" by a factor of 3000 for ~250000 calls!!!
    -00203                 it += 5;
    -00204             }
    -00205             else
    -00206                 output += c; //unexpected char!
    -00207         }
    -00208         else if (c == '\r') //map all end-of-line characters to \n http://www.w3.org/TR/xml/#sec-line-ends
    -00209         {
    -00210             auto itNext = it + 1;
    -00211             if (itNext != str.end() && *itNext == '\n')
    -00212                 ++it;
    -00213             output += '\n';
    -00214         }
    -00215         else
    -00216             output += c;
    -00217     };
    -00218     return output;
    -00219 }
    -00220 
    -00221 
    -00222 void serialize(const XmlElement& element, std::string& stream,
    -00223                const std::string& lineBreak,
    -00224                const std::string& indent,
    -00225                size_t indentLevel)
    -00226 {
    -00227     const std::string& nameFmt = normalizeName(element.getNameAs<std::string>());
    -00228 
    -00229     for (size_t i = 0; i < indentLevel; ++i)
    -00230         stream += indent;
    -00231 
    -00232     stream += '<' + nameFmt;
    -00233 
    -00234     auto attr = element.getAttributes();
    -00235     for (auto it = attr.first; it != attr.second; ++it)
    -00236         stream += ' ' + normalizeName(it->first) + "=\"" + normalizeAttribValue(it->second) + '\"';
    -00237 
    -00238     //no support for mixed-mode content
    -00239     auto iterPair = element.getChildren();
    -00240     if (iterPair.first != iterPair.second) //structured element
    -00241     {
    -00242         stream += '>' + lineBreak;
    -00243 
    -00244         std::for_each(iterPair.first, iterPair.second,
    -00245         [&](const XmlElement & el) { serialize(el, stream, lineBreak, indent, indentLevel + 1); });
    -00246 
    -00247         for (size_t i = 0; i < indentLevel; ++i)
    -00248             stream += indent;
    -00249         stream += "</" + nameFmt + '>' + lineBreak;
    -00250     }
    -00251     else
    -00252     {
    -00253         std::string value;
    -00254         element.getValue(value);
    -00255 
    -00256         if (!value.empty()) //value element
    -00257             stream += '>' + normalizeElementValue(value) + "</" + nameFmt + '>' + lineBreak;
    -00258         else //empty element
    -00259             stream += "/>" + lineBreak;
    -00260     }
    -00261 }
    -00262 
    -00263 std::string serialize(const XmlDoc& doc,
    -00264                       const std::string& lineBreak,
    -00265                       const std::string& indent)
    -00266 {
    -00267     std::string version = doc.getVersionAs<std::string>();
    -00268     if (!version.empty())
    -00269         version = " version=\"" + normalizeAttribValue(version) + '\"';
    -00270 
    -00271     std::string encoding = doc.getEncodingAs<std::string>();
    -00272     if (!encoding.empty())
    -00273         encoding = " encoding=\"" + normalizeAttribValue(encoding) + '\"';
    -00274 
    -00275     std::string standalone = doc.getStandaloneAs<std::string>();
    -00276     if (!standalone.empty())
    -00277         standalone = " standalone=\"" + normalizeAttribValue(standalone) + '\"';
    -00278 
    -00279     std::string output = "<?xml" + version + encoding + standalone + "?>" + lineBreak;
    -00280     serialize(doc.root(), output, lineBreak, indent, 0);
    -00281     return output;
    -00282 }
    -00283 }
    -00284 }
    -00285 
    -00286 inline
    -00287 std::string serialize(const XmlDoc& doc,
    -00288                       const std::string& lineBreak,
    -00289                       const std::string& indent) { return implementation::serialize(doc, lineBreak, indent); }
    -00290 
    -00291 /*
    -00292 Grammar for XML parser
    -00293 -------------------------------
    -00294 document-expression:
    -00295     <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    -00296     element-expression:
    -00297 
    -00298 element-expression:
    -00299     <string attributes-expression/>
    -00300     <string attributes-expression> pm-expression </string>
    -00301 
    -00302 element-list-expression:
    -00303     <empty>
    -00304     element-expression element-list-expression
    -00305 
    -00306 attributes-expression:
    -00307     <empty>
    -00308     string="string" attributes-expression
    -00309 
    -00310 pm-expression:
    -00311     string
    -00312     element-list-expression
    -00313 */
    -00314 
    -00315 namespace implementation
    -00316 {
    -00317 struct Token
    -00318 {
    -00319     enum Type
    -00320     {
    -00321         TK_LESS,
    -00322         TK_GREATER,
    -00323         TK_LESS_SLASH,
    -00324         TK_SLASH_GREATER,
    -00325         TK_EQUAL,
    -00326         TK_QUOTE,
    -00327         TK_DECL_BEGIN,
    -00328         TK_DECL_END,
    -00329         TK_NAME,
    -00330         TK_END
    -00331     };
    -00332 
    -00333     Token(Type t) : type(t) {}
    -00334     Token(const std::string& txt) : type(TK_NAME), name(txt) {}
    -00335 
    -00336     Type type;
    -00337     std::string name; //filled if type == TK_NAME
    -00338 };
    -00339 
    -00340 class Scanner
    -00341 {
    -00342 public:
    -00343     Scanner(const std::string& stream) : stream_(stream), pos(stream_.begin())
    -00344     {
    -00345         if (zen::startsWith(stream_, BYTE_ORDER_MARK_UTF8))
    -00346             pos += strLength(BYTE_ORDER_MARK_UTF8);
    -00347 
    -00348         tokens.push_back(std::make_pair("<?xml", Token::TK_DECL_BEGIN));
    -00349         tokens.push_back(std::make_pair("?>",    Token::TK_DECL_END));
    -00350         tokens.push_back(std::make_pair("</", Token::TK_LESS_SLASH));
    -00351         tokens.push_back(std::make_pair("/>", Token::TK_SLASH_GREATER));
    -00352         tokens.push_back(std::make_pair("<" , Token::TK_LESS)); //evaluate after TK_DECL_BEGIN!
    -00353         tokens.push_back(std::make_pair(">" , Token::TK_GREATER));
    -00354         tokens.push_back(std::make_pair("=" , Token::TK_EQUAL));
    -00355         tokens.push_back(std::make_pair("\"", Token::TK_QUOTE));
    -00356         tokens.push_back(std::make_pair("\'", Token::TK_QUOTE));
    -00357     }
    -00358 
    -00359     Token nextToken() //throw XmlParsingError
    -00360     {
    -00361         //skip whitespace
    -00362         pos = std::find_if(pos, stream_.end(), [](char c) { return !zen::isWhiteSpace(c); });
    -00363 
    -00364         if (pos == stream_.end())
    -00365             return Token::TK_END;
    -00366 
    -00367         for (auto it = tokens.begin(); it != tokens.end(); ++it)
    -00368             if (startsWith(pos, it->first))
    -00369             {
    -00370                 pos += it->first.size();
    -00371                 return it->second;
    -00372             }
    -00373 
    -00374         auto nameEnd = std::find_if(pos, stream_.end(), [](char c)
    -00375         {
    -00376             return c == '<'  ||
    -00377                    c == '>'  ||
    -00378                    c == '='  ||
    -00379                    c == '/'  ||
    -00380                    c == '\'' ||
    -00381                    c == '\"' ||
    -00382                    zen::isWhiteSpace(c);
    -00383         });
    -00384 
    -00385         if (nameEnd != pos)
    -00386         {
    -00387             std::string name(&*pos, nameEnd - pos);
    -00388             pos = nameEnd;
    -00389             return implementation::denormalize(name);
    -00390         }
    -00391 
    -00392         //unknown token
    -00393         throw XmlParsingError(posRow(), posCol());
    -00394     }
    -00395 
    -00396     std::string extractElementValue()
    -00397     {
    -00398         auto it = std::find_if(pos, stream_.end(), [](char c)
    -00399         {
    -00400             return c == '<'  ||
    -00401                    c == '>';
    -00402         });
    -00403         std::string output(pos, it);
    -00404         pos = it;
    -00405         return implementation::denormalize(output);
    -00406     }
    -00407 
    -00408     std::string extractAttributeValue()
    -00409     {
    -00410         auto it = std::find_if(pos, stream_.end(), [](char c)
    -00411         {
    -00412             return c == '<'  ||
    -00413                    c == '>'  ||
    -00414                    c == '\'' ||
    -00415                    c == '\"';
    -00416         });
    -00417         std::string output(pos, it);
    -00418         pos = it;
    -00419         return implementation::denormalize(output);
    -00420     }
    -00421 
    -00422     size_t posRow() const //current row beginning with 0
    -00423     {
    -00424         const size_t crSum = std::count(stream_.begin(), pos, '\r'); //carriage returns
    -00425         const size_t nlSum = std::count(stream_.begin(), pos, '\n'); //new lines
    -00426         assert(crSum == 0 || nlSum == 0 || crSum == nlSum);
    -00427         return std::max(crSum, nlSum); //be compatible with Linux/Mac/Win
    -00428     }
    -00429 
    -00430     size_t posCol() const //current col beginning with 0
    -00431     {
    -00432         //seek beginning of line
    -00433         for (auto it = pos; it != stream_.begin(); )
    -00434         {
    -00435             --it;
    -00436             if (*it == '\r' || *it == '\n')
    -00437                 return pos - it - 1;
    -00438         }
    -00439         return pos - stream_.begin();
    -00440     }
    -00441 
    -00442 private:
    -00443     Scanner(const Scanner&);
    -00444     Scanner& operator=(const Scanner&);
    -00445 
    -00446     bool startsWith(std::string::const_iterator it, const std::string& prefix) const
    -00447     {
    -00448         if (stream_.end() - it < static_cast<ptrdiff_t>(prefix.size()))
    -00449             return false;
    -00450         return std::equal(prefix.begin(), prefix.end(), it);
    -00451     }
    -00452 
    -00453     typedef std::vector<std::pair<std::string, Token::Type> > TokenList;
    -00454     TokenList tokens;
    -00455 
    -00456     const std::string stream_;
    -00457     std::string::const_iterator pos;
    -00458 };
    -00459 
    -00460 
    -00461 class XmlParser
    -00462 {
    -00463 public:
    -00464     XmlParser(const std::string& stream) :
    -00465         scn(stream),
    -00466         tk(scn.nextToken()) {}
    -00467 
    -00468     void parse(XmlDoc& doc) //throw XmlParsingError
    -00469     {
    -00470         //declaration (optional)
    -00471         if (token().type == Token::TK_DECL_BEGIN)
    -00472         {
    -00473             nextToken();
    -00474 
    -00475             while (token().type == Token::TK_NAME)
    -00476             {
    -00477                 std::string attribName = token().name;
    -00478                 nextToken();
    -00479 
    -00480                 consumeToken(Token::TK_EQUAL);
    -00481                 expectToken(Token::TK_QUOTE);
    -00482                 std::string attribValue = scn.extractAttributeValue();
    -00483                 nextToken();
    -00484 
    -00485                 consumeToken(Token::TK_QUOTE);
    -00486 
    -00487                 if (attribName == "version")
    -00488                     doc.setVersion(attribValue);
    -00489                 else if (attribName == "encoding")
    -00490                     doc.setEncoding(attribValue);
    -00491                 else if (attribName == "standalone")
    -00492                     doc.setStandalone(attribValue);
    -00493             }
    -00494             consumeToken(Token::TK_DECL_END);
    -00495         }
    -00496 
    -00497         XmlDoc dummy;
    -00498         XmlElement& elemTmp = dummy.root();
    -00499         parseChildElements(elemTmp);
    -00500 
    -00501         auto iterPair = elemTmp.getChildren();
    -00502         if (iterPair.first != iterPair.second)
    -00503             doc.root().swap(*iterPair.first);
    -00504 
    -00505         expectToken(Token::TK_END);
    -00506     };
    -00507 
    -00508 private:
    -00509     XmlParser(const XmlParser&);
    -00510     XmlParser& operator=(const XmlParser&);
    -00511 
    -00512     void parseChildElements(XmlElement& parent)
    -00513     {
    -00514         while (token().type == Token::TK_LESS)
    -00515         {
    -00516             nextToken();
    -00517 
    -00518             expectToken(Token::TK_NAME);
    -00519             std::string elementName = token().name;
    -00520             nextToken();
    -00521 
    -00522             XmlElement& newElement = parent.addChild(elementName);
    -00523 
    -00524             parseAttributes(newElement);
    -00525 
    -00526             if (token().type == Token::TK_SLASH_GREATER) //empty element
    -00527             {
    -00528                 nextToken();
    -00529                 continue;
    -00530             }
    -00531 
    -00532             expectToken(Token::TK_GREATER);
    -00533             std::string elementValue = scn.extractElementValue();
    -00534             nextToken();
    -00535 
    -00536             //no support for mixed-mode content
    -00537             if (token().type == Token::TK_LESS) //structured element
    -00538                 parseChildElements(newElement);
    -00539             else //value element
    -00540                 newElement.setValue(elementValue);
    -00541 
    -00542             consumeToken(Token::TK_LESS_SLASH);
    -00543 
    -00544             if (token().type != Token::TK_NAME ||
    -00545                 elementName != token().name)
    -00546                 throw XmlParsingError(scn.posRow(), scn.posCol());
    -00547             nextToken();
    -00548 
    -00549             consumeToken(Token::TK_GREATER);
    -00550         }
    -00551     };
    -00552 
    -00553     void parseAttributes(XmlElement& element)
    -00554     {
    -00555         while (token().type == Token::TK_NAME)
    -00556         {
    -00557             std::string attribName = token().name;
    -00558             nextToken();
    -00559 
    -00560             consumeToken(Token::TK_EQUAL);
    -00561             expectToken(Token::TK_QUOTE);
    -00562             std::string attribValue = scn.extractAttributeValue();
    -00563             nextToken();
    -00564 
    -00565             consumeToken(Token::TK_QUOTE);
    -00566             element.setAttribute(attribName, attribValue);
    -00567         }
    -00568     }
    -00569 
    -00570     const Token& token() const { return tk; }
    -00571     void nextToken() { tk = scn.nextToken(); }
    -00572 
    -00573     void consumeToken(Token::Type t) //throw XmlParsingError
    -00574     {
    -00575         expectToken(t); //throw XmlParsingError
    -00576         nextToken();
    -00577     }
    -00578 
    -00579     void expectToken(Token::Type t) //throw XmlParsingError
    -00580     {
    -00581         if (token().type != t)
    -00582             throw XmlParsingError(scn.posRow(), scn.posCol());
    -00583     }
    -00584 
    -00585     Scanner scn;
    -00586     Token tk;
    -00587 };
    -00588 }
    -00589 
    -00590 inline
    -00591 void parse(const std::string& stream, XmlDoc& doc) //throw XmlParsingError
    -00592 {
    -00593     implementation::XmlParser(stream).parse(doc);  //throw XmlParsingError
    -00594 }
    -00595 }
    -00596 
    -00597 #endif //ZEN_XML_PARSER_HEADER_81248670213764583021432
    -
    - - +
    1 // **************************************************************************
    +
    2 // * This file is part of the FreeFileSync project. It is distributed under *
    +
    3 // * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
    +
    4 // * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved *
    +
    5 // **************************************************************************
    +
    6 
    +
    7 #ifndef ZEN_XML_PARSER_HEADER_81248670213764583021432
    +
    8 #define ZEN_XML_PARSER_HEADER_81248670213764583021432
    +
    9 
    +
    10 #include <cstdio>
    +
    11 #include <cstddef> //ptrdiff_t; req. on Linux
    +
    12 #include <zen/string_traits.h>
    +
    13 #include "dom.h"
    +
    14 #include "error.h"
    +
    15 
    +
    16 namespace zen
    +
    17 {
    +
    23 
    +
    30 std::string serialize(const XmlDoc& doc,
    +
    31  const std::string& lineBreak = "\r\n",
    +
    32  const std::string& indent = " "); //throw ()
    +
    33 
    +
    35 struct XmlParsingError : public XmlError
    +
    36 {
    +
    37  XmlParsingError(size_t rowNo, size_t colNo) : row(rowNo), col(colNo) {}
    +
    39  size_t row; //beginning with 0
    +
    41  size_t col; //
    +
    42 };
    +
    43 
    +
    44 
    +
    46 
    +
    51 XmlDoc parse(const std::string& stream); //throw XmlParsingError
    +
    52 
    +
    53 
    +
    54 
    +
    55 
    +
    56 
    +
    57 
    +
    58 
    +
    59 
    +
    60 
    +
    61 
    +
    62 
    +
    63 
    +
    64 
    +
    65 
    +
    66 
    +
    67 
    +
    68 
    +
    69 
    +
    70 
    +
    71 
    +
    72 //---------------------------- implementation ----------------------------
    +
    73 //see: http://www.w3.org/TR/xml/
    +
    74 
    +
    75 namespace implementation
    +
    76 {
    +
    77 inline
    +
    78 std::pair<char, char> hexify(unsigned char c)
    +
    79 {
    +
    80  auto hexifyDigit = [](int num) -> char //input [0, 15], output 0-9, A-F
    +
    81  {
    +
    82  assert(0 <= num&& num <= 15); //guaranteed by design below!
    +
    83  return static_cast<char>(num <= 9 ? //no signed/unsigned char problem here!
    +
    84  '0' + num :
    +
    85  'A' + (num - 10));
    +
    86  };
    +
    87  return std::make_pair(hexifyDigit(c / 16), hexifyDigit(c % 16));
    +
    88 }
    +
    89 
    +
    90 
    +
    91 inline
    +
    92 char unhexify(char high, char low)
    +
    93 {
    +
    94  auto unhexifyDigit = [](char hex) -> int //input 0-9, a-f, A-F; output range: [0, 15]
    +
    95  {
    +
    96  if ('0' <= hex && hex <= '9') //no signed/unsigned char problem here!
    +
    97  return hex - '0';
    +
    98  else if ('A' <= hex && hex <= 'F')
    +
    99  return (hex - 'A') + 10;
    +
    100  else if ('a' <= hex && hex <= 'f')
    +
    101  return (hex - 'a') + 10;
    +
    102  assert(false);
    +
    103  return 0;
    +
    104  };
    +
    105  return static_cast<unsigned char>(16 * unhexifyDigit(high) + unhexifyDigit(low)); //[!] convert to unsigned char first, then to char (which may be signed)
    +
    106 };
    +
    107 
    +
    108 
    +
    109 template <class Predicate> inline
    +
    110 std::string normalize(const std::string& str, Predicate pred) //pred: unary function taking a char, return true if value shall be encoded as hex
    +
    111 {
    +
    112  std::string output;
    +
    113  std::for_each(str.begin(), str.end(),
    +
    114  [&](char c)
    +
    115  {
    +
    116  if (c == '&') //
    +
    117  output += "&amp;";
    +
    118  else if (c == '<') //normalization mandatory: http://www.w3.org/TR/xml/#syntax
    +
    119  output += "&lt;";
    +
    120  else if (c == '>') //
    +
    121  output += "&gt;";
    +
    122  else if (pred(c))
    +
    123  {
    +
    124  if (c == '\'')
    +
    125  output += "&apos;";
    +
    126  else if (c == '\"')
    +
    127  output += "&quot;";
    +
    128  else
    +
    129  {
    +
    130  output += "&#x";
    +
    131  const auto hexDigits = hexify(c); //hexify beats "printNumber<std::string>("&#x%02X;", c)" by a nice factor of 3!
    +
    132  output += hexDigits.first;
    +
    133  output += hexDigits.second;
    +
    134  output += ';';
    +
    135  }
    +
    136  }
    +
    137  else
    +
    138  output += c;
    +
    139  });
    +
    140  return output;
    +
    141 }
    +
    142 
    +
    143 inline
    +
    144 std::string normalizeName(const std::string& str)
    +
    145 {
    +
    146  return normalize(str, [](char c) { return isWhiteSpace(c) || c == '=' || c == '/' || c == '\'' || c == '\"'; });
    +
    147 }
    +
    148 
    +
    149 inline
    +
    150 std::string normalizeElementValue(const std::string& str)
    +
    151 {
    +
    152  return normalize(str, [](char c) { return static_cast<unsigned char>(c) < 32; });
    +
    153 }
    +
    154 
    +
    155 inline
    +
    156 std::string normalizeAttribValue(const std::string& str)
    +
    157 {
    +
    158  return normalize(str, [](char c) { return static_cast<unsigned char>(c) < 32 || c == '\'' || c == '\"'; });
    +
    159 }
    +
    160 
    +
    161 
    +
    162 template <class CharIterator, size_t N> inline
    +
    163 bool checkEntity(CharIterator& first, CharIterator last, const char (&placeholder)[N])
    +
    164 {
    +
    165  assert(placeholder[N - 1] == 0);
    +
    166  const ptrdiff_t strLen = N - 1; //don't count null-terminator
    +
    167  if (last - first >= strLen && std::equal(first, first + strLen, placeholder))
    +
    168  {
    +
    169  first += strLen - 1;
    +
    170  return true;
    +
    171  }
    +
    172  return false;
    +
    173 }
    +
    174 
    +
    175 
    +
    176 namespace
    +
    177 {
    +
    178 std::string denormalize(const std::string& str)
    +
    179 {
    +
    180  std::string output;
    +
    181  for (auto it = str.begin(); it != str.end(); ++it)
    +
    182  {
    +
    183  const char c = *it;
    +
    184 
    +
    185  if (c == '&')
    +
    186  {
    +
    187  if (checkEntity(it, str.end(), "&amp;"))
    +
    188  output += '&';
    +
    189  else if (checkEntity(it, str.end(), "&lt;"))
    +
    190  output += '<';
    +
    191  else if (checkEntity(it, str.end(), "&gt;"))
    +
    192  output += '>';
    +
    193  else if (checkEntity(it, str.end(), "&apos;"))
    +
    194  output += '\'';
    +
    195  else if (checkEntity(it, str.end(), "&quot;"))
    +
    196  output += '\"';
    +
    197  else if (str.end() - it >= 6 &&
    +
    198  it[1] == '#' &&
    +
    199  it[2] == 'x' &&
    +
    200  it[5] == ';')
    +
    201  {
    +
    202  output += unhexify(it[3], it[4]); //unhexify beats "::sscanf(&it[3], "%02X", &tmp)" by a factor of 3000 for ~250000 calls!!!
    +
    203  it += 5;
    +
    204  }
    +
    205  else
    +
    206  output += c; //unexpected char!
    +
    207  }
    +
    208  else if (c == '\r') //map all end-of-line characters to \n http://www.w3.org/TR/xml/#sec-line-ends
    +
    209  {
    +
    210  auto itNext = it + 1;
    +
    211  if (itNext != str.end() && *itNext == '\n')
    +
    212  ++it;
    +
    213  output += '\n';
    +
    214  }
    +
    215  else
    +
    216  output += c;
    +
    217  };
    +
    218  return output;
    +
    219 }
    +
    220 
    +
    221 
    +
    222 void serialize(const XmlElement& element, std::string& stream,
    +
    223  const std::string& lineBreak,
    +
    224  const std::string& indent,
    +
    225  size_t indentLevel)
    +
    226 {
    +
    227  const std::string& nameFmt = normalizeName(element.getNameAs<std::string>());
    +
    228 
    +
    229  for (size_t i = 0; i < indentLevel; ++i)
    +
    230  stream += indent;
    +
    231 
    +
    232  stream += '<' + nameFmt;
    +
    233 
    +
    234  auto attr = element.getAttributes();
    +
    235  for (auto it = attr.first; it != attr.second; ++it)
    +
    236  stream += ' ' + normalizeName(it->first) + "=\"" + normalizeAttribValue(it->second) + '\"';
    +
    237 
    +
    238  //no support for mixed-mode content
    +
    239  auto iterPair = element.getChildren();
    +
    240  if (iterPair.first != iterPair.second) //structured element
    +
    241  {
    +
    242  stream += '>' + lineBreak;
    +
    243 
    +
    244  std::for_each(iterPair.first, iterPair.second,
    +
    245  [&](const XmlElement & el) { serialize(el, stream, lineBreak, indent, indentLevel + 1); });
    +
    246 
    +
    247  for (size_t i = 0; i < indentLevel; ++i)
    +
    248  stream += indent;
    +
    249  stream += "</" + nameFmt + '>' + lineBreak;
    +
    250  }
    +
    251  else
    +
    252  {
    +
    253  std::string value;
    +
    254  element.getValue(value);
    +
    255 
    +
    256  if (!value.empty()) //value element
    +
    257  stream += '>' + normalizeElementValue(value) + "</" + nameFmt + '>' + lineBreak;
    +
    258  else //empty element
    +
    259  stream += "/>" + lineBreak;
    +
    260  }
    +
    261 }
    +
    262 
    +
    263 std::string serialize(const XmlDoc& doc,
    +
    264  const std::string& lineBreak,
    +
    265  const std::string& indent)
    +
    266 {
    +
    267  std::string version = doc.getVersionAs<std::string>();
    +
    268  if (!version.empty())
    +
    269  version = " version=\"" + normalizeAttribValue(version) + '\"';
    +
    270 
    +
    271  std::string encoding = doc.getEncodingAs<std::string>();
    +
    272  if (!encoding.empty())
    +
    273  encoding = " encoding=\"" + normalizeAttribValue(encoding) + '\"';
    +
    274 
    +
    275  std::string standalone = doc.getStandaloneAs<std::string>();
    +
    276  if (!standalone.empty())
    +
    277  standalone = " standalone=\"" + normalizeAttribValue(standalone) + '\"';
    +
    278 
    +
    279  std::string output = "<?xml" + version + encoding + standalone + "?>" + lineBreak;
    +
    280  serialize(doc.root(), output, lineBreak, indent, 0);
    +
    281  return output;
    +
    282 }
    +
    283 }
    +
    284 }
    +
    285 
    +
    286 inline
    +
    287 std::string serialize(const XmlDoc& doc,
    +
    288  const std::string& lineBreak,
    +
    289  const std::string& indent) { return implementation::serialize(doc, lineBreak, indent); }
    +
    290 
    +
    291 /*
    +
    292 Grammar for XML parser
    +
    293 -------------------------------
    +
    294 document-expression:
    +
    295  <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    +
    296  element-expression:
    +
    297 
    +
    298 element-expression:
    +
    299  <string attributes-expression/>
    +
    300  <string attributes-expression> pm-expression </string>
    +
    301 
    +
    302 element-list-expression:
    +
    303  <empty>
    +
    304  element-expression element-list-expression
    +
    305 
    +
    306 attributes-expression:
    +
    307  <empty>
    +
    308  string="string" attributes-expression
    +
    309 
    +
    310 pm-expression:
    +
    311  string
    +
    312  element-list-expression
    +
    313 */
    +
    314 
    +
    315 namespace implementation
    +
    316 {
    +
    317 struct Token
    +
    318 {
    +
    319  enum Type
    +
    320  {
    +
    321  TK_LESS,
    +
    322  TK_GREATER,
    +
    323  TK_LESS_SLASH,
    +
    324  TK_SLASH_GREATER,
    +
    325  TK_EQUAL,
    +
    326  TK_QUOTE,
    +
    327  TK_DECL_BEGIN,
    +
    328  TK_DECL_END,
    +
    329  TK_NAME,
    +
    330  TK_END
    +
    331  };
    +
    332 
    +
    333  Token(Type t) : type(t) {}
    +
    334  Token(const std::string& txt) : type(TK_NAME), name(txt) {}
    +
    335 
    +
    336  Type type;
    +
    337  std::string name; //filled if type == TK_NAME
    +
    338 };
    +
    339 
    +
    340 class Scanner
    +
    341 {
    +
    342 public:
    +
    343  Scanner(const std::string& stream) :
    +
    344  xmlCommentBegin("<!--"),
    +
    345  xmlCommentEnd ("-->"),
    +
    346  stream_(stream),
    +
    347  pos(stream_.begin())
    +
    348  {
    +
    349  if (zen::startsWith(stream_, BYTE_ORDER_MARK_UTF8))
    +
    350  pos += strLength(BYTE_ORDER_MARK_UTF8);
    +
    351 
    +
    352  tokens.push_back(std::make_pair("<?xml", Token::TK_DECL_BEGIN));
    +
    353  tokens.push_back(std::make_pair("?>", Token::TK_DECL_END));
    +
    354  tokens.push_back(std::make_pair("</", Token::TK_LESS_SLASH));
    +
    355  tokens.push_back(std::make_pair("/>", Token::TK_SLASH_GREATER));
    +
    356  tokens.push_back(std::make_pair("<" , Token::TK_LESS)); //evaluate after TK_DECL_BEGIN!
    +
    357  tokens.push_back(std::make_pair(">" , Token::TK_GREATER));
    +
    358  tokens.push_back(std::make_pair("=" , Token::TK_EQUAL));
    +
    359  tokens.push_back(std::make_pair("\"", Token::TK_QUOTE));
    +
    360  tokens.push_back(std::make_pair("\'", Token::TK_QUOTE));
    +
    361  }
    +
    362 
    +
    363  Token nextToken() //throw XmlParsingError
    +
    364  {
    +
    365  //skip whitespace
    +
    366  pos = std::find_if(pos, stream_.end(), [](char c) { return !zen::isWhiteSpace(c); });
    +
    367 
    +
    368  if (pos == stream_.end())
    +
    369  return Token::TK_END;
    +
    370 
    +
    371  //skip XML comments
    +
    372  if (startsWith(xmlCommentBegin))
    +
    373  {
    +
    374  auto it = std::search(pos + xmlCommentBegin.size(), stream_.end(), xmlCommentEnd.begin(), xmlCommentEnd.end());
    +
    375  if (it != stream_.end())
    +
    376  {
    +
    377  pos = it + xmlCommentEnd.size();
    +
    378  return nextToken();
    +
    379  }
    +
    380  }
    +
    381 
    +
    382  for (auto it = tokens.begin(); it != tokens.end(); ++it)
    +
    383  if (startsWith(it->first))
    +
    384  {
    +
    385  pos += it->first.size();
    +
    386  return it->second;
    +
    387  }
    +
    388 
    +
    389  auto nameEnd = std::find_if(pos, stream_.end(), [](char c)
    +
    390  {
    +
    391  return c == '<' ||
    +
    392  c == '>' ||
    +
    393  c == '=' ||
    +
    394  c == '/' ||
    +
    395  c == '\'' ||
    +
    396  c == '\"' ||
    +
    397  zen::isWhiteSpace(c);
    +
    398  });
    +
    399 
    +
    400  if (nameEnd != pos)
    +
    401  {
    +
    402  std::string name(&*pos, nameEnd - pos);
    +
    403  pos = nameEnd;
    +
    404  return implementation::denormalize(name);
    +
    405  }
    +
    406 
    +
    407  //unknown token
    +
    408  throw XmlParsingError(posRow(), posCol());
    +
    409  }
    +
    410 
    +
    411  std::string extractElementValue()
    +
    412  {
    +
    413  auto it = std::find_if(pos, stream_.end(), [](char c)
    +
    414  {
    +
    415  return c == '<' ||
    +
    416  c == '>';
    +
    417  });
    +
    418  std::string output(pos, it);
    +
    419  pos = it;
    +
    420  return implementation::denormalize(output);
    +
    421  }
    +
    422 
    +
    423  std::string extractAttributeValue()
    +
    424  {
    +
    425  auto it = std::find_if(pos, stream_.end(), [](char c)
    +
    426  {
    +
    427  return c == '<' ||
    +
    428  c == '>' ||
    +
    429  c == '\'' ||
    +
    430  c == '\"';
    +
    431  });
    +
    432  std::string output(pos, it);
    +
    433  pos = it;
    +
    434  return implementation::denormalize(output);
    +
    435  }
    +
    436 
    +
    437  size_t posRow() const //current row beginning with 0
    +
    438  {
    +
    439  const size_t crSum = std::count(stream_.begin(), pos, '\r'); //carriage returns
    +
    440  const size_t nlSum = std::count(stream_.begin(), pos, '\n'); //new lines
    +
    441  assert(crSum == 0 || nlSum == 0 || crSum == nlSum);
    +
    442  return std::max(crSum, nlSum); //be compatible with Linux/Mac/Win
    +
    443  }
    +
    444 
    +
    445  size_t posCol() const //current col beginning with 0
    +
    446  {
    +
    447  //seek beginning of line
    +
    448  for (auto it = pos; it != stream_.begin(); )
    +
    449  {
    +
    450  --it;
    +
    451  if (*it == '\r' || *it == '\n')
    +
    452  return pos - it - 1;
    +
    453  }
    +
    454  return pos - stream_.begin();
    +
    455  }
    +
    456 
    +
    457 private:
    +
    458  Scanner(const Scanner&);
    +
    459  Scanner& operator=(const Scanner&);
    +
    460 
    +
    461  bool startsWith(const std::string& prefix) const
    +
    462  {
    +
    463  if (stream_.end() - pos < static_cast<ptrdiff_t>(prefix.size()))
    +
    464  return false;
    +
    465  return std::equal(prefix.begin(), prefix.end(), pos);
    +
    466  }
    +
    467 
    +
    468  typedef std::vector<std::pair<std::string, Token::Type> > TokenList;
    +
    469  TokenList tokens;
    +
    470 
    +
    471  const std::string xmlCommentBegin;
    +
    472  const std::string xmlCommentEnd;
    +
    473 
    +
    474  const std::string stream_;
    +
    475  std::string::const_iterator pos;
    +
    476 };
    +
    477 
    +
    478 
    +
    479 class XmlParser
    +
    480 {
    +
    481 public:
    +
    482  XmlParser(const std::string& stream) :
    +
    483  scn(stream),
    +
    484  tk(scn.nextToken()) {}
    +
    485 
    +
    486  XmlDoc parse() //throw XmlParsingError
    +
    487  {
    +
    488  XmlDoc doc;
    +
    489 
    +
    490  //declaration (optional)
    +
    491  if (token().type == Token::TK_DECL_BEGIN)
    +
    492  {
    +
    493  nextToken();
    +
    494 
    +
    495  while (token().type == Token::TK_NAME)
    +
    496  {
    +
    497  std::string attribName = token().name;
    +
    498  nextToken();
    +
    499 
    +
    500  consumeToken(Token::TK_EQUAL);
    +
    501  expectToken(Token::TK_QUOTE);
    +
    502  std::string attribValue = scn.extractAttributeValue();
    +
    503  nextToken();
    +
    504 
    +
    505  consumeToken(Token::TK_QUOTE);
    +
    506 
    +
    507  if (attribName == "version")
    +
    508  doc.setVersion(attribValue);
    +
    509  else if (attribName == "encoding")
    +
    510  doc.setEncoding(attribValue);
    +
    511  else if (attribName == "standalone")
    +
    512  doc.setStandalone(attribValue);
    +
    513  }
    +
    514  consumeToken(Token::TK_DECL_END);
    +
    515  }
    +
    516 
    +
    517  XmlDoc dummy;
    +
    518  XmlElement& elemTmp = dummy.root();
    +
    519  parseChildElements(elemTmp);
    +
    520 
    +
    521  auto iterPair = elemTmp.getChildren();
    +
    522  if (iterPair.first != iterPair.second)
    +
    523  doc.root().swap(*iterPair.first);
    +
    524 
    +
    525  expectToken(Token::TK_END);
    +
    526  return doc;
    +
    527  };
    +
    528 
    +
    529 private:
    +
    530  XmlParser(const XmlParser&);
    +
    531  XmlParser& operator=(const XmlParser&);
    +
    532 
    +
    533  void parseChildElements(XmlElement& parent)
    +
    534  {
    +
    535  while (token().type == Token::TK_LESS)
    +
    536  {
    +
    537  nextToken();
    +
    538 
    +
    539  expectToken(Token::TK_NAME);
    +
    540  std::string elementName = token().name;
    +
    541  nextToken();
    +
    542 
    +
    543  XmlElement& newElement = parent.addChild(elementName);
    +
    544 
    +
    545  parseAttributes(newElement);
    +
    546 
    +
    547  if (token().type == Token::TK_SLASH_GREATER) //empty element
    +
    548  {
    +
    549  nextToken();
    +
    550  continue;
    +
    551  }
    +
    552 
    +
    553  expectToken(Token::TK_GREATER);
    +
    554  std::string elementValue = scn.extractElementValue();
    +
    555  nextToken();
    +
    556 
    +
    557  //no support for mixed-mode content
    +
    558  if (token().type == Token::TK_LESS) //structured element
    +
    559  parseChildElements(newElement);
    +
    560  else //value element
    +
    561  newElement.setValue(elementValue);
    +
    562 
    +
    563  consumeToken(Token::TK_LESS_SLASH);
    +
    564 
    +
    565  if (token().type != Token::TK_NAME ||
    +
    566  elementName != token().name)
    +
    567  throw XmlParsingError(scn.posRow(), scn.posCol());
    +
    568  nextToken();
    +
    569 
    +
    570  consumeToken(Token::TK_GREATER);
    +
    571  }
    +
    572  };
    +
    573 
    +
    574  void parseAttributes(XmlElement& element)
    +
    575  {
    +
    576  while (token().type == Token::TK_NAME)
    +
    577  {
    +
    578  std::string attribName = token().name;
    +
    579  nextToken();
    +
    580 
    +
    581  consumeToken(Token::TK_EQUAL);
    +
    582  expectToken(Token::TK_QUOTE);
    +
    583  std::string attribValue = scn.extractAttributeValue();
    +
    584  nextToken();
    +
    585 
    +
    586  consumeToken(Token::TK_QUOTE);
    +
    587  element.setAttribute(attribName, attribValue);
    +
    588  }
    +
    589  }
    +
    590 
    +
    591  const Token& token() const { return tk; }
    +
    592  void nextToken() { tk = scn.nextToken(); }
    +
    593 
    +
    594  void consumeToken(Token::Type t) //throw XmlParsingError
    +
    595  {
    +
    596  expectToken(t); //throw XmlParsingError
    +
    597  nextToken();
    +
    598  }
    +
    599 
    +
    600  void expectToken(Token::Type t) //throw XmlParsingError
    +
    601  {
    +
    602  if (token().type != t)
    +
    603  throw XmlParsingError(scn.posRow(), scn.posCol());
    +
    604  }
    +
    605 
    +
    606  Scanner scn;
    +
    607  Token tk;
    +
    608 };
    +
    609 }
    +
    610 
    +
    611 inline
    +
    612 XmlDoc parse(const std::string& stream) //throw XmlParsingError
    +
    613 {
    +
    614  return implementation::XmlParser(stream).parse(); //throw XmlParsingError
    +
    615 }
    +
    616 }
    +
    617 
    +
    618 #endif //ZEN_XML_PARSER_HEADER_81248670213764583021432
    +
    XmlDoc parse(const std::string &stream)
    Load XML document from a byte stream.
    Definition: parser.h:612
    +
    std::string serialize(const XmlDoc &doc, const std::string &lineBreak="\r\n", const std::string &indent=" ")
    Save XML document as a byte stream.
    Definition: parser.h:287
    +
    size_t row
    Input file row where the parsing error occured (zero-based)
    Definition: parser.h:39
    +
    The complete XML document.
    Definition: dom.h:249
    +
    size_t col
    Input file column where the parsing error occured (zero-based)
    Definition: parser.h:41
    +
    Exception thrown due to an XML parsing error.
    Definition: parser.h:35
    +
    Exception base class for zen::Xml.
    Definition: error.h:13
    +
    + - diff --git a/zenxml/doc/search/all_61.html b/zenxml/doc/search/all_61.html deleted file mode 100644 index a3164d55..00000000 --- a/zenxml/doc/search/all_61.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/zenxml/doc/search/all_61.js b/zenxml/doc/search/all_61.js deleted file mode 100644 index 2b7cd296..00000000 --- a/zenxml/doc/search/all_61.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['addchild',['addChild',['../classzen_1_1_xml_element.html#a653caffa6fad89db7d14f67f987ad0f9',1,'zen::XmlElement']]], - ['attribute',['attribute',['../classzen_1_1_xml_out.html#acaf9b71fe1d907dd63dd4b91e2e03805',1,'zen::XmlOut::attribute()'],['../classzen_1_1_xml_in.html#a971cd7054c551c4460d5220f6ec5cf01',1,'zen::XmlIn::attribute()']]] -]; diff --git a/zenxml/doc/search/all_63.html b/zenxml/doc/search/all_63.html deleted file mode 100644 index 56b5ad1e..00000000 --- a/zenxml/doc/search/all_63.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/zenxml/doc/search/all_63.js b/zenxml/doc/search/all_63.js deleted file mode 100644 index 3c8f3573..00000000 --- a/zenxml/doc/search/all_63.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['col',['col',['../structzen_1_1_xml_parsing_error.html#a4a37dc48883337499804a9dc791669fd',1,'zen::XmlParsingError']]] -]; diff --git a/zenxml/doc/search/all_65.html b/zenxml/doc/search/all_65.html deleted file mode 100644 index 66cc8348..00000000 --- a/zenxml/doc/search/all_65.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/zenxml/doc/search/all_65.js b/zenxml/doc/search/all_65.js deleted file mode 100644 index 46ba186a..00000000 --- a/zenxml/doc/search/all_65.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['errorsoccured',['errorsOccured',['../classzen_1_1_xml_in.html#a33b5dd504d3165aa3f923f6b33e9991a',1,'zen::XmlIn']]] -]; diff --git a/zenxml/doc/search/all_67.html b/zenxml/doc/search/all_67.html deleted file mode 100644 index 41a459ae..00000000 --- a/zenxml/doc/search/all_67.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/zenxml/doc/search/all_67.js b/zenxml/doc/search/all_67.js deleted file mode 100644 index 029444b8..00000000 --- a/zenxml/doc/search/all_67.js +++ /dev/null @@ -1,13 +0,0 @@ -var searchData= -[ - ['get',['get',['../classzen_1_1_xml_in.html#a647b468b7c6c95b25f2e43627184177f',1,'zen::XmlIn']]], - ['getattribute',['getAttribute',['../classzen_1_1_xml_element.html#af90ac6f435b03ba37cf47ee188c58887',1,'zen::XmlElement']]], - ['getchild',['getChild',['../classzen_1_1_xml_element.html#a3ab82b1720460487f4afabcd115d0c7e',1,'zen::XmlElement::getChild(const String &name) const '],['../classzen_1_1_xml_element.html#a5d672e8ccc7592442ab927bb267af658',1,'zen::XmlElement::getChild(const String &name)']]], - ['getchildren',['getChildren',['../classzen_1_1_xml_element.html#a2640b438c4984f5eeb8760d82d73c5b8',1,'zen::XmlElement::getChildren(const String &name) const '],['../classzen_1_1_xml_element.html#ae209dac9655bc36121abb87688ece41d',1,'zen::XmlElement::getChildren(const String &name)'],['../classzen_1_1_xml_element.html#a55a6d1849490d82ae900cd9b923908f2',1,'zen::XmlElement::getChildren() const '],['../classzen_1_1_xml_element.html#ac59268177d162931f937b6a7f235ad96',1,'zen::XmlElement::getChildren()']]], - ['getencodingas',['getEncodingAs',['../classzen_1_1_xml_doc.html#a64ece4a1f3f8c802192b8f31506535da',1,'zen::XmlDoc']]], - ['geterrorsas',['getErrorsAs',['../classzen_1_1_xml_in.html#a84bb497d3b3fc753d054e52c4823c05e',1,'zen::XmlIn']]], - ['getnameas',['getNameAs',['../classzen_1_1_xml_element.html#a7c911eb06a59c864197b1a4098728e50',1,'zen::XmlElement']]], - ['getstandaloneas',['getStandaloneAs',['../classzen_1_1_xml_doc.html#ac1bfb9776852dc8195b9ffb4f65452e4',1,'zen::XmlDoc']]], - ['getvalue',['getValue',['../classzen_1_1_xml_element.html#a5ac9d586a5668c2c64e3c06c6203b070',1,'zen::XmlElement']]], - ['getversionas',['getVersionAs',['../classzen_1_1_xml_doc.html#a7f93dcdc00cdc8d98926cf8e47161665',1,'zen::XmlDoc']]] -]; diff --git a/zenxml/doc/search/all_6c.html b/zenxml/doc/search/all_6c.html deleted file mode 100644 index f6383cc2..00000000 --- a/zenxml/doc/search/all_6c.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/zenxml/doc/search/all_6c.js b/zenxml/doc/search/all_6c.js deleted file mode 100644 index 0e6b8f02..00000000 --- a/zenxml/doc/search/all_6c.js +++ /dev/null @@ -1,6 +0,0 @@ -var searchData= -[ - ['lasterror',['lastError',['../structzen_1_1_xml_file_error.html#a4a109e749675a3887af8cfc140303b8f',1,'zen::XmlFileError']]], - ['load',['load',['../namespacezen.html#a900c1fb290f0eedc24354c487145dbee',1,'zen']]], - ['loadstream',['loadStream',['../namespacezen.html#a04fe23c3bd9b7d03309620b5ea763607',1,'zen']]] -]; diff --git a/zenxml/doc/search/all_6e.html b/zenxml/doc/search/all_6e.html deleted file mode 100644 index 1f92ee5b..00000000 --- a/zenxml/doc/search/all_6e.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/zenxml/doc/search/all_6e.js b/zenxml/doc/search/all_6e.js deleted file mode 100644 index 250e97da..00000000 --- a/zenxml/doc/search/all_6e.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['next',['next',['../classzen_1_1_xml_in.html#a60cf2678c989621545d27745dcafa4a4',1,'zen::XmlIn']]] -]; diff --git a/zenxml/doc/search/all_6f.html b/zenxml/doc/search/all_6f.html deleted file mode 100644 index 61827e82..00000000 --- a/zenxml/doc/search/all_6f.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/zenxml/doc/search/all_6f.js b/zenxml/doc/search/all_6f.js deleted file mode 100644 index 4152ba50..00000000 --- a/zenxml/doc/search/all_6f.js +++ /dev/null @@ -1,6 +0,0 @@ -var searchData= -[ - ['_2a',['*',['../classzen_1_1_xml_in.html#a954950849b52557369932ab2a8b4ad72',1,'zen::XmlIn']]], - ['operator_28_29',['operator()',['../classzen_1_1_xml_out.html#a09ca9144515e3c109b36062b0475c8eb',1,'zen::XmlOut::operator()()'],['../classzen_1_1_xml_in.html#a98cc59f687c89549381e76105f8fb506',1,'zen::XmlIn::operator()()']]], - ['operator_5b_5d',['operator[]',['../classzen_1_1_xml_out.html#a00f883d3f9d60535b06b5ae609dc8831',1,'zen::XmlOut::operator[]()'],['../classzen_1_1_xml_in.html#a9b38167835a28eac9a2297f35f51e53d',1,'zen::XmlIn::operator[]()']]] -]; diff --git a/zenxml/doc/search/all_70.html b/zenxml/doc/search/all_70.html deleted file mode 100644 index 0340151b..00000000 --- a/zenxml/doc/search/all_70.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/zenxml/doc/search/all_70.js b/zenxml/doc/search/all_70.js deleted file mode 100644 index b293cd99..00000000 --- a/zenxml/doc/search/all_70.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['parent',['parent',['../classzen_1_1_xml_element.html#a4af309f59ef09f46a559f1f0e1eac6c1',1,'zen::XmlElement::parent()'],['../classzen_1_1_xml_element.html#a7ba1f26be5629f89ba7648d658f7058c',1,'zen::XmlElement::parent() const ']]], - ['parse',['parse',['../namespacezen.html#a6cf1ec0b57fc1ae9aa95761800e67ec7',1,'zen']]] -]; diff --git a/zenxml/doc/search/all_72.html b/zenxml/doc/search/all_72.html deleted file mode 100644 index 0ab18d65..00000000 --- a/zenxml/doc/search/all_72.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/zenxml/doc/search/all_72.js b/zenxml/doc/search/all_72.js deleted file mode 100644 index 86fadf65..00000000 --- a/zenxml/doc/search/all_72.js +++ /dev/null @@ -1,9 +0,0 @@ -var searchData= -[ - ['readstruc',['readStruc',['../namespacezen.html#a2bdcecfe7435ef11cedbce47d4e72ee1',1,'zen']]], - ['readtext',['readText',['../namespacezen.html#acaf85ab94b61882f957afcd355386bff',1,'zen']]], - ['ref',['ref',['../classzen_1_1_xml_out.html#aec117344e8a534382e8d5e76711f97b2',1,'zen::XmlOut']]], - ['removeattribute',['removeAttribute',['../classzen_1_1_xml_element.html#ad9c2ce2e55294c8110825988595e3934',1,'zen::XmlElement']]], - ['root',['root',['../classzen_1_1_xml_doc.html#ad4a9594d93885fc1a12db28e8246648d',1,'zen::XmlDoc::root() const '],['../classzen_1_1_xml_doc.html#a094e156f9d265443e52a527638e88a1e',1,'zen::XmlDoc::root()']]], - ['row',['row',['../structzen_1_1_xml_parsing_error.html#a3ed4cd1b5599df9b52500f620421496e',1,'zen::XmlParsingError']]] -]; diff --git a/zenxml/doc/search/all_73.html b/zenxml/doc/search/all_73.html deleted file mode 100644 index 1ec8f174..00000000 --- a/zenxml/doc/search/all_73.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/zenxml/doc/search/all_73.js b/zenxml/doc/search/all_73.js deleted file mode 100644 index a062befe..00000000 --- a/zenxml/doc/search/all_73.js +++ /dev/null @@ -1,11 +0,0 @@ -var searchData= -[ - ['save',['save',['../namespacezen.html#adeeb6b2318097382ae47aa939fc15d4d',1,'zen']]], - ['savestream',['saveStream',['../namespacezen.html#a4ba7bbaa14a787b07fc13da9145aabe2',1,'zen']]], - ['serialize',['serialize',['../namespacezen.html#afaa4920e275078e6c8009fbdf58b57ee',1,'zen']]], - ['setattribute',['setAttribute',['../classzen_1_1_xml_element.html#a211a6f037c22a54d3facb7a8347a8421',1,'zen::XmlElement']]], - ['setencoding',['setEncoding',['../classzen_1_1_xml_doc.html#a2ae30bca2f490479f58c272148935a62',1,'zen::XmlDoc']]], - ['setstandalone',['setStandalone',['../classzen_1_1_xml_doc.html#a4c92f9b8c1bb47247b827d89794590d4',1,'zen::XmlDoc']]], - ['setvalue',['setValue',['../classzen_1_1_xml_element.html#aaf3a26f6199fc88cce7d9d911ba21b01',1,'zen::XmlElement']]], - ['setversion',['setVersion',['../classzen_1_1_xml_doc.html#ab45914339c476e1da35746f5e00dbc64',1,'zen::XmlDoc']]] -]; diff --git a/zenxml/doc/search/all_77.html b/zenxml/doc/search/all_77.html deleted file mode 100644 index 73323d31..00000000 --- a/zenxml/doc/search/all_77.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/zenxml/doc/search/all_77.js b/zenxml/doc/search/all_77.js deleted file mode 100644 index 5e349623..00000000 --- a/zenxml/doc/search/all_77.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['writestruc',['writeStruc',['../namespacezen.html#a29ddb823fe0a195f19a64448881b8bf6',1,'zen']]], - ['writetext',['writeText',['../namespacezen.html#a2ce2998296871fc2f4718ceceb22a23f',1,'zen']]] -]; diff --git a/zenxml/doc/search/all_78.html b/zenxml/doc/search/all_78.html deleted file mode 100644 index 10780d66..00000000 --- a/zenxml/doc/search/all_78.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/zenxml/doc/search/all_78.js b/zenxml/doc/search/all_78.js deleted file mode 100644 index 371f5dde..00000000 --- a/zenxml/doc/search/all_78.js +++ /dev/null @@ -1,13 +0,0 @@ -var searchData= -[ - ['xmldoc',['XmlDoc',['../classzen_1_1_xml_doc.html',1,'zen']]], - ['xmldoc',['XmlDoc',['../classzen_1_1_xml_doc.html#adbed9c31066d456a9cc8c610f15670ed',1,'zen::XmlDoc::XmlDoc()'],['../classzen_1_1_xml_doc.html#a74ff8434848672fe6483845d04c082df',1,'zen::XmlDoc::XmlDoc(String rootName)']]], - ['xmlelement',['XmlElement',['../classzen_1_1_xml_element.html',1,'zen']]], - ['xmlerror',['XmlError',['../structzen_1_1_xml_error.html',1,'zen']]], - ['xmlfileerror',['XmlFileError',['../structzen_1_1_xml_file_error.html',1,'zen']]], - ['xmlin',['XmlIn',['../classzen_1_1_xml_in.html#a5b48c9848e6c631a04cec2477ff85c0f',1,'zen::XmlIn::XmlIn(const XmlDoc &doc)'],['../classzen_1_1_xml_in.html#ae072660cde71fd4695c04d074098b430',1,'zen::XmlIn::XmlIn(const XmlElement *element)'],['../classzen_1_1_xml_in.html#a33de75412df69cb25e0fd8b3bc70c9f8',1,'zen::XmlIn::XmlIn(const XmlElement &element)']]], - ['xmlin',['XmlIn',['../classzen_1_1_xml_in.html',1,'zen']]], - ['xmlout',['XmlOut',['../classzen_1_1_xml_out.html',1,'zen']]], - ['xmlout',['XmlOut',['../classzen_1_1_xml_out.html#ad8b1ccb8f3d4e7b0ab2598597ea50bcc',1,'zen::XmlOut::XmlOut(XmlDoc &doc)'],['../classzen_1_1_xml_out.html#aa80be3a56f70a58d2730a763166088c0',1,'zen::XmlOut::XmlOut(XmlElement &element)']]], - ['xmlparsingerror',['XmlParsingError',['../structzen_1_1_xml_parsing_error.html',1,'zen']]] -]; diff --git a/zenxml/doc/search/all_7a.html b/zenxml/doc/search/all_7a.html deleted file mode 100644 index 0593a62d..00000000 --- a/zenxml/doc/search/all_7a.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/zenxml/doc/search/all_7a.js b/zenxml/doc/search/all_7a.js deleted file mode 100644 index 14074229..00000000 --- a/zenxml/doc/search/all_7a.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['zen',['zen',['../namespacezen.html',1,'']]] -]; diff --git a/zenxml/doc/search/classes_78.html b/zenxml/doc/search/classes_78.html deleted file mode 100644 index dfce8ecc..00000000 --- a/zenxml/doc/search/classes_78.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/zenxml/doc/search/classes_78.js b/zenxml/doc/search/classes_78.js deleted file mode 100644 index fa78dcd3..00000000 --- a/zenxml/doc/search/classes_78.js +++ /dev/null @@ -1,10 +0,0 @@ -var searchData= -[ - ['xmldoc',['XmlDoc',['../classzen_1_1_xml_doc.html',1,'zen']]], - ['xmlelement',['XmlElement',['../classzen_1_1_xml_element.html',1,'zen']]], - ['xmlerror',['XmlError',['../structzen_1_1_xml_error.html',1,'zen']]], - ['xmlfileerror',['XmlFileError',['../structzen_1_1_xml_file_error.html',1,'zen']]], - ['xmlin',['XmlIn',['../classzen_1_1_xml_in.html',1,'zen']]], - ['xmlout',['XmlOut',['../classzen_1_1_xml_out.html',1,'zen']]], - ['xmlparsingerror',['XmlParsingError',['../structzen_1_1_xml_parsing_error.html',1,'zen']]] -]; diff --git a/zenxml/doc/search/functions_61.html b/zenxml/doc/search/functions_61.html deleted file mode 100644 index 7f395337..00000000 --- a/zenxml/doc/search/functions_61.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/zenxml/doc/search/functions_61.js b/zenxml/doc/search/functions_61.js deleted file mode 100644 index 2b7cd296..00000000 --- a/zenxml/doc/search/functions_61.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['addchild',['addChild',['../classzen_1_1_xml_element.html#a653caffa6fad89db7d14f67f987ad0f9',1,'zen::XmlElement']]], - ['attribute',['attribute',['../classzen_1_1_xml_out.html#acaf9b71fe1d907dd63dd4b91e2e03805',1,'zen::XmlOut::attribute()'],['../classzen_1_1_xml_in.html#a971cd7054c551c4460d5220f6ec5cf01',1,'zen::XmlIn::attribute()']]] -]; diff --git a/zenxml/doc/search/functions_65.html b/zenxml/doc/search/functions_65.html deleted file mode 100644 index a77debae..00000000 --- a/zenxml/doc/search/functions_65.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/zenxml/doc/search/functions_65.js b/zenxml/doc/search/functions_65.js deleted file mode 100644 index 46ba186a..00000000 --- a/zenxml/doc/search/functions_65.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['errorsoccured',['errorsOccured',['../classzen_1_1_xml_in.html#a33b5dd504d3165aa3f923f6b33e9991a',1,'zen::XmlIn']]] -]; diff --git a/zenxml/doc/search/functions_67.html b/zenxml/doc/search/functions_67.html deleted file mode 100644 index d0ab42a3..00000000 --- a/zenxml/doc/search/functions_67.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/zenxml/doc/search/functions_67.js b/zenxml/doc/search/functions_67.js deleted file mode 100644 index 029444b8..00000000 --- a/zenxml/doc/search/functions_67.js +++ /dev/null @@ -1,13 +0,0 @@ -var searchData= -[ - ['get',['get',['../classzen_1_1_xml_in.html#a647b468b7c6c95b25f2e43627184177f',1,'zen::XmlIn']]], - ['getattribute',['getAttribute',['../classzen_1_1_xml_element.html#af90ac6f435b03ba37cf47ee188c58887',1,'zen::XmlElement']]], - ['getchild',['getChild',['../classzen_1_1_xml_element.html#a3ab82b1720460487f4afabcd115d0c7e',1,'zen::XmlElement::getChild(const String &name) const '],['../classzen_1_1_xml_element.html#a5d672e8ccc7592442ab927bb267af658',1,'zen::XmlElement::getChild(const String &name)']]], - ['getchildren',['getChildren',['../classzen_1_1_xml_element.html#a2640b438c4984f5eeb8760d82d73c5b8',1,'zen::XmlElement::getChildren(const String &name) const '],['../classzen_1_1_xml_element.html#ae209dac9655bc36121abb87688ece41d',1,'zen::XmlElement::getChildren(const String &name)'],['../classzen_1_1_xml_element.html#a55a6d1849490d82ae900cd9b923908f2',1,'zen::XmlElement::getChildren() const '],['../classzen_1_1_xml_element.html#ac59268177d162931f937b6a7f235ad96',1,'zen::XmlElement::getChildren()']]], - ['getencodingas',['getEncodingAs',['../classzen_1_1_xml_doc.html#a64ece4a1f3f8c802192b8f31506535da',1,'zen::XmlDoc']]], - ['geterrorsas',['getErrorsAs',['../classzen_1_1_xml_in.html#a84bb497d3b3fc753d054e52c4823c05e',1,'zen::XmlIn']]], - ['getnameas',['getNameAs',['../classzen_1_1_xml_element.html#a7c911eb06a59c864197b1a4098728e50',1,'zen::XmlElement']]], - ['getstandaloneas',['getStandaloneAs',['../classzen_1_1_xml_doc.html#ac1bfb9776852dc8195b9ffb4f65452e4',1,'zen::XmlDoc']]], - ['getvalue',['getValue',['../classzen_1_1_xml_element.html#a5ac9d586a5668c2c64e3c06c6203b070',1,'zen::XmlElement']]], - ['getversionas',['getVersionAs',['../classzen_1_1_xml_doc.html#a7f93dcdc00cdc8d98926cf8e47161665',1,'zen::XmlDoc']]] -]; diff --git a/zenxml/doc/search/functions_6c.html b/zenxml/doc/search/functions_6c.html deleted file mode 100644 index da371cfa..00000000 --- a/zenxml/doc/search/functions_6c.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/zenxml/doc/search/functions_6c.js b/zenxml/doc/search/functions_6c.js deleted file mode 100644 index 93c6b2bd..00000000 --- a/zenxml/doc/search/functions_6c.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['load',['load',['../namespacezen.html#a900c1fb290f0eedc24354c487145dbee',1,'zen']]], - ['loadstream',['loadStream',['../namespacezen.html#a04fe23c3bd9b7d03309620b5ea763607',1,'zen']]] -]; diff --git a/zenxml/doc/search/functions_6e.html b/zenxml/doc/search/functions_6e.html deleted file mode 100644 index d734dd07..00000000 --- a/zenxml/doc/search/functions_6e.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/zenxml/doc/search/functions_6e.js b/zenxml/doc/search/functions_6e.js deleted file mode 100644 index 250e97da..00000000 --- a/zenxml/doc/search/functions_6e.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['next',['next',['../classzen_1_1_xml_in.html#a60cf2678c989621545d27745dcafa4a4',1,'zen::XmlIn']]] -]; diff --git a/zenxml/doc/search/functions_6f.html b/zenxml/doc/search/functions_6f.html deleted file mode 100644 index 222f0f83..00000000 --- a/zenxml/doc/search/functions_6f.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/zenxml/doc/search/functions_6f.js b/zenxml/doc/search/functions_6f.js deleted file mode 100644 index 4152ba50..00000000 --- a/zenxml/doc/search/functions_6f.js +++ /dev/null @@ -1,6 +0,0 @@ -var searchData= -[ - ['_2a',['*',['../classzen_1_1_xml_in.html#a954950849b52557369932ab2a8b4ad72',1,'zen::XmlIn']]], - ['operator_28_29',['operator()',['../classzen_1_1_xml_out.html#a09ca9144515e3c109b36062b0475c8eb',1,'zen::XmlOut::operator()()'],['../classzen_1_1_xml_in.html#a98cc59f687c89549381e76105f8fb506',1,'zen::XmlIn::operator()()']]], - ['operator_5b_5d',['operator[]',['../classzen_1_1_xml_out.html#a00f883d3f9d60535b06b5ae609dc8831',1,'zen::XmlOut::operator[]()'],['../classzen_1_1_xml_in.html#a9b38167835a28eac9a2297f35f51e53d',1,'zen::XmlIn::operator[]()']]] -]; diff --git a/zenxml/doc/search/functions_70.html b/zenxml/doc/search/functions_70.html deleted file mode 100644 index c62125ed..00000000 --- a/zenxml/doc/search/functions_70.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/zenxml/doc/search/functions_70.js b/zenxml/doc/search/functions_70.js deleted file mode 100644 index b293cd99..00000000 --- a/zenxml/doc/search/functions_70.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['parent',['parent',['../classzen_1_1_xml_element.html#a4af309f59ef09f46a559f1f0e1eac6c1',1,'zen::XmlElement::parent()'],['../classzen_1_1_xml_element.html#a7ba1f26be5629f89ba7648d658f7058c',1,'zen::XmlElement::parent() const ']]], - ['parse',['parse',['../namespacezen.html#a6cf1ec0b57fc1ae9aa95761800e67ec7',1,'zen']]] -]; diff --git a/zenxml/doc/search/functions_72.html b/zenxml/doc/search/functions_72.html deleted file mode 100644 index a4336f7c..00000000 --- a/zenxml/doc/search/functions_72.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/zenxml/doc/search/functions_72.js b/zenxml/doc/search/functions_72.js deleted file mode 100644 index 86b2b142..00000000 --- a/zenxml/doc/search/functions_72.js +++ /dev/null @@ -1,8 +0,0 @@ -var searchData= -[ - ['readstruc',['readStruc',['../namespacezen.html#a2bdcecfe7435ef11cedbce47d4e72ee1',1,'zen']]], - ['readtext',['readText',['../namespacezen.html#acaf85ab94b61882f957afcd355386bff',1,'zen']]], - ['ref',['ref',['../classzen_1_1_xml_out.html#aec117344e8a534382e8d5e76711f97b2',1,'zen::XmlOut']]], - ['removeattribute',['removeAttribute',['../classzen_1_1_xml_element.html#ad9c2ce2e55294c8110825988595e3934',1,'zen::XmlElement']]], - ['root',['root',['../classzen_1_1_xml_doc.html#ad4a9594d93885fc1a12db28e8246648d',1,'zen::XmlDoc::root() const '],['../classzen_1_1_xml_doc.html#a094e156f9d265443e52a527638e88a1e',1,'zen::XmlDoc::root()']]] -]; diff --git a/zenxml/doc/search/functions_73.html b/zenxml/doc/search/functions_73.html deleted file mode 100644 index 774d577f..00000000 --- a/zenxml/doc/search/functions_73.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/zenxml/doc/search/functions_73.js b/zenxml/doc/search/functions_73.js deleted file mode 100644 index a062befe..00000000 --- a/zenxml/doc/search/functions_73.js +++ /dev/null @@ -1,11 +0,0 @@ -var searchData= -[ - ['save',['save',['../namespacezen.html#adeeb6b2318097382ae47aa939fc15d4d',1,'zen']]], - ['savestream',['saveStream',['../namespacezen.html#a4ba7bbaa14a787b07fc13da9145aabe2',1,'zen']]], - ['serialize',['serialize',['../namespacezen.html#afaa4920e275078e6c8009fbdf58b57ee',1,'zen']]], - ['setattribute',['setAttribute',['../classzen_1_1_xml_element.html#a211a6f037c22a54d3facb7a8347a8421',1,'zen::XmlElement']]], - ['setencoding',['setEncoding',['../classzen_1_1_xml_doc.html#a2ae30bca2f490479f58c272148935a62',1,'zen::XmlDoc']]], - ['setstandalone',['setStandalone',['../classzen_1_1_xml_doc.html#a4c92f9b8c1bb47247b827d89794590d4',1,'zen::XmlDoc']]], - ['setvalue',['setValue',['../classzen_1_1_xml_element.html#aaf3a26f6199fc88cce7d9d911ba21b01',1,'zen::XmlElement']]], - ['setversion',['setVersion',['../classzen_1_1_xml_doc.html#ab45914339c476e1da35746f5e00dbc64',1,'zen::XmlDoc']]] -]; diff --git a/zenxml/doc/search/functions_77.html b/zenxml/doc/search/functions_77.html deleted file mode 100644 index 8fe97554..00000000 --- a/zenxml/doc/search/functions_77.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/zenxml/doc/search/functions_77.js b/zenxml/doc/search/functions_77.js deleted file mode 100644 index 5e349623..00000000 --- a/zenxml/doc/search/functions_77.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['writestruc',['writeStruc',['../namespacezen.html#a29ddb823fe0a195f19a64448881b8bf6',1,'zen']]], - ['writetext',['writeText',['../namespacezen.html#a2ce2998296871fc2f4718ceceb22a23f',1,'zen']]] -]; diff --git a/zenxml/doc/search/functions_78.html b/zenxml/doc/search/functions_78.html deleted file mode 100644 index 2b33d25e..00000000 --- a/zenxml/doc/search/functions_78.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/zenxml/doc/search/functions_78.js b/zenxml/doc/search/functions_78.js deleted file mode 100644 index b9817184..00000000 --- a/zenxml/doc/search/functions_78.js +++ /dev/null @@ -1,6 +0,0 @@ -var searchData= -[ - ['xmldoc',['XmlDoc',['../classzen_1_1_xml_doc.html#adbed9c31066d456a9cc8c610f15670ed',1,'zen::XmlDoc::XmlDoc()'],['../classzen_1_1_xml_doc.html#a74ff8434848672fe6483845d04c082df',1,'zen::XmlDoc::XmlDoc(String rootName)']]], - ['xmlin',['XmlIn',['../classzen_1_1_xml_in.html#a5b48c9848e6c631a04cec2477ff85c0f',1,'zen::XmlIn::XmlIn(const XmlDoc &doc)'],['../classzen_1_1_xml_in.html#ae072660cde71fd4695c04d074098b430',1,'zen::XmlIn::XmlIn(const XmlElement *element)'],['../classzen_1_1_xml_in.html#a33de75412df69cb25e0fd8b3bc70c9f8',1,'zen::XmlIn::XmlIn(const XmlElement &element)']]], - ['xmlout',['XmlOut',['../classzen_1_1_xml_out.html#ad8b1ccb8f3d4e7b0ab2598597ea50bcc',1,'zen::XmlOut::XmlOut(XmlDoc &doc)'],['../classzen_1_1_xml_out.html#aa80be3a56f70a58d2730a763166088c0',1,'zen::XmlOut::XmlOut(XmlElement &element)']]] -]; diff --git a/zenxml/doc/search/namespaces_7a.html b/zenxml/doc/search/namespaces_7a.html deleted file mode 100644 index c8f3629d..00000000 --- a/zenxml/doc/search/namespaces_7a.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/zenxml/doc/search/namespaces_7a.js b/zenxml/doc/search/namespaces_7a.js deleted file mode 100644 index 14074229..00000000 --- a/zenxml/doc/search/namespaces_7a.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['zen',['zen',['../namespacezen.html',1,'']]] -]; diff --git a/zenxml/doc/search/search.css b/zenxml/doc/search/search.css index d18c1da8..4d7612ff 100644 --- a/zenxml/doc/search/search.css +++ b/zenxml/doc/search/search.css @@ -48,7 +48,7 @@ height:19px; background:url('search_m.png') repeat-x; border:none; - width:116px; + width:111px; margin-left:20px; padding-left:4px; color: #909090; @@ -236,3 +236,36 @@ DIV.searchresults { margin-left: 10px; margin-right: 10px; } + +/*---------------- External search page results */ + +.searchresult { + background-color: #F0F3F8; +} + +.pages b { + color: white; + padding: 5px 5px 3px 5px; + background-image: url("../tab_a.png"); + background-repeat: repeat-x; + text-shadow: 0 1px 1px #000000; +} + +.pages { + line-height: 17px; + margin-left: 4px; + text-decoration: none; +} + +.hl { + font-weight: bold; +} + +#searchresults { + margin-bottom: 20px; +} + +.searchpages { + margin-top: 10px; +} + diff --git a/zenxml/doc/search/search.js b/zenxml/doc/search/search.js index e2269bf9..281d08b7 100644 --- a/zenxml/doc/search/search.js +++ b/zenxml/doc/search/search.js @@ -7,11 +7,12 @@ var indexSectionsWithContent = { - 0: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000101010100001011101100011010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - 1: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - 2: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - 3: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100010100001011101100011000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - 4: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000001000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" + 0: "aceglnoprswxz", + 1: "x", + 2: "z", + 3: "aeglnoprswx", + 4: "clr", + 5: "o" }; var indexSectionNames = @@ -20,7 +21,8 @@ var indexSectionNames = 1: "classes", 2: "namespaces", 3: "functions", - 4: "variables" + 4: "variables", + 5: "pages" }; function convertToId(search) @@ -30,7 +32,7 @@ function convertToId(search) { var c = search.charAt(i); var cn = c.charCodeAt(0); - if (c.match(/[a-z0-9]/)) + if (c.match(/[a-z0-9\u0080-\uFFFF]/)) { result+=c; } @@ -335,22 +337,20 @@ function SearchBox(name, resultsPath, inFrame, label) var searchValue = this.DOMSearchField().value.replace(/^ +/, ""); var code = searchValue.toLowerCase().charCodeAt(0); - var hexCode; - if (code<16) + var idxChar = searchValue.substr(0, 1).toLowerCase(); + if ( 0xD800 <= code && code <= 0xDBFF && searchValue > 1) // surrogate pair { - hexCode="0"+code.toString(16); - } - else - { - hexCode=code.toString(16); + idxChar = searchValue.substr(0, 2); } var resultsPage; var resultsPageWithSearch; var hasResultsPage; - if (indexSectionsWithContent[this.searchIndex].charAt(code) == '1') + var idx = indexSectionsWithContent[this.searchIndex].indexOf(idxChar); + if (idx!=-1) { + var hexCode=idx.toString(16); resultsPage = this.resultsPath + '/' + indexSectionNames[this.searchIndex] + '_' + hexCode + '.html'; resultsPageWithSearch = resultsPage+'?'+escape(searchValue); hasResultsPage = true; diff --git a/zenxml/doc/search/variables_63.html b/zenxml/doc/search/variables_63.html deleted file mode 100644 index c649c81f..00000000 --- a/zenxml/doc/search/variables_63.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/zenxml/doc/search/variables_63.js b/zenxml/doc/search/variables_63.js deleted file mode 100644 index 3c8f3573..00000000 --- a/zenxml/doc/search/variables_63.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['col',['col',['../structzen_1_1_xml_parsing_error.html#a4a37dc48883337499804a9dc791669fd',1,'zen::XmlParsingError']]] -]; diff --git a/zenxml/doc/search/variables_6c.html b/zenxml/doc/search/variables_6c.html deleted file mode 100644 index 6016f5cc..00000000 --- a/zenxml/doc/search/variables_6c.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/zenxml/doc/search/variables_6c.js b/zenxml/doc/search/variables_6c.js deleted file mode 100644 index e2e327ad..00000000 --- a/zenxml/doc/search/variables_6c.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['lasterror',['lastError',['../structzen_1_1_xml_file_error.html#a4a109e749675a3887af8cfc140303b8f',1,'zen::XmlFileError']]] -]; diff --git a/zenxml/doc/search/variables_72.html b/zenxml/doc/search/variables_72.html deleted file mode 100644 index 29b87f04..00000000 --- a/zenxml/doc/search/variables_72.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/zenxml/doc/search/variables_72.js b/zenxml/doc/search/variables_72.js deleted file mode 100644 index f37305dd..00000000 --- a/zenxml/doc/search/variables_72.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['row',['row',['../structzen_1_1_xml_parsing_error.html#a3ed4cd1b5599df9b52500f620421496e',1,'zen::XmlParsingError']]] -]; diff --git a/zenxml/doc/structzen_1_1_xml_error-members.html b/zenxml/doc/structzen_1_1_xml_error-members.html index cc906ffc..d71a4ab6 100644 --- a/zenxml/doc/structzen_1_1_xml_error-members.html +++ b/zenxml/doc/structzen_1_1_xml_error-members.html @@ -3,46 +3,36 @@ + zen::Xml: Member List - - - - + + - + -
    - - +
    - - - - - -
    zen::Xml -
    Simple C++ XML Processing
    - - + + @@ -51,7 +41,6 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • Main Page
  • Namespaces
  • Classes
  • -
  • Files
  • @@ -83,7 +72,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> - All Classes Namespaces Functions Variables
    + All Classes Namespaces Functions Variables Pages
  • @@ -92,27 +81,25 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    - + +
    zen::XmlError Member List
    -This is the complete list of members for zen::XmlError, including all inherited members. -
    - +

    This is the complete list of members for zen::XmlError, including all inherited members.

    + +
    + - diff --git a/zenxml/doc/structzen_1_1_xml_error.html b/zenxml/doc/structzen_1_1_xml_error.html index d089d6ee..6660274e 100644 --- a/zenxml/doc/structzen_1_1_xml_error.html +++ b/zenxml/doc/structzen_1_1_xml_error.html @@ -3,46 +3,36 @@ + zen::Xml: zen::XmlError Struct Reference - - - - + + - + -
    - - +
    - - - - - -
    zen::Xml -
    Simple C++ XML Processing
    - - + + @@ -51,7 +41,6 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • Main Page
  • Namespaces
  • Classes
  • -
  • Files
  • @@ -83,7 +72,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> - All Classes Namespaces Functions Variables
    + All Classes Namespaces Functions Variables Pages
  • @@ -92,14 +81,14 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    - + +
    +
    zen::XmlError Struct Reference
    @@ -115,22 +104,18 @@ Inheritance diagram for zen::XmlError:
    -zen::XmlFileError -zen::XmlParsingError +zen::XmlFileError +zen::XmlParsingError
    - -

    List of all members.

    -

    Detailed Description

    +

    Detailed Description

    Exception base class for zen::Xml.

    - - + - diff --git a/zenxml/doc/structzen_1_1_xml_error.png b/zenxml/doc/structzen_1_1_xml_error.png index 0fc21923..f1a74bd5 100644 Binary files a/zenxml/doc/structzen_1_1_xml_error.png and b/zenxml/doc/structzen_1_1_xml_error.png differ diff --git a/zenxml/doc/structzen_1_1_xml_file_error-members.html b/zenxml/doc/structzen_1_1_xml_file_error-members.html index 53a1115a..1a545d6b 100644 --- a/zenxml/doc/structzen_1_1_xml_file_error-members.html +++ b/zenxml/doc/structzen_1_1_xml_file_error-members.html @@ -3,46 +3,36 @@ + zen::Xml: Member List - - - - + + - + -
    - - +
    - - - - - -
    zen::Xml -
    Simple C++ XML Processing
    - - + + @@ -51,7 +41,6 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • Main Page
  • Namespaces
  • Classes
  • -
  • Files
  • @@ -83,7 +72,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> - All Classes Namespaces Functions Variables
    + All Classes Namespaces Functions Variables Pages
  • @@ -92,28 +81,26 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    - + +
    zen::XmlFileError Member List
    -This is the complete list of members for zen::XmlFileError, including all inherited members. - -
    lastErrorzen::XmlFileError
    - +

    This is the complete list of members for zen::XmlFileError, including all inherited members.

    + + +
    lastErrorzen::XmlFileError
    + - diff --git a/zenxml/doc/structzen_1_1_xml_file_error.html b/zenxml/doc/structzen_1_1_xml_file_error.html index c7e54c33..4a546151 100644 --- a/zenxml/doc/structzen_1_1_xml_file_error.html +++ b/zenxml/doc/structzen_1_1_xml_file_error.html @@ -3,46 +3,36 @@ + zen::Xml: zen::XmlFileError Struct Reference - - - - + + - + -
    - - +
    - - - - - -
    zen::Xml -
    Simple C++ XML Processing
    - - + + @@ -51,7 +41,6 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • Main Page
  • Namespaces
  • Classes
  • -
  • Files
  • @@ -83,7 +72,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> - All Classes Namespaces Functions Variables
    + All Classes Namespaces Functions Variables Pages
  • @@ -92,16 +81,15 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    - + +
    zen::XmlFileError Struct Reference
    @@ -117,28 +105,25 @@ Inheritance diagram for zen::XmlFileError:
    -zen::XmlError +zen::XmlError
    - -

    List of all members.

    - +

    +

    Public Attributes

    ErrorCode lastError
     Native error code: errno.
     
    -

    Detailed Description

    +

    Detailed Description

    Exception thrown due to failed file I/O.

    - - + - diff --git a/zenxml/doc/structzen_1_1_xml_file_error.png b/zenxml/doc/structzen_1_1_xml_file_error.png index 6393414f..dc28e3bf 100644 Binary files a/zenxml/doc/structzen_1_1_xml_file_error.png and b/zenxml/doc/structzen_1_1_xml_file_error.png differ diff --git a/zenxml/doc/structzen_1_1_xml_parsing_error-members.html b/zenxml/doc/structzen_1_1_xml_parsing_error-members.html index acc507ae..570b20f6 100644 --- a/zenxml/doc/structzen_1_1_xml_parsing_error-members.html +++ b/zenxml/doc/structzen_1_1_xml_parsing_error-members.html @@ -3,46 +3,36 @@ + zen::Xml: Member List - - - - + + - + -
    - - +
    - - - - - -
    zen::Xml -
    Simple C++ XML Processing
    - - + + @@ -51,7 +41,6 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • Main Page
  • Namespaces
  • Classes
  • -
  • Files
  • @@ -83,7 +72,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> - All Classes Namespaces Functions Variables
    + All Classes Namespaces Functions Variables Pages
  • @@ -92,29 +81,27 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    - + +
    zen::XmlParsingError Member List
    -This is the complete list of members for zen::XmlParsingError, including all inherited members. - - -
    colzen::XmlParsingError
    rowzen::XmlParsingError
    - +

    This is the complete list of members for zen::XmlParsingError, including all inherited members.

    + + + +
    colzen::XmlParsingError
    rowzen::XmlParsingError
    + - diff --git a/zenxml/doc/structzen_1_1_xml_parsing_error.html b/zenxml/doc/structzen_1_1_xml_parsing_error.html index bece27d7..a41efc36 100644 --- a/zenxml/doc/structzen_1_1_xml_parsing_error.html +++ b/zenxml/doc/structzen_1_1_xml_parsing_error.html @@ -3,46 +3,36 @@ + zen::Xml: zen::XmlParsingError Struct Reference - - - - + + - + -
    - - +
    - - - - - -
    zen::Xml -
    Simple C++ XML Processing
    - - + + @@ -51,7 +41,6 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • Main Page
  • Namespaces
  • Classes
  • -
  • Files
  • @@ -83,7 +72,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> - All Classes Namespaces Functions Variables
    + All Classes Namespaces Functions Variables Pages
  • @@ -92,16 +81,15 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    - + +
    zen::XmlParsingError Struct Reference
    @@ -117,31 +105,29 @@ Inheritance diagram for zen::XmlParsingError:
    -zen::XmlError +zen::XmlError
    - -

    List of all members.

    - + +

    +

    Public Attributes

    size_t row
     Input file row where the parsing error occured (zero-based)
     
    size_t col
     Input file column where the parsing error occured (zero-based)
     
    -

    Detailed Description

    +

    Detailed Description

    Exception thrown due to an XML parsing error.

    - - + - diff --git a/zenxml/doc/structzen_1_1_xml_parsing_error.png b/zenxml/doc/structzen_1_1_xml_parsing_error.png index f0eb8f79..fc7e6dfa 100644 Binary files a/zenxml/doc/structzen_1_1_xml_parsing_error.png and b/zenxml/doc/structzen_1_1_xml_parsing_error.png differ diff --git a/zenxml/doc/tab_a.png b/zenxml/doc/tab_a.png index 2d99ef23..3b725c41 100644 Binary files a/zenxml/doc/tab_a.png and b/zenxml/doc/tab_a.png differ diff --git a/zenxml/doc/tab_b.png b/zenxml/doc/tab_b.png index b2c3d2be..e2b4a863 100644 Binary files a/zenxml/doc/tab_b.png and b/zenxml/doc/tab_b.png differ diff --git a/zenxml/doc/tab_h.png b/zenxml/doc/tab_h.png index c11f48f1..fd5cb705 100644 Binary files a/zenxml/doc/tab_h.png and b/zenxml/doc/tab_h.png differ diff --git a/zenxml/doc/tab_s.png b/zenxml/doc/tab_s.png index 978943ac..ab478c95 100644 Binary files a/zenxml/doc/tab_s.png and b/zenxml/doc/tab_s.png differ diff --git a/zenxml/doc/tabs.css b/zenxml/doc/tabs.css index 21920562..9cf578f2 100644 --- a/zenxml/doc/tabs.css +++ b/zenxml/doc/tabs.css @@ -3,6 +3,7 @@ width: 100%; z-index: 101; font-size: 13px; + font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; } .tabs2 { diff --git a/zenxml/doc/xml_8h_source.html b/zenxml/doc/xml_8h_source.html index ecdce60a..74d4da9f 100644 --- a/zenxml/doc/xml_8h_source.html +++ b/zenxml/doc/xml_8h_source.html @@ -3,46 +3,36 @@ + zen::Xml: xml.h Source File - - - - + + - + -
    - - +
    - - - - - -
    zen::Xml -
    Simple C++ XML Processing
    - - + + @@ -51,7 +41,6 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • Main Page
  • Namespaces
  • Classes
  • -
  • Files
  • @@ -70,18 +59,12 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • - -
    + All Classes Namespaces Functions Variables Pages
    @@ -90,33 +73,36 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    + +
    xml.h
    -
    00001 // **************************************************************************
    -00002 // * This file is part of the zen::Xml project. It is distributed under the *
    -00003 // * Boost Software License: http://www.boost.org/LICENSE_1_0.txt           *
    -00004 // * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved        *
    -00005 // **************************************************************************
    -00006 
    -00007 #ifndef ZEN_XML_HEADER_349578228034572457454554
    -00008 #define ZEN_XML_HEADER_349578228034572457454554
    -00009 
    -00010 #include "bind.h"
    -00011 
    -00013 namespace zen {}
    -00014 
    -00015 #endif //ZEN_XML_HEADER_349578228034572457454554
    -
    - - +
    1 // **************************************************************************
    +
    2 // * This file is part of the FreeFileSync project. It is distributed under *
    +
    3 // * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
    +
    4 // * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved *
    +
    5 // **************************************************************************
    +
    6 
    +
    7 #ifndef ZEN_XML_HEADER_349578228034572457454554
    +
    8 #define ZEN_XML_HEADER_349578228034572457454554
    +
    9 
    +
    10 #include "bind.h"
    +
    11 
    +
    13 namespace zen {}
    +
    14 
    +
    15 #endif //ZEN_XML_HEADER_349578228034572457454554
    +
    + - -- cgit