Salome HOME
projects
/
modules
/
kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'eap/23514'
[modules/kernel.git]
/
src
/
ResourcesManager
/
ResourcesManager.hxx
diff --git
a/src/ResourcesManager/ResourcesManager.hxx
b/src/ResourcesManager/ResourcesManager.hxx
index 50a651786e894c6b90c0a73e2dd3f0d4daa062d5..5e8c54d664fd388bb3aac7c4bd9a29863a5a75e7 100644
(file)
--- a/
src/ResourcesManager/ResourcesManager.hxx
+++ b/
src/ResourcesManager/ResourcesManager.hxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-201
4
CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-201
6
CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@
-48,8
+48,10
@@
// in a critical section to be sure to be clean.
// Only one thread should use the SALOME_ResourcesManager class in a SALOME
// session.
// in a critical section to be sure to be clean.
// Only one thread should use the SALOME_ResourcesManager class in a SALOME
// session.
-struct resourceParams
+struct
RESOURCESMANAGER_EXPORT
resourceParams
{
{
+ resourceParams();
+
std::string name;
std::string hostname;
bool can_launch_batch_jobs;
std::string name;
std::string hostname;
bool can_launch_batch_jobs;
@@
-64,14
+66,6
@@
struct resourceParams
std::vector<std::string> resourceList;
};
std::vector<std::string> resourceList;
};
-class RESOURCESMANAGER_EXPORT ResourcesException
-{
-public:
- const std::string msg;
-
- ResourcesException(const std::string m) : msg(m) {}
-};
-
class RESOURCESMANAGER_EXPORT ResourcesManager_cpp
{
class RESOURCESMANAGER_EXPORT ResourcesManager_cpp
{
@@
-85,8
+79,7
@@
class RESOURCESMANAGER_EXPORT ResourcesManager_cpp
std::vector<std::string>
GetFittingResources(const resourceParams& params) throw(ResourcesException);
std::vector<std::string>
GetFittingResources(const resourceParams& params) throw(ResourcesException);
- std::string Find(const std::string& policy,
- const std::vector<std::string>& listOfResources);
+ std::string Find(const std::string& policy, const std::vector<std::string>& listOfResources) const;
void AddResourceInCatalog (const ParserResourcesType & new_resource);
void AddResourceInCatalog (const ParserResourcesType & new_resource);
@@
-98,7
+91,8
@@
class RESOURCESMANAGER_EXPORT ResourcesManager_cpp
const MapOfParserResourcesType& GetList() const;
const MapOfParserResourcesType& GetList() const;
- ParserResourcesType GetResourcesDescr(const std::string & name);
+ //! thread safe
+ ParserResourcesType GetResourcesDescr(const std::string & name) const;
protected:
protected:
@@
-112,11
+106,11
@@
class RESOURCESMANAGER_EXPORT ResourcesManager_cpp
*/
void AddDefaultResourceInCatalog();
*/
void AddDefaultResourceInCatalog();
- //! will contain the path to the res
s
ources catalog
+ //! will contain the path to the resources catalog
std::list<std::string> _path_resources;
std::list<std::string>::iterator _path_resources_it;
std::list<std::string> _path_resources;
std::list<std::string>::iterator _path_resources_it;
- //! will contain the information
s
on the data type catalog(after parsing)
+ //! will contain the information on the data type catalog(after parsing)
MapOfParserResourcesType _resourcesList;
//! a map that contains all the available load rate managers (the key is the name)
MapOfParserResourcesType _resourcesList;
//! a map that contains all the available load rate managers (the key is the name)