Changeset 98 for XMLIO_V2/dev/trunk/src/XMLIO/main_cpp.cpp
- Timestamp:
- 06/04/10 16:18:34 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XMLIO_V2/dev/trunk/src/XMLIO/main_cpp.cpp
r79 r98 1 #include "field_attribut.hpp" 2 #include "field.hpp" 3 #include "group_template.hpp" 4 #include "xmlio_std.hpp" 1 #include "xmlio.hpp" 5 2 3 using namespace XMLIOSERVER; 4 using namespace XMLIOSERVER::XML; 5 using namespace std; 6 6 7 7 extern "C" void main_c_(void) ; 8 8 9 10 void main_c_(void) 9 void main_c_ (void) 11 10 { 12 try 13 { 14 group<Field>* FirstGroup=new group<Field>("1") ; 15 group<Field> * MyGroup=FirstGroup->getNewGroup("group"); 16 Field* MyField=MyGroup->getNewChild("toto") ; 17 MyField->setAttribut("name",string("titi")) ; 18 MyField->setAttribut("level",10) ; 19 20 MyField=MyGroup->getNewChild("tata") ; 21 MyField->setAttribut("name",string("tutu")) ; 22 MyField->setAttribut("level",25) ; 23 24 MyField=MyGroup->getOrAppendChild("tete") ; 25 MyField->setAttribut("level",1) ; 26 27 MyField=MyGroup->getChild("toto") ; 28 MyField->setAttribut("level",11) ; 29 30 MyField->level=1 ; 31 32 FirstGroup->Print() ; 33 StdOut<<iendl; 34 StdOut<<"This is the end"<<iendl ; 35 } 36 catch(ex_error x) 37 { 38 StdOut<<x.what<<endl ; 39 } 40 } 11 try 12 { 13 XMLParser::CLASS_TEST(); 14 // Code à executer ici 15 } 16 catch(const XMLIOException &exc) 17 { // Pour tout type d'exceptions, on note les informations sur la sortie paramétrée. 18 ERROR(exc.displayText()); 19 // On retourne le code d'erreur en fin d'application pour traitements éventuels. 20 // return (exc.code()); 21 } 22 23 // return (0); 24 }
Note: See TracChangeset
for help on using the changeset viewer.