Version: 9.16.0
SalomeContainer.hxx
Go to the documentation of this file.
1// Copyright (C) 2006-2026 CEA, EDF
2//
3// This library is free software; you can redistribute it and/or
4// modify it under the terms of the GNU Lesser General Public
5// License as published by the Free Software Foundation; either
6// version 2.1 of the License, or (at your option) any later version.
7//
8// This library is distributed in the hope that it will be useful,
9// but WITHOUT ANY WARRANTY; without even the implied warranty of
10// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11// Lesser General Public License for more details.
12//
13// You should have received a copy of the GNU Lesser General Public
14// License along with this library; if not, write to the Free Software
15// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16//
17// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18//
19
20#ifndef __SALOMECONTAINER_HXX__
21#define __SALOMECONTAINER_HXX__
22
24#include "Container.hxx"
27#include "Mutex.hxx"
28#include <string>
29#include <vector>
30#include CORBA_CLIENT_HEADER(SALOME_Component)
31
32namespace YACS
33{
34 namespace ENGINE
35 {
36 class SalomeComponent;
37
39 {
40 friend class SalomeComponent;
41 public:
43 SalomeContainer(const SalomeContainer& other);
44#ifndef SWIG
45 SalomeContainer(const Container& other, const SalomeContainerTools& sct, const SalomeContainerHelper *lmt, const std::vector<std::string>& componentNames, int shutdownLev);
46#endif
48 void lock();
50 void unLock();
51 std::string getKind() const;
52 bool isAlreadyStarted(const Task *askingNode) const;
53 Engines::Container_ptr getContainerPtr(const Task *askingNode) const;
54 void start(const Task *askingNode) override;
55 void start(const Task *askingNode,
56 const std::string& resource_name,
57 const std::string& container_name) override;
58 bool canAcceptImposedResource() override;
59 Container *clone() const;
60 Container *cloneAlways() const;
61 std::string getPlacementId(const Task *askingNode) const;
62 std::string getFullPlacementId(const Task *askingNode) const;
63 void checkCapabilityToDealWith(const ComponentInstance *inst) const ;
64 void setProperty(const std::string& name, const std::string& value);
65 std::string getProperty(const std::string& name) const;
66 void clearProperties();
67 void addComponentName(const std::string& name);
68 void addToResourceList(const std::string& name);
69 virtual CORBA::Object_ptr loadComponent(Task *inst);
70 void shutdown(int level);
71 // Helper methods
72 std::map<std::string,std::string> getResourceProperties(const std::string& name) const;
73 std::map<std::string,std::string> getProperties() const;
74 static const char KIND[];
75 static const char TYPE_PROPERTY_STR[];
76 protected:
77#ifndef SWIG
78 virtual ~SalomeContainer();
79#endif
80 protected:
82 YACS::BASES::Mutex _mutex;
83 std::vector<std::string> _componentNames;
87 };
88 }
89}
90
91#endif
#define YACSRUNTIMESALOME_EXPORT
Base class for all component instances.
Class for Salome component instance.
std::vector< std::string > _componentNames
SalomeContainerHelper * _launchModeType
YACS::BASES::Mutex _mutex
thread safety in Salome ???