Last change
on this file since 107 was
107,
checked in by hozdoba, 14 years ago
|
Commit intermédiaire ...
Remontée de plusieurs fonctionnalités dans l'arbre des héritages.
Amélioration de la lisibilité du code.
etc.
|
-
Property svn:eol-style set to
native
|
File size:
1.7 KB
|
Line | |
---|
1 | #include "xmlio.hpp" |
---|
2 | |
---|
3 | using namespace XMLIOSERVER; |
---|
4 | using namespace XMLIOSERVER::XML; |
---|
5 | using namespace std; |
---|
6 | |
---|
7 | extern "C" void main_c_(void) ; |
---|
8 | |
---|
9 | void main_c_ (void) |
---|
10 | { |
---|
11 | try |
---|
12 | { |
---|
13 | string file("/local/XMLIOSERVER_DEV/dev_rv/test/iodef_test.xml"); |
---|
14 | |
---|
15 | //string file("/local/XMLIOSERVER_DEV/dev_rv/iodef_test.xml"); |
---|
16 | ifstream istr( file.c_str() , ifstream::in ); |
---|
17 | |
---|
18 | // On commence la lecture du flux de donnée xml qui doit posséder pour racine un unique noeud nommé "simulation". |
---|
19 | XMLNode node = XMLNode::CreateNode(istr, "simulation"); |
---|
20 | // On parse le fichier xml noeud par noeud (ie on construit dynamiquement notre arbre d'objets). |
---|
21 | XMLParser::Parse(node); |
---|
22 | |
---|
23 | // On résoud les héritages descendants ainsi que les héritages par référence. |
---|
24 | Context::ResolveInheritance(); |
---|
25 | |
---|
26 | // On poursuit le traitement ... |
---|
27 | |
---|
28 | // On écrit l'arborescence resultante du traitement sur la sortie. |
---|
29 | Context::ShowTree(std::clog); |
---|
30 | |
---|
31 | /*std::clog << "Nombre de Contexts listés : " << Context::GetCurrentListObject().getSize() << " contre 1 attendus."<< std::endl; |
---|
32 | std::clog << "Nombre de FieldGroups listés : " << FieldGroup::GetCurrentListObject().getSize() << " contre 5 attendus."<< std::endl; |
---|
33 | std::clog << "Description du champs votkeavt : " << Field::GetObject("votkeavt").axis_ref << " contre \"Vertical Eddy Diffusivity\" attendus."<< std::endl;*/ |
---|
34 | |
---|
35 | } |
---|
36 | catch(const Exception &exc) |
---|
37 | { // Pour tout type d'exceptions, on note les informations sur la sortie paramétrée. |
---|
38 | ERROR(exc.displayText()); |
---|
39 | // On retourne le code d'erreur en fin d'application pour traitements éventuels. |
---|
40 | // return (exc.code()); |
---|
41 | } |
---|
42 | |
---|
43 | // return (0); |
---|
44 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.