CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC4_patch1/src/PhysicsTools/MVATrainer/interface/XMLSimpleStr.h

Go to the documentation of this file.
00001 #ifndef PhysicsTools_MVATrainer_XMLSimpleStr_h
00002 #define PhysicsTools_MVATrainer_XMLSimpleStr_h
00003 
00004 #include <string>
00005 
00006 #include <xercesc/util/XMLString.hpp>
00007 #include <xercesc/util/XMLUni.hpp>
00008 
00009 class XMLSimpleStr {
00010     public:
00011         XMLSimpleStr(const XMLCh *str) :
00012                 string(XERCES_CPP_NAMESPACE_QUALIFIER XMLString::transcode(str))
00013         {}
00014 
00015         ~XMLSimpleStr()
00016         { XERCES_CPP_NAMESPACE_QUALIFIER XMLString::release(&string); }
00017 
00018         operator const char *() const
00019         { return string; }
00020 
00021         operator std::string() const
00022         { return string; }
00023 
00024     private:
00025         char    *string;
00026 };
00027 
00028 #endif // PhysicsTools_MVATrainer_XMLSimpleStr_h