Version: 8.3.0
YACS::ENGINE::HomogeneousPoolContainer Class Referenceabstract

#include <HomogeneousPoolContainer.hxx>

Inheritance diagram for YACS::ENGINE::HomogeneousPoolContainer:
Collaboration diagram for YACS::ENGINE::HomogeneousPoolContainer:

Public Member Functions

void attachOnCloning () const
 
void dettachOnCloning () const
 
bool isAttachedOnCloning () const
 
void setAttachOnCloningStatus (bool val) const
 
virtual void setSizeOfPool (int sz)=0
 
virtual int getSizeOfPool () const =0
 
virtual std::size_t getNumberOfFreePlace () const =0
 
virtual void allocateFor (const std::vector< const Task * > &nodes)=0
 
virtual void release (const Task *node)=0
 
- Public Member Functions inherited from YACS::ENGINE::Container
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 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 SIZE_OF_POOL_KEY [] ="SizeOfPool"
 
static const char INITIALIZE_SCRIPT_KEY [] ="InitializeScriptKey"
 
- Static Public Attributes inherited from YACS::ENGINE::Container
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

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

Additional Inherited Members

- Protected Attributes inherited from YACS::ENGINE::Container
std::string _name
 
bool _isAttachedOnCloning
 
Proc_proc
 

Detailed Description

This is an abstract class, that represents a set of fixed number of worker "kernelcontainers" homegenous in the sense that can be used indifferently each other. But each of those worker pool can be used once at a time.

Definition at line 37 of file HomogeneousPoolContainer.hxx.

Constructor & Destructor Documentation

HomogeneousPoolContainer::HomogeneousPoolContainer ( )
protected

Definition at line 57 of file HomogeneousPoolContainer.cxx.

References YACS::ENGINE::Container::_isAttachedOnCloning.

58 {
60 }
HomogeneousPoolContainer::~HomogeneousPoolContainer ( )
protectedvirtual

Definition at line 62 of file HomogeneousPoolContainer.cxx.

63 {
64 }

Member Function Documentation

virtual void YACS::ENGINE::HomogeneousPoolContainer::allocateFor ( const std::vector< const Task * > &  nodes)
pure virtual
void HomogeneousPoolContainer::attachOnCloning ( ) const
virtual

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

Reimplemented from YACS::ENGINE::Container.

Definition at line 29 of file HomogeneousPoolContainer.cxx.

References YACS::ENGINE::Container::_isAttachedOnCloning.

30 {
32 }
void HomogeneousPoolContainer::dettachOnCloning ( ) const
virtual

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

Reimplemented from YACS::ENGINE::Container.

Definition at line 43 of file HomogeneousPoolContainer.cxx.

References YACS::ENGINE::Container::_isAttachedOnCloning.

44 {
46  throw Exception("An HomogeneousPoolContainer cannot be detached on cloning !");
47 }
virtual std::size_t YACS::ENGINE::HomogeneousPoolContainer::getNumberOfFreePlace ( ) const
pure virtual
virtual int YACS::ENGINE::HomogeneousPoolContainer::getSizeOfPool ( ) const
pure virtual
bool HomogeneousPoolContainer::isAttachedOnCloning ( ) const
virtual

By definition an HomogeneousPoolContainer instance is attached on cloning.

Reimplemented from YACS::ENGINE::Container.

Definition at line 52 of file HomogeneousPoolContainer.cxx.

53 {
54  return true;
55 }
virtual void YACS::ENGINE::HomogeneousPoolContainer::release ( const Task node)
pure virtual
void HomogeneousPoolContainer::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 from YACS::ENGINE::Container.

Definition at line 34 of file HomogeneousPoolContainer.cxx.

References YACS::ENGINE::Container::_isAttachedOnCloning.

35 {
37  if(val)
38  return ;
39  else
40  throw Exception("An HomogeneousPoolContainer cannot be detached on cloning #2 !");
41 }
virtual void YACS::ENGINE::HomogeneousPoolContainer::setSizeOfPool ( int  sz)
pure virtual

Member Data Documentation


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