1 | // XmlIOServer |
---|
2 | #include "xmlioserver.hpp" |
---|
3 | |
---|
4 | #include "attribute_template_impl.hpp" |
---|
5 | #include "group_template_impl.hpp" |
---|
6 | |
---|
7 | #include "fake.hpp" |
---|
8 | |
---|
9 | // Point d'entrée du programme principal |
---|
10 | int main(int argc, char ** argv, char ** UNUSED(env)) |
---|
11 | { |
---|
12 | try |
---|
13 | { |
---|
14 | comm::CMPIManager::Initialise(&argc, &argv); // < seulement en mode connecté |
---|
15 | |
---|
16 | /*CTreeManager::ParseFile ("test/iodef_simple_test.xml"); |
---|
17 | |
---|
18 | StdOFStream ofs("data/data.bin"); |
---|
19 | CTreeManager::ToBinary(ofs); |
---|
20 | ofs.close();*/ |
---|
21 | |
---|
22 | StdIFStream ifs("data/data.bin"); |
---|
23 | CTreeManager::FromBinary(ifs); |
---|
24 | ifs.close(); |
---|
25 | |
---|
26 | StdIFStream ifss("data/data.bin"); |
---|
27 | CTreeManager::FromBinary(ifss); |
---|
28 | ifss.close(); |
---|
29 | |
---|
30 | // Sortie de l'arborescence xml sous forme de fichier. |
---|
31 | CTreeManager::PrintTreeToFile("data/def/test.xml"); |
---|
32 | |
---|
33 | |
---|
34 | |
---|
35 | |
---|
36 | |
---|
37 | |
---|
38 | |
---|
39 | |
---|
40 | |
---|
41 | |
---|
42 | /*CXIOSManager::Initialise(CXIOSManager::CLIENT, &argc, &argv); |
---|
43 | CXIOSManager::AddClient("nemo", |
---|
44 | CMPIManager::GetCommSize(CMPIManager::GetCommWorld()), |
---|
45 | CMPIManager::GetCommSize(CMPIManager::GetCommWorld()), |
---|
46 | &nemo_fake_entry); |
---|
47 | CXIOSManager::RunClient(); |
---|
48 | CXIOSManager::Finalize();*/ |
---|
49 | |
---|
50 | comm::CMPIManager::Finalize(); // < seulement en mode connecté |
---|
51 | |
---|
52 | //CXIOSManager::AddClient("orchidee", 1, 1, &orchidee_fake_entry); |
---|
53 | //CXIOSManager::AddClient("lmdz" , 2, 2, &lmdz_fake_entry); |
---|
54 | //CXIOSManager::RunClientServer(); |
---|
55 | |
---|
56 | } |
---|
57 | catch (CException & exc) |
---|
58 | { |
---|
59 | std::cerr << exc.getMessage() << std::endl; |
---|
60 | CMPIManager::Finalize(); |
---|
61 | return (EXIT_FAILURE); |
---|
62 | } |
---|
63 | return (EXIT_SUCCESS); |
---|
64 | } |
---|
65 | |
---|