Salome HOME
copy tag mergefrom_BR_V0_1_CC_Salome_04oct07
[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 <SALOMEconfig.h>
7 #include CORBA_CLIENT_HEADER(SALOME_Component)
8
9 namespace YACS
10 {
11   namespace ENGINE
12   {
13     class SalomeComponent;
14
15     class SalomeContainer : public Container
16     {
17       friend class SalomeComponent;
18     public:
19       SalomeContainer();
20       SalomeContainer(const SalomeContainer& other);
21       //! For thread safety for concurrent load operation on same Container.
22       void lock();
23       //! For thread safety for concurrent load operation on same Container.
24       void unLock();
25       bool isAlreadyStarted() const;
26       void start() throw (Exception);
27       Container *clone() const;
28       std::string getPlacementId() const;
29       void checkCapabilityToDealWith(const ComponentInstance *inst) const throw (Exception);
30     protected:
31       virtual ~SalomeContainer();
32     protected:
33       //! thread safety in Salome ???
34       YACS::BASES::Mutex _mutex;
35       Engines::Container_var _trueCont;
36     };
37   }
38 }
39
40 #endif