Base class for all component instances. More...
#include <ComponentInstance.hxx>
Public Member Functions | |
ComponentInstance (const std::string &name) | |
ComponentInstance (const ComponentInstance &other) | |
const std::string & | getCompoName () const |
const std::string & | getInstanceName () const |
void | setName (const std::string &name) |
virtual void | setAnonymous (bool anon) |
virtual bool | isAnonymous () |
int | getNumId () const |
virtual bool | setContainer (Container *cont) |
Container * | getContainer () const |
virtual void | load (Task *askingNode)=0 |
Load the component instance. More... | |
virtual void | unload (Task *askingNode)=0 |
Unload the component instance. More... | |
virtual bool | isLoaded (Task *askingNode) const =0 |
Indicate if the component instance is loaded (true) or not. More... | |
virtual void | attachOnCloning () const |
virtual void | dettachOnCloning () const |
bool | isAttachedOnCloning () const |
virtual std::string | getFileRepr () const |
For dump in file. More... | |
virtual ServiceNode * | createNode (const std::string &name)=0 |
virtual ComponentInstance * | clone () const =0 |
virtual ComponentInstance * | cloneAlways () const =0 |
virtual std::string | getKind () const |
Return the component kind. More... | |
virtual std::string | getKindForNode () const |
virtual void | shutdown (int level) |
Public Member Functions inherited from YACS::ENGINE::PropertyInterface | |
virtual | ~PropertyInterface () |
virtual void | setProperty (const std::string &name, const std::string &value) |
virtual std::string | getProperty (const std::string &name) |
Get a property value given its name. More... | |
std::map< std::string, std::string > | getProperties () const |
virtual void | setProperties (std::map< std::string, std::string > properties) |
Public Member Functions inherited from YACS::ENGINE::RefCounter | |
unsigned int | getRefCnt () const |
void | incrRef () const |
bool | decrRef () |
Static Public Attributes | |
static const char | KIND [] ="" |
Static Public Attributes inherited from YACS::ENGINE::RefCounter | |
static unsigned int | _totalCnt =0 |
Protected Member Functions | |
virtual | ~ComponentInstance () |
Protected Member Functions inherited from YACS::ENGINE::RefCounter | |
RefCounter () | |
RefCounter (const RefCounter &other) | |
virtual | ~RefCounter () |
Protected Attributes | |
std::string | _compoName |
WARNING : _compoName identify only the component type. More... | |
std::string | _instanceName |
WARNING : _InstanceName has a strong semantic. It discriminates ComponentInstance instances each other. More... | |
int | _numId |
Container * | _container |
bool | _isAttachedOnCloning |
bool | _anonymous |
Protected Attributes inherited from YACS::ENGINE::PropertyInterface | |
std::map< std::string, std::string > | _propertyMap |
Protected Attributes inherited from YACS::ENGINE::RefCounter | |
unsigned int | _cnt |
Static Protected Attributes | |
static const char | NULL_FILE_REPR [] ="No repr specified for ComponentInstance" |
static int | _total = 0 |
Base class for all component instances.
This is an abstract class that must be specialized in runtime. Specialized classes must provide implementation for loading of a component (load method) unloading (unload method) and an information method (isLoaded) about the state of the component
A component instance is used by one or more ServiceNode to execute services of this component instance
Definition at line 38 of file ComponentInstance.hxx.
|
protectedvirtual |
Definition at line 87 of file ComponentInstance.cxx.
References _container, and YACS::ENGINE::RefCounter::decrRef().
ComponentInstance::ComponentInstance | ( | const std::string & | name | ) |
Definition at line 66 of file ComponentInstance.cxx.
References _compoName, _instanceName, _numId, and _total.
ComponentInstance::ComponentInstance | ( | const ComponentInstance & | other | ) |
Definition at line 74 of file ComponentInstance.cxx.
References _compoName, _container, _instanceName, _numId, _total, and YACS::ENGINE::Container::clone().
|
virtual |
By calling this method the current container 'this' is not destined to be deeply copied on clone call.
Definition at line 96 of file ComponentInstance.cxx.
References _isAttachedOnCloning.
|
pure virtual |
Implemented in YACS::ENGINE::CppComponent, YACS::ENGINE::CORBAComponent, YACS::ENGINE::SalomeComponent, YACS::ENGINE::SalomeHPComponent, and YACS::ENGINE::SalomePythonComponent.
Referenced by YACS::ENGINE::DynParaLoop::cloneAndPlaceNodesCoherently(), YACS::ENGINE::ServiceNode::performDuplicationOfPlacement(), and YACS::ENGINE::ComposedNode::performDuplicationOfPlacement().
|
pure virtual |
|
pure virtual |
|
virtual |
By calling this method the current container 'this' will be deeply copied on clone call.
Definition at line 110 of file ComponentInstance.cxx.
References _isAttachedOnCloning.
|
inline |
Definition at line 45 of file ComponentInstance.hxx.
Referenced by YACS::ENGINE::Proc::addComponentInstance(), YACS::ENGINE::SalomeContainerTools::CreateComponentInstance(), YACS::HMI::GuiEditor::CreateComponentInstance(), YACS::HMI::EditionSalomeNode::fillComponentPanel(), YACS::ENGINE::SalomeHPComponent::getFileRepr(), YACS::ENGINE::CORBAComponent::getFileRepr(), YACS::ENGINE::SalomeComponent::getFileRepr(), YACS::HMI::SubjectComponent::getKey(), YACS::ENGINE::CORBAComponent::load(), YACS::HMI::CommandAddNodeFromCatalog::localExecute(), YACS::HMI::GenericGui::onSelectComponentInstance(), YACS::HMI::SubjectNode::registerUndoDestroy(), YACS::ENGINE::ServiceNode::setComponent(), YACS::HMI::SubjectServiceNode::setComponent(), YACS::ENGINE::LocalContainer::unregisterComponentInstance(), YACS::ENGINE::Proc::updateContainersAndComponents(), and YACS::ENGINE::VisitorSaveSchema::writeComponentInstances().
|
inline |
Definition at line 52 of file ComponentInstance.hxx.
Referenced by YACS::HMI::SchemaDirContainersItem::addComponentItem(), YACS::HMI::EditionSalomeNode::changeContainer(), YACS::HMI::GuiEditor::CreateComponentInstance(), YACS::HMI::EditionComponent::fillContainerPanel(), YACS::HMI::EditionSalomeNode::fillContainerPanel(), YACS::ENGINE::DeploymentTreeOnHeap::getComponentsLinkedToContainer(), YACS::ENGINE::ServiceNode::getContainer(), YACS::HMI::SubjectComponent::localclean(), YACS::HMI::CommandAssociateComponentToContainer::localExecute(), YACS::HMI::CommandAssociateServiceToComponent::localExecute(), YACS::HMI::EditionSalomeNode::onCancel(), YACS::HMI::SubjectNode::registerUndoDestroy(), YACS::HMI::SubjectServiceNode::setComponent(), YACS::HMI::SubjectComponent::setContainer(), YACS::ENGINE::VisitorSaveSchema::visitServiceNode(), and YACS::ENGINE::VisitorSaveSchema::writeComponentInstances().
|
virtual |
For dump in file.
Reimplemented in YACS::ENGINE::CORBAComponent, YACS::ENGINE::SalomeComponent, YACS::ENGINE::SalomeHPComponent, and YACS::ENGINE::SalomePythonComponent.
Definition at line 102 of file ComponentInstance.cxx.
References NULL_FILE_REPR.
Referenced by YACS::ENGINE::VisitorSaveSchema::visitServiceInlineNode(), and YACS::ENGINE::VisitorSaveSchema::visitServiceNode().
|
inline |
Definition at line 46 of file ComponentInstance.hxx.
Referenced by YACS::HMI::SubjectProc::addSubjectComponent(), YACS::HMI::SubjectComponent::associateToContainer(), YACS::HMI::EditionSalomeNode::fillComponentPanel(), YACS::HMI::SubjectComponent::getName(), YACS::HMI::CommandAddNodeFromCatalog::localExecute(), YACS::HMI::CommandAddComponentInstance::localExecute(), YACS::HMI::CommandAddComponentFromCatalog::localExecute(), YACS::HMI::SubjectNode::registerUndoDestroy(), YACS::ENGINE::Proc::removeComponentInstance(), YACS::HMI::SubjectServiceNode::setComponent(), YACS::ENGINE::VisitorSaveSchema::visitServiceNode(), YACS::ENGINE::VisitorSaveSchema::writeComponentInstances(), and YACS::HMI::SubjectComponent::~SubjectComponent().
|
virtual |
Return the component kind.
A runtime can provide several implementations of a component instance. Each implementation has a different kind. A ComponentInstance can be associated to a ServiceNode is they have the same kind.
Reimplemented in YACS::ENGINE::CppComponent, YACS::ENGINE::SalomeComponent, YACS::ENGINE::CORBAComponent, YACS::ENGINE::SalomeHPComponent, and YACS::ENGINE::SalomePythonComponent.
Definition at line 126 of file ComponentInstance.cxx.
References KIND.
|
virtual |
Reimplemented in YACS::ENGINE::CppComponent, YACS::ENGINE::SalomeComponent, YACS::ENGINE::CORBAComponent, and YACS::ENGINE::SalomeHPComponent.
Definition at line 131 of file ComponentInstance.cxx.
References KIND.
|
inline |
Definition at line 50 of file ComponentInstance.hxx.
Referenced by YACS::HMI::SubjectComponent::getKey().
|
inlinevirtual |
Definition at line 49 of file ComponentInstance.hxx.
Referenced by YACS::HMI::CommandSetComponentInstanceProperties::localExecute(), YACS::ENGINE::VisitorSaveSchema::visitServiceNode(), and YACS::ENGINE::VisitorSaveSchema::writeComponentInstances().
bool ComponentInstance::isAttachedOnCloning | ( | ) | const |
Definition at line 115 of file ComponentInstance.cxx.
References _isAttachedOnCloning.
|
pure virtual |
Indicate if the component instance is loaded (true) or not.
Implemented in YACS::ENGINE::CppComponent, YACS::ENGINE::CORBAComponent, YACS::ENGINE::SalomeComponent, YACS::ENGINE::SalomeHPComponent, and YACS::ENGINE::SalomePythonComponent.
Referenced by YACS::ENGINE::ServiceNode::load().
|
pure virtual |
Load the component instance.
Implemented in YACS::ENGINE::CppComponent, YACS::ENGINE::CORBAComponent, YACS::ENGINE::SalomeComponent, YACS::ENGINE::SalomeHPComponent, and YACS::ENGINE::SalomePythonComponent.
Referenced by YACS::ENGINE::ServiceNode::load().
|
inlinevirtual |
Definition at line 48 of file ComponentInstance.hxx.
Referenced by YACS::ENGINE::Proc::addComponentInstance(), YACS::HMI::CommandSetComponentInstanceProperties::localExecute(), and YACS::HMI::CommandSetComponentInstanceProperties::localReverse().
|
virtual |
Reimplemented in YACS::ENGINE::SalomeComponent, and YACS::ENGINE::SalomeHPComponent.
Definition at line 52 of file ComponentInstance.cxx.
References YACS::ENGINE::Container::checkCapabilityToDealWith(), and YACS::ENGINE::RefCounter::incrRef().
Referenced by YACS::ENGINE::DynParaLoop::cloneAndPlaceNodesCoherently(), YACS::proctypeParser< T >::componentinstance(), YACS::HMI::CommandAddComponentInstance::localExecute(), YACS::HMI::CommandAssociateComponentToContainer::localExecute(), YACS::HMI::CommandAssociateComponentToContainer::localReverse(), YACS::HMI::CommandAssociateServiceToComponent::localReverse(), YACS::ENGINE::ComposedNode::performDuplicationOfPlacement(), YACS::ENGINE::ComposedNode::performShallowDuplicationOfPlacement(), YACS::HMI::SubjectServiceNode::setComponent(), YACS::ENGINE::SalomeHPComponent::setContainer(), and YACS::ENGINE::SalomeComponent::setContainer().
|
inline |
Definition at line 47 of file ComponentInstance.hxx.
Referenced by YACS::ENGINE::Proc::addComponentInstance(), and YACS::HMI::CommandAssociateServiceToComponent::localReverse().
|
virtual |
Reimplemented in YACS::ENGINE::SalomeComponent, and YACS::ENGINE::SalomeHPComponent.
Definition at line 136 of file ComponentInstance.cxx.
Referenced by YACS::ENGINE::SalomeNode::shutdown().
|
pure virtual |
Unload the component instance.
Implemented in YACS::ENGINE::CppComponent, YACS::ENGINE::CORBAComponent, YACS::ENGINE::SalomeComponent, YACS::ENGINE::SalomeHPComponent, and YACS::ENGINE::SalomePythonComponent.
|
protected |
Definition at line 81 of file ComponentInstance.hxx.
|
protected |
WARNING : _compoName identify only the component type.
Definition at line 72 of file ComponentInstance.hxx.
Referenced by ComponentInstance(), YACS::ENGINE::SalomeComponent::load(), YACS::ENGINE::CppComponent::load(), YACS::ENGINE::SalomeHPComponent::setContainer(), and YACS::ENGINE::SalomeComponent::setContainer().
|
protected |
Definition at line 76 of file ComponentInstance.hxx.
Referenced by ComponentInstance(), YACS::ENGINE::CppComponent::CppComponent(), YACS::ENGINE::SalomePythonComponent::getStringValueToExportInInterp(), YACS::ENGINE::SalomePythonComponent::isLoaded(), YACS::ENGINE::SalomePythonComponent::load(), YACS::ENGINE::SalomeHPComponent::load(), YACS::ENGINE::SalomeComponent::load(), YACS::ENGINE::CppComponent::load(), YACS::ENGINE::SalomeHPComponent::setContainer(), YACS::ENGINE::SalomeComponent::setContainer(), YACS::ENGINE::SalomeHPComponent::shutdown(), YACS::ENGINE::SalomeComponent::shutdown(), ~ComponentInstance(), and YACS::ENGINE::CppComponent::~CppComponent().
|
protected |
WARNING : _InstanceName has a strong semantic. It discriminates ComponentInstance instances each other.
Definition at line 74 of file ComponentInstance.hxx.
Referenced by ComponentInstance().
|
mutableprotected |
Definition at line 77 of file ComponentInstance.hxx.
Referenced by attachOnCloning(), YACS::ENGINE::SalomePythonComponent::clone(), YACS::ENGINE::SalomeHPComponent::clone(), YACS::ENGINE::SalomeComponent::clone(), YACS::ENGINE::CppComponent::clone(), dettachOnCloning(), and isAttachedOnCloning().
|
protected |
Definition at line 75 of file ComponentInstance.hxx.
Referenced by ComponentInstance().
|
staticprotected |
Definition at line 80 of file ComponentInstance.hxx.
Referenced by ComponentInstance().
|
static |
Definition at line 68 of file ComponentInstance.hxx.
Referenced by getKind(), and getKindForNode().
|
staticprotected |
Definition at line 79 of file ComponentInstance.hxx.
Referenced by getFileRepr().