Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Public Member Functions | Private Attributes | List of all members
StringManager Class Reference

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...
 

Private Attributes

std::vector< XMLCh * > xml_strings_
 
std::vector< char * > c_strings_
 

Detailed Description

Helper class for XML parsing that handles the memory management for conversions of Xerces strings.

Constructor & Destructor Documentation

Constructor.

Destructor. Destroys the strings in the various lists.

Member Function Documentation

void clear ( )

Frees memory of all owned strings.

XMLCh* convert ( const char *  str) const

Transcode the supplied C string to XMLCh* and take ownership of the XMLCh*.

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.

Member Data Documentation

std::vector<char *> c_strings_
mutableprivate
std::vector<XMLCh *> xml_strings_
mutableprivate

OpenMS / TOPP release 1.11.1 Documentation generated on Thu Nov 14 2013 11:19:38 using doxygen 1.8.5