1 // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 // SALOME ResourcesCatalog : implementation of catalog resources parsing (SALOME_ModuleCatalog.idl)
24 // File : SALOME_ResourcesCatalog_Handler.hxx
25 // Author : Estelle Deville
29 #ifndef SALOME_RESOURCES_CATALOG_HANDLER
30 #define SALOME_RESOURCES_CATALOG_HANDLER
33 #include "ResourcesManager_Defs.hxx"
35 #include "SALOME_ResourcesCatalog_Parser.hxx"
40 #include <libxml/parser.h>
42 class RESOURCESMANAGER_EXPORT SALOME_ResourcesCatalog_Handler
46 SALOME_ResourcesCatalog_Handler(MapOfParserResourcesType& resources_list);
48 const MapOfParserResourcesType& GetResourcesAfterParsing() const;
50 virtual ~SALOME_ResourcesCatalog_Handler();
52 void ProcessXmlDocument(xmlDocPtr theDoc);
54 bool ProcessMachine(xmlNodePtr machine_descr, ParserResourcesType & resource);
55 bool ProcessCluster(xmlNodePtr cluster_descr, ParserResourcesType & resource);
56 bool ProcessMember(xmlNodePtr member_descr, ParserResourcesClusterMembersType & resource);
58 void PrepareDocToXmlFile(xmlDocPtr theDoc);
61 std::string previous_component_name;
63 ParserResourcesType _resource;
64 MapOfParserResourcesType& _resources_list;
66 const char *test_machine;
67 const char *test_cluster;
68 const char *test_name;
69 const char *test_hostname;
70 const char *test_protocol;
71 const char *test_cluster_internal_protocol;
72 const char *test_mode;
73 const char *test_batch;
75 const char *test_user_name;
76 const char *test_appli_path;
78 const char *test_modules;
79 const char *test_module_name;
80 const char *test_components;
81 const char *test_component_name;
83 const char *test_mem_in_mb;
84 const char *test_cpu_freq_mhz;
85 const char *test_nb_of_nodes;
86 const char *test_nb_of_proc;
87 const char *test_nb_of_proc_per_node;
88 const char *test_batch_queue;
89 const char *test_user_commands;
91 const char *test_members;
92 const char *test_is_cluster_head;
93 const char *test_working_directory;
97 #endif // SALOME_RESOURCES_CATALOG_HANDLER