Helper class for XML parsing that handles the memory management for conversions of Xerces strings. More...
#include <OpenMS/FORMAT/HANDLERS/XMLHandler.h>
Public Member Functions | |
StringManager () | |
Constructor. More... | |
~StringManager () | |
Destructor. Destroys the strings in the various lists. More... | |
void | clear () |
Frees memory of all owned strings. More... | |
XMLCh * | convert (const char *str) const |
Transcode the supplied C string to XMLCh* and take ownership of the XMLCh*. More... | |
XMLCh * | convert (const std::string &str) const |
Transcode the supplied C++ string to XMLCh* and take ownership of the XMLCh*. More... | |
XMLCh * | convert (const String &str) const |
Transcode the supplied OpenMS string to XMLCh* and take ownership of the XMLCh*. More... | |
char * | convert (const XMLCh *str) const |
Transcode the supplied XMLCh* to a C string and take ownership of the C string. More... | |
Static Public Member Functions | |
static void | appendASCII (const XMLCh *str, const XMLSize_t length, String &result) |
Transcodes the supplied XMLCh* and appends it to the OpenMS String. More... | |
Private Attributes | |
std::vector< XMLCh * > | xml_strings_ |
std::vector< char * > | c_strings_ |
Helper class for XML parsing that handles the memory management for conversions of Xerces strings.
StringManager | ( | ) |
Constructor.
~StringManager | ( | ) |
Destructor. Destroys the strings in the various lists.
|
static |
Transcodes the supplied XMLCh* and appends it to the OpenMS String.
Referenced by MzXMLHandler< MapType >::characters(), and MzMLHandler< MapType >::characters().
void clear | ( | ) |
Frees memory of all owned strings.
Referenced by MzDataHandler< MapType >::endElement(), MzXMLHandler< MapType >::endElement(), and MzMLHandler< MapType >::endElement().
XMLCh* convert | ( | const char * | str | ) | const |
Transcode the supplied C string to XMLCh* and take ownership of the XMLCh*.
Referenced by XMLHandler::attributeAsDouble_(), XMLHandler::attributeAsInt_(), XMLHandler::attributeAsString_(), MzDataHandler< MapType >::characters(), MzXMLHandler< MapType >::characters(), MzMLHandler< MapType >::characters(), XMLHandler::optionalAttributeAsDouble_(), XMLHandler::optionalAttributeAsDoubleList_(), XMLHandler::optionalAttributeAsInt_(), XMLHandler::optionalAttributeAsIntList_(), XMLHandler::optionalAttributeAsString_(), XMLHandler::optionalAttributeAsStringList_(), XMLHandler::optionalAttributeAsUInt_(), MzDataHandler< MapType >::startElement(), MzXMLHandler< MapType >::startElement(), and MzMLHandler< MapType >::startElement().
XMLCh* convert | ( | const std::string & | str | ) | const |
Transcode the supplied C++ string to XMLCh* and take ownership of the XMLCh*.
XMLCh* convert | ( | const String & | str | ) | const |
Transcode the supplied OpenMS string to XMLCh* and take ownership of the XMLCh*.
char* convert | ( | const XMLCh * | str | ) | const |
Transcode the supplied XMLCh* to a C string and take ownership of the C string.
|
mutableprivate |
|
mutableprivate |
OpenMS / TOPP release 2.0.0 | Documentation generated on Tue Nov 1 2016 16:34:46 using doxygen 1.8.11 |