source: XMLIO_V2/dev/trunk/trunk/src/XMLIO/main_cpp.cpp @ 76

Last change on this file since 76 was 76, checked in by ymipsl, 12 years ago

import xmlio version dev/trunk

  • Property svn:eol-style set to native
File size: 915 bytes
Line 
1#include "field_attribut.hpp"
2#include "field.hpp"
3#include "group_template.hpp"
4#include "xmlio_std.hpp"
5
6
7extern "C" void main_c_(void) ;
8
9 
10void main_c_(void)
11{
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}
Note: See TracBrowser for help on using the repository browser.