Salome HOME
copy tag mergefrom_BR_V0_1_CC_Salome_04oct07
[modules/yacs.git] / src / engine / Container.hxx
1 #ifndef __CONTAINER_HXX__
2 #define __CONTAINER_HXX__
3
4 #include "Exception.hxx"
5 #include "RefCounter.hxx"
6
7 #include <list>
8 #include <map>
9
10 namespace YACS
11 {
12   namespace ENGINE
13   {
14     class ComponentInstance;
15     /*!
16      * This is an abstract class, that represents an abstract process in which ComponentInstances can be launched and run.
17      */
18     class Container : public RefCounter
19     {
20     protected:
21       Container();
22       virtual ~Container();
23     public:
24       //Execution only methods
25       virtual bool isAlreadyStarted() const = 0;
26       virtual void start() throw(Exception) = 0;
27       virtual std::string getPlacementId() const = 0;
28       //Edition only methods
29       virtual void attachOnCloning() const;
30       virtual void dettachOnCloning() const;
31       bool isAttachedOnCloning() const;
32       //! \b WARNING ! clone behaviour \b MUST be in coherence with what is returned by isAttachedOnCloning() method
33       virtual Container *clone() const = 0;
34       virtual bool isSupportingRTODefNbOfComp() const;
35       virtual void checkCapabilityToDealWith(const ComponentInstance *inst) const throw(Exception) = 0;
36       virtual void setProperty(const std::string& name,const std::string& value);
37       virtual std::string getProperty(const std::string& name);
38     protected:
39       mutable bool _isAttachedOnCloning;
40       std::map<std::string,std::string> _propertyMap;
41     };
42   }
43 }
44
45 #endif