Changeset 105 for XMLIO_V2/dev/dev_rv
- Timestamp:
- 06/08/10 15:43:19 (14 years ago)
- Location:
- XMLIO_V2/dev/dev_rv/src/XMLIO
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
XMLIO_V2/dev/dev_rv/src/XMLIO/context.hpp
r104 r105 24 24 friend ostream& operator<< (ostream& out, const Context& c) 25 25 { 26 out << "<" << c.getName()<< " id=\"" << c.getId() << "\">";27 if(c.fieldDef != NULL) out << std::endl <<*(FieldGroup*)c.fieldDef << std::endl;28 out << "</" << c.getName()<< ">";26 out << IncIndent << "<" << c.getName()<< " id=\"" << c.getId() << "\">" << std::endl; 27 if(c.fieldDef != NULL) out << *(FieldGroup*)c.fieldDef << std::endl; 28 out << NIndent << "</" << c.getName()<< ">" << DecEndl; 29 29 return (out); 30 30 } … … 33 33 { 34 34 // Résolution des héritages descendants pour chacun des groupes de définitions. 35 fieldDef->resolveDescInheritance();35 if(fieldDef != NULL) fieldDef->resolveDescInheritance(); 36 36 } 37 37 … … 99 99 100 100 ~Context() 101 { delete fieldDef; }101 { if(fieldDef != NULL) delete fieldDef; } 102 102 103 103 -
XMLIO_V2/dev/dev_rv/src/XMLIO/field.hpp
r104 r105 18 18 friend ostream& operator<< (ostream& out, const Field& c) 19 19 { 20 out << "<" << c.getName();20 out << IncIndent << "<" << c.getName(); 21 21 if(c.hasId()) out << " id=\"" << c.getId() << "\""; 22 22 for(unsigned int i = 0; i < c.attrList.getVectorSize(); i++) out << *c.attrList.getVector()[i]; 23 out << "/>" ;23 out << "/>" << DecEndl; 24 24 25 25 return (out); -
XMLIO_V2/dev/dev_rv/src/XMLIO/field_group.hpp
r104 r105 26 26 } 27 27 28 const char* getName(void) const {return ("Field Group"); }28 const char* getName(void) const {return ("Field_Group"); } 29 29 30 30 friend ostream& operator<< (ostream& out, const FieldGroup& c) 31 31 { 32 out << "<" << c.getName();32 out << IncIndent << "<" << c.getName(); 33 33 if(c.hasId()) out << " id=\"" << c.getId() << "\""; 34 34 for(unsigned int i = 0; i < c.attrList.getVectorSize(); i++) out << *c.attrList.getVector()[i]; 35 35 out << ">" << std::endl; 36 36 37 37 38 for(unsigned int i = 0; i < c.groupList.getVector().size() ; i++) … … 41 42 out << *(c.childList.getVector()[i]) << std::endl; 42 43 43 out << "</" << c.getName()<< ">";44 out << NIndent << "</" << c.getName()<< ">" << DecEndl; 44 45 return (out); 45 46 } -
XMLIO_V2/dev/dev_rv/src/XMLIO/main_cpp.cpp
r104 r105 11 11 try 12 12 { 13 string file("/local/ testsuite/iodef_test.xml");13 string file("/local/svn/dev_rv/test/iodef_test.xml"); 14 14 ifstream istr( file.c_str() , ifstream::in ); 15 15 … … 31 31 32 32 } 33 catch(const XMLIOException &exc)33 catch(const Exception &exc) 34 34 { // Pour tout type d'exceptions, on note les informations sur la sortie paramétrée. 35 35 ERROR(exc.displayText()); -
XMLIO_V2/dev/dev_rv/src/XMLIO/xmlio_logger.hpp
r104 r105 51 51 // Initialisation de la classe de Logging 52 52 static ILogger LOGGER("xmlio.log"); 53 54 static unsigned int Indent; 55 56 std::ostream& NIndent(std::ostream& out) 57 { for(unsigned int i = 0; i < Indent; i++) out << " "; return(out); } 58 59 std::ostream& IncIndent(std::ostream& out) 60 { Indent++; return (NIndent(out)); } 61 62 std::ostream& DecEndl(std::ostream& out) 63 { Indent--; return (NIndent(out)); } 53 64 54 65 /************* POUR MEMOIRE ********************** -
XMLIO_V2/dev/dev_rv/src/XMLIO/xmlio_xml_parser.hpp
r104 r105 60 60 static void ShowTree(ostream& os = std::clog) 61 61 { 62 clog << "<?xml version=\"1.0\"?>" << std::endl << "<Simulation>" << std::endl; 62 clog << "<?xml version=\"1.0\"?>" << std::endl; 63 clog << "<Simulation>" << std::endl; 63 64 HashMap<string, StrHashMap<Context> > &AllListContext = Context::GetAllListObject(); 64 65
Note: See TracChangeset
for help on using the changeset viewer.