1 // SALOME ResourcesCatalog : implementation of catalog resources parsing (SALOME_ModuleCatalog.idl)
3 // Copyright (C) 2003 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
24 // File : SALOME_ResourcesCatalog_Parser.hxx
25 // Author : Estelle Deville
29 #ifndef SALOME_RESOURCES_CATALOG_PARSER
30 #define SALOME_RESOURCES_CATALOG_PARSER
37 typedef std::map<std::string, std::string> MapOfModulesPath;
39 enum AccessProtocolType {rsh, ssh};
41 enum AccessModeType {interactive, batch};
43 class ResourceDataToSort
47 std::string _hostName;
48 unsigned int _nbOfNodes;
49 unsigned int _nbOfProcPerNode;
50 unsigned int _CPUFreqMHz;
51 unsigned int _memInMB;
52 static unsigned int _nbOfNodesWanted;
53 static unsigned int _nbOfProcPerNodeWanted;
54 static unsigned int _CPUFreqMHzWanted;
55 static unsigned int _memInMBWanted;
59 ResourceDataToSort(const std::string& hostname,
60 unsigned int nbOfNodes,
61 unsigned int nbOfProcPerNode,
62 unsigned int CPUFreqMHz,
63 unsigned int memInMB);
64 bool operator< (const ResourceDataToSort& other) const;
68 unsigned int GetNumberOfPoints() const;
71 struct ParserResourcesType
73 ResourceDataToSort DataForSort;
75 AccessProtocolType Protocol;
78 std::string AppliPath;
79 MapOfModulesPath ModulesPath;
80 std::string PreReqFilePath;
86 typedef std::map<std::string, ParserResourcesType> MapOfParserResourcesType;
88 #endif //SALOME_RESOURCES_CATALOG_PARSER