Version: 9.16.0
SALOME_ResourcesCatalog_Handler.hxx
Go to the documentation of this file.
1// Copyright (C) 2007-2026 CEA, EDF, OPEN CASCADE
2//
3// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5//
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, or (at your option) any later version.
10//
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.
15//
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
19//
20// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21//
22
23// SALOME ResourcesCatalog : implementation of catalog resources parsing (SALOME_ModuleCatalog.idl)
24// File : SALOME_ResourcesCatalog_Handler.hxx
25// Author : Estelle Deville
26// Module : SALOME
27//$Header$
28//
29#ifndef SALOME_RESOURCES_CATALOG_HANDLER
30#define SALOME_RESOURCES_CATALOG_HANDLER
31
32
34
36
37#include <string>
38#include <vector>
39
40#include <libxml/parser.h>
41
43{
44
45 public :
47
48 const MapOfParserResourcesType& GetResourcesAfterParsing() const;
49
51
52 void ProcessXmlDocument(xmlDocPtr theDoc);
53
54 bool ProcessMachine(xmlNodePtr machine_descr, ParserResourcesType & resource);
55 bool ProcessCluster(xmlNodePtr cluster_descr, ParserResourcesType & resource);
56 bool ProcessMember(xmlNodePtr member_descr, ParserResourcesType & resource);
57
58 void PrepareDocToXmlFile(xmlDocPtr theDoc);
59
60 private :
62
64
65 const char *test_machine;
66 const char *test_cluster;
67 const char *test_name;
68 const char *test_hostname;
69 const char *test_type;
70 const char *test_protocol;
72 const char *test_batch;
73 const char *test_mpi;
74 const char *test_user_name;
75 const char *test_appli_path;
78 // for compatibility
79 const char *test_modules;
80 const char *test_module_name;
81 const char *test_components;
83 const char *test_os;
84 const char *test_mem_in_mb;
85 const char *test_cpu_freq_mhz;
86 const char *test_nb_of_nodes;
87 const char *test_nb_of_proc;
89 const char *test_batch_queue;
90 const char *test_user_commands;
91 const char *test_use;
92 const char *test_members;
94
95 const char *test_mode; // To be removed in SALOME 8
96 const char *test_is_cluster_head; // To be removed in SALOME 8
97
98 };
99
100#endif // SALOME_RESOURCES_CATALOG_HANDLER
#define RESOURCESMANAGER_EXPORT
Definition: ResourcesManager_Defs.hxx:33
std::map< std::string, ParserResourcesType > MapOfParserResourcesType
Definition: SALOME_ResourcesCatalog_Parser.hxx:144
Definition: SALOME_ResourcesCatalog_Parser.hxx:90
Definition: SALOME_ResourcesCatalog_Handler.hxx:43
const char * test_nb_of_nodes
Definition: SALOME_ResourcesCatalog_Handler.hxx:86
const char * test_batch_queue
Definition: SALOME_ResourcesCatalog_Handler.hxx:89
const char * test_hostname
Definition: SALOME_ResourcesCatalog_Handler.hxx:68
const char * test_user_name
Definition: SALOME_ResourcesCatalog_Handler.hxx:74
const char * test_machine
Definition: SALOME_ResourcesCatalog_Handler.hxx:65
const char * test_module_name
Definition: SALOME_ResourcesCatalog_Handler.hxx:80
const char * test_working_directory
Definition: SALOME_ResourcesCatalog_Handler.hxx:93
const char * test_name
Definition: SALOME_ResourcesCatalog_Handler.hxx:67
const char * test_cpu_freq_mhz
Definition: SALOME_ResourcesCatalog_Handler.hxx:85
const char * test_appli_path
Definition: SALOME_ResourcesCatalog_Handler.hxx:75
const char * test_os
Definition: SALOME_ResourcesCatalog_Handler.hxx:83
const char * test_is_cluster_head
Definition: SALOME_ResourcesCatalog_Handler.hxx:96
const char * test_cluster
Definition: SALOME_ResourcesCatalog_Handler.hxx:66
const char * test_use
Definition: SALOME_ResourcesCatalog_Handler.hxx:91
const char * test_components
Definition: SALOME_ResourcesCatalog_Handler.hxx:81
const char * test_user_commands
Definition: SALOME_ResourcesCatalog_Handler.hxx:90
const char * test_mem_in_mb
Definition: SALOME_ResourcesCatalog_Handler.hxx:84
const char * test_members
Definition: SALOME_ResourcesCatalog_Handler.hxx:92
const char * test_modules
Definition: SALOME_ResourcesCatalog_Handler.hxx:79
const char * test_component_name
Definition: SALOME_ResourcesCatalog_Handler.hxx:82
const char * test_nb_of_proc
Definition: SALOME_ResourcesCatalog_Handler.hxx:87
const char * test_cluster_internal_protocol
Definition: SALOME_ResourcesCatalog_Handler.hxx:71
const char * test_can_launch_batch_jobs
Definition: SALOME_ResourcesCatalog_Handler.hxx:76
const char * test_protocol
Definition: SALOME_ResourcesCatalog_Handler.hxx:70
const char * test_mode
Definition: SALOME_ResourcesCatalog_Handler.hxx:95
std::string previous_component_name
Definition: SALOME_ResourcesCatalog_Handler.hxx:61
const char * test_can_run_containers
Definition: SALOME_ResourcesCatalog_Handler.hxx:77
const char * test_batch
Definition: SALOME_ResourcesCatalog_Handler.hxx:72
const char * test_type
Definition: SALOME_ResourcesCatalog_Handler.hxx:69
const char * test_nb_of_proc_per_node
Definition: SALOME_ResourcesCatalog_Handler.hxx:88
MapOfParserResourcesType & _resources_list
Definition: SALOME_ResourcesCatalog_Handler.hxx:63
const char * test_mpi
Definition: SALOME_ResourcesCatalog_Handler.hxx:73
xmlNode * xmlNodePtr
Definition: Launcher_XML_Persistence.hxx:34