]> SALOME platform Git repositories - modules/yacs.git/blob - src/runtime/SalomeContainer.hxx
Salome HOME
merge from branch DEV tag mergeto_trunk_04apr08
[modules/yacs.git] / src / runtime / SalomeContainer.hxx
1 #ifndef __SALOMECONTAINER_HXX__
2 #define __SALOMECONTAINER_HXX__
3
4 #include "Container.hxx"
5 #include "Mutex.hxx"
6 #include <string>
7 #include <vector>
8 #include <SALOMEconfig.h>
9 #include CORBA_CLIENT_HEADER(SALOME_Component)
10 #include CORBA_CLIENT_HEADER(SALOME_ContainerManager)
11
12 namespace YACS
13 {
14   namespace ENGINE
15   {
16     class SalomeComponent;
17
18     class SalomeContainer : public Container
19     {
20       friend class SalomeComponent;
21     public:
22       SalomeContainer();
23       SalomeContainer(const SalomeContainer& other);
24       //! For thread safety for concurrent load operation on same Container.
25       void lock();
26       //! For thread safety for concurrent load operation on same Container.
27       void unLock();
28       bool isAlreadyStarted() const;
29       void start() throw (Exception);
30       Container *clone() const;
31       std::string getPlacementId() const;
32       void checkCapabilityToDealWith(const ComponentInstance *inst) const throw (Exception);
33       virtual void setProperty(const std::string& name, const std::string& value);
34       bool isAPaCOContainer() const;
35       virtual void addComponentName(std::string name);
36     protected:
37       virtual ~SalomeContainer();
38     protected:
39       //! thread safety in Salome ???
40       YACS::BASES::Mutex _mutex;
41       Engines::Container_var _trueCont;
42       std::vector<std::string> _componentNames;
43     public:
44       Engines::MachineParameters _params;
45     };
46   }
47 }
48
49 #endif