1 #ifndef __CONTAINER_HXX__
2 #define __CONTAINER_HXX__
4 #include "Exception.hxx"
5 #include "RefCounter.hxx"
14 class ComponentInstance;
16 * This is an abstract class, that represents an abstract process in which ComponentInstances can be launched and run.
18 class Container : public RefCounter
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 std::map<std::string,std::string> getProperties() { return _propertyMap; };
39 virtual void setProperties(std::map<std::string,std::string> properties);
40 std::string getName() const { return _name; };
41 //! \b WARNING ! name is used in edition to identify different containers, it is not the runtime name of the container
42 void setName(std::string name) { _name = name; };
45 mutable bool _isAttachedOnCloning;
46 std::map<std::string,std::string> _propertyMap;