#include #include #include #include #include #include #ifndef _JILSTREAMXML_H_ #define _JILSTREAMXML_H_ #include class JILStreamXML: public JILStream { public: JILStreamXML(string filename="", string mode="w"){ tabs[0] = 0; this->filename = filename; if(mode == "r")JILStreamInit(STREAM_INPUT); else if(mode == "w")JILStreamInit(STREAM_OUTPUT); else{ cerr<<"Unknown mode for JILStreamXML \""<"<"< so we convert them into // curly brackets here {} const char* JILtypeid2nameXML(const std::type_info *t){ static string str; str = JILtypeid2name(t); for(unsigned int i=0;i')str[i] = '}'; if(str[i] == '<')str[i] = '{'; } return str.c_str(); } // Atomic types. All atomic types (plus strings) are // explicitly defined. JILStreamXML& operator<<(short i){(*xmlout)<"<"<"<"<"<"<"<"<"<"<0)tabs[strlen(tabs)-1] =0; if(names.size()>0){ string s = *names.begin(); names.pop_front(); (*xmlout)<"<0)tabs[strlen(tabs)-1] =0; (*xmlout)<"<0)tabs[strlen(tabs)-1] =0; (*xmlout)<"<0)tabs[strlen(tabs)-1] =0; (*xmlout)<"<0)tabs[strlen(tabs)-1] =0; (*xmlout)<"<0)tabs[strlen(tabs)-1] =0; (*xmlout)<"<"<"<"<"<"< names; }; #endif //_JILSTREAMXML_H_