00001
00002 #ifndef MiX_XMLSTRING_H_
00003 #define MiX_XMLSTRING_H_
00004
00005
00006
00007
00008
00009
00010
00011
00012 #include <string>
00013 #include <iostream>
00014
00015 #include "config.h"
00016
00017 namespace MiX{
00018
00019 template <class charT,class char_traits,class xml_traits>
00020 class XMLString
00021 : public std::basic_string<charT,char_traits>{
00022 typedef std::basic_string<charT,char_traits> super_type;
00023 typedef XMLString<charT,char_traits,xml_traits> this_type;
00024 public:
00026 explicit XMLString() : super_type() { };
00028 XMLString(const this_type& str) : super_type(str){ };
00030 XMLString(const charT* s,size_t n) : super_type(s,n){ };
00032 XMLString(const charT* s) : super_type(s){ };
00034 XMLString(size_t n, char c) : super_type(n,c){ };
00036 XMLString(const super_type& src) : super_type(src){ };
00037 };
00039 template <class charT,class char_traits,class xml_traits>
00040 std::ostream& operator<<(std::ostream& os,const XMLString<charT,char_traits,xml_traits>& src) {
00041 os << src.c_str() ; return os;
00042 }
00043 }
00044
00045
00046 #endif