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 | StdOFStream ofs_("data/data_domain.bin"); |
---|
23 | CTreeManager::DomainsToBinary(ofs_); |
---|
24 | ofs_.close();*/ |
---|
25 | |
---|
26 | StdIFStream ifs("data/data.bin"); |
---|
27 | CTreeManager::FromBinary(ifs); |
---|
28 | ifs.close(); |
---|
29 | |
---|
30 | StdIFStream ifss("data/data_domain.bin"); |
---|
31 | CTreeManager::DomainsFromBinary(ifss); |
---|
32 | ifss.close(); |
---|
33 | |
---|
34 | // Sortie de l'arborescence xml sous forme de fichier. |
---|
35 | CTreeManager::PrintTreeToFile("data/def/test.xml"); |
---|
36 | |
---|
37 | |
---|
38 | |
---|
39 | |
---|
40 | |
---|
41 | |
---|
42 | |
---|
43 | |
---|
44 | |
---|
45 | |
---|
46 | /*CXIOSManager::Initialise(CXIOSManager::CLIENT, &argc, &argv); |
---|
47 | CXIOSManager::AddClient("nemo", |
---|
48 | CMPIManager::GetCommSize(CMPIManager::GetCommWorld()), |
---|
49 | CMPIManager::GetCommSize(CMPIManager::GetCommWorld()), |
---|
50 | &nemo_fake_entry); |
---|
51 | CXIOSManager::RunClient(); |
---|
52 | CXIOSManager::Finalize();*/ |
---|
53 | |
---|
54 | comm::CMPIManager::Finalize(); // < seulement en mode connecté |
---|
55 | |
---|
56 | //CXIOSManager::AddClient("orchidee", 1, 1, &orchidee_fake_entry); |
---|
57 | //CXIOSManager::AddClient("lmdz" , 2, 2, &lmdz_fake_entry); |
---|
58 | //CXIOSManager::RunClientServer(); |
---|
59 | |
---|
60 | } |
---|
61 | catch (CException & exc) |
---|
62 | { |
---|
63 | std::cerr << exc.getMessage() << std::endl; |
---|
64 | CMPIManager::Finalize(); |
---|
65 | return (EXIT_FAILURE); |
---|
66 | } |
---|
67 | return (EXIT_SUCCESS); |
---|
68 | } |
---|
69 | |
---|