20 #ifndef XERCESC_HELPERS_H_
21 #define XERCESC_HELPERS_H_
23 #include <xercesc/dom/DOM.hpp>
24 #include <xercesc/sax/SAXParseException.hpp>
72 friend std::ostream& operator<< (std::ostream& ost, SafeXTString<T>& data) { ost << data.stringPtr;
return ost;}
T * operator->()
Returns the pointer stored in this SafeXRes object.
Definition: xercesc_helpers.h:114
SafeXTString(T *ptr)
Generates a new SafeXTString with the specified (transcoded) string pointer as content.
Definition: xercesc_helpers.h:43
SafeXTString< T > & operator=(T *data)
Replaces the content of this container object with the given content.
Definition: xercesc_helpers.h:63
T * stringPtr
This pointer represent a string transcoded by Xercesc.
Definition: xercesc_helpers.h:79
T * getContent()
Returns the content stored in this SafeXRes object.
Definition: xercesc_helpers.h:108
T * resPtr
This pointer represent a releasable Xerces resource.
Definition: xercesc_helpers.h:121
virtual ~SafeXRes()
Destroys this SafeXRes object.
Definition: xercesc_helpers.h:101
This template provides a container which automatically release a given Xerces resource, when the pointer runs out of scope.
Definition: xercesc_helpers.h:88
std::string generateXerxesErrorMessage(const xercesc::XMLException &e)
Generates and returns a string representing the error message in the given exception.
Definition: xercesc_helpers.cpp:26
This template provides a container which automatically releases a transcoded string, when the pointer runs out of scope.
Definition: xercesc_helpers.h:35
T * getContent()
Returns the content stored in this SafeXTString object.
Definition: xercesc_helpers.h:55
SafeXRes(T *ptr)
Generates a new SafeXRes with the specified resource pointer as content.
Definition: xercesc_helpers.h:96
virtual ~SafeXTString()
Destroys this SafeXTString object.
Definition: xercesc_helpers.h:48