Version: 8.3.0
YACS::ENGINE::Container Class Referenceabstract

#include <Container.hxx>

Inheritance diagram for YACS::ENGINE::Container:
Collaboration diagram for YACS::ENGINE::Container:

Public Member Functions

virtual std::string getKind () const =0
 
virtual std::string getDiscreminantStrOfThis (const Task *askingNode) const
 
virtual bool isAlreadyStarted (const Task *askingNode) const =0
 
virtual void start (const Task *askingNode)=0 throw (Exception)
 
virtual std::string getPlacementId (const Task *askingNode) const =0
 
virtual std::string getFullPlacementId (const Task *askingNode) const =0
 
virtual void setAttachOnCloningStatus (bool val) const
 
virtual void attachOnCloning () const
 
virtual void dettachOnCloning () const
 
virtual bool isAttachedOnCloning () const
 
virtual void lock ()=0
 
virtual void unLock ()=0
 
virtual Containerclone () const =0
 WARNING ! clone behaviour MUST be in coherence with what is returned by isAttachedOnCloning() method More...
 
virtual ContainercloneAlways () const =0
 
virtual bool isSupportingRTODefNbOfComp () const
 
virtual void checkCapabilityToDealWith (const ComponentInstance *inst) const =0 throw (Exception)
 
virtual void setProperty (const std::string &name, const std::string &value)=0
 
virtual std::string getProperty (const std::string &name) const =0
 
virtual void clearProperties ()=0
 
virtual void addComponentName (const std::string &name)=0
 
virtual std::map< std::string,
std::string > 
getProperties () const =0
 
virtual std::map< std::string,
std::string > 
getResourceProperties (const std::string &name) const =0
 
virtual void setProperties (const std::map< std::string, std::string > &properties)
 
std::string getName () const
 
void setName (std::string name)
 WARNING ! name is used in edition to identify different containers, it is not the runtime name of the container More...
 
void setProc (Proc *proc)
 
ProcgetProc ()
 
virtual void shutdown (int level)=0
 
- Public Member Functions inherited from YACS::ENGINE::RefCounter
unsigned int getRefCnt () const
 
void incrRef () const
 
bool decrRef ()
 

Static Public Attributes

static const char KIND_ENTRY [] ="container_kind"
 
static const char AOC_ENTRY [] ="attached_on_cloning"
 
- Static Public Attributes inherited from YACS::ENGINE::RefCounter
static unsigned int _totalCnt =0
 

Protected Member Functions

 Container ()
 
virtual ~Container ()
 
- Protected Member Functions inherited from YACS::ENGINE::RefCounter
 RefCounter ()
 
 RefCounter (const RefCounter &other)
 
virtual ~RefCounter ()
 

Protected Attributes

std::string _name
 
bool _isAttachedOnCloning
 
Proc_proc
 
- Protected Attributes inherited from YACS::ENGINE::RefCounter
unsigned int _cnt
 

Detailed Description

This is an abstract class, that represents an abstract process in which ComponentInstances can be launched and run. An instance of this will be mapped to one and only one physical container (except in the foreach context)

Definition at line 41 of file Container.hxx.

Constructor & Destructor Documentation

Container::Container ( )
protected

Definition at line 35 of file Container.cxx.

35  :_isAttachedOnCloning(false),_proc(0)
36 {
37 }
Container::~Container ( )
protectedvirtual

Definition at line 39 of file Container.cxx.

40 {
41 }

Member Function Documentation

virtual void YACS::ENGINE::Container::addComponentName ( const std::string &  name)
pure virtual
void Container::attachOnCloning ( ) const
virtual

By calling this method the current container 'this' is not destined to be deeply copied on clone call.

Reimplemented in YACS::ENGINE::HomogeneousPoolContainer.

Definition at line 62 of file Container.cxx.

References _isAttachedOnCloning.

63 {
65 }
virtual void YACS::ENGINE::Container::checkCapabilityToDealWith ( const ComponentInstance inst) const throw (Exception)
pure virtual
virtual void YACS::ENGINE::Container::clearProperties ( )
pure virtual
virtual Container* YACS::ENGINE::Container::cloneAlways ( ) const
pure virtual
void Container::dettachOnCloning ( ) const
virtual

By calling this method the current container 'this' will be deeply copied on clone call.

Reimplemented in YACS::ENGINE::HomogeneousPoolContainer.

Definition at line 70 of file Container.cxx.

References _isAttachedOnCloning.

71 {
73 }
std::string Container::getDiscreminantStrOfThis ( const Task askingNode) const
virtual

Reimplemented in YACS::ENGINE::SalomeHPContainer, and YACS::ENGINE::SalomeContainerTmpForHP.

Definition at line 43 of file Container.cxx.

Referenced by YACS::ENGINE::SalomeContainerTools::getNotNullContainerName().

44 {
45  const void *ptr(this);
46  std::ostringstream oss; oss << ptr;
47  return oss.str();
48 }
virtual std::string YACS::ENGINE::Container::getFullPlacementId ( const Task askingNode) const
pure virtual
virtual std::string YACS::ENGINE::Container::getKind ( ) const
pure virtual
virtual std::string YACS::ENGINE::Container::getPlacementId ( const Task askingNode) const
pure virtual
Proc* YACS::ENGINE::Container::getProc ( )
inline

Definition at line 79 of file Container.hxx.

Referenced by YACS::ENGINE::SalomeContainerTools::CreateComponentInstance().

79 { return _proc; }
virtual std::string YACS::ENGINE::Container::getProperty ( const std::string &  name) const
pure virtual
virtual std::map<std::string,std::string> YACS::ENGINE::Container::getResourceProperties ( const std::string &  name) const
pure virtual
bool Container::isSupportingRTODefNbOfComp ( ) const
virtual

This method informs about the capability of the container to deal with CT an unpredictably number of components. By default : True

Definition at line 84 of file Container.cxx.

85 {
86  return true;
87 }
virtual void YACS::ENGINE::Container::lock ( )
pure virtual
void Container::setAttachOnCloningStatus ( bool  val) const
virtual

If val is equal to true the current container 'this' is not destined to be deeply copied on clone call. If val is equal to false the current container 'this' is destined to be deeply copied on clone call.

Reimplemented in YACS::ENGINE::HomogeneousPoolContainer.

Definition at line 54 of file Container.cxx.

References _isAttachedOnCloning.

Referenced by FormContainer::onModifyAOC(), and YACS::ENGINE::SalomeContainer::setProperty().

55 {
57 }
void YACS::ENGINE::Container::setName ( std::string  name)
inline

WARNING ! name is used in edition to identify different containers, it is not the runtime name of the container

Definition at line 77 of file Container.hxx.

Referenced by YACS::ENGINE::Proc::createContainer(), YACS::servertypeParser< T >::loadcontainer(), and YACS::HMI::CommandAddContainerBase::localExecute().

77 { _name = name; }
void YACS::ENGINE::Container::setProc ( Proc proc)
inline
void Container::setProperties ( const std::map< std::string, std::string > &  properties)
virtual

Definition at line 89 of file Container.cxx.

References setProperty().

Referenced by YACS::HMI::CommandAddContainerBase::localExecute(), YACS::HMI::CommandSetContainerProperties::localExecute(), and YACS::HMI::CommandSetContainerProperties::localReverse().

90 {
91  for (std::map<std::string,std::string>::const_iterator it=properties.begin();it!=properties.end();++it)
92  setProperty((*it).first,(*it).second);
93 }
virtual void YACS::ENGINE::Container::setProperty ( const std::string &  name,
const std::string &  value 
)
pure virtual
virtual void YACS::ENGINE::Container::unLock ( )
pure virtual

Member Data Documentation

std::string YACS::ENGINE::Container::_name
protected

Definition at line 84 of file Container.hxx.

Referenced by YACS::ENGINE::SalomeContainer::shutdown().

Proc* YACS::ENGINE::Container::_proc
protected

Definition at line 86 of file Container.hxx.

const char Container::KIND_ENTRY ="container_kind"
static

The documentation for this class was generated from the following files: