#include <CppComponent.hxx>
Public Member Functions | |
CppComponent (const std::string &name) | |
CppComponent constructor. More... | |
CppComponent (void *obj, RunFunction r, TerminateFunction t, const std::string &name) | |
CppComponent (const CppComponent &other) | |
CppComponent copy constructor. More... | |
virtual | ~CppComponent () |
void | run (const char *service, int nbIn, int nbOut, Any **argIn, Any **argOut) throw (YACS::Exception) |
virtual std::string | getKind () const |
Return the component kind. More... | |
virtual std::string | getKindForNode () const |
virtual void | load (Task *askingNode) |
Load the component instance. More... | |
virtual void | unload (Task *askingNode) |
Unload the component. More... | |
virtual bool | isLoaded (Task *askingNode) const |
Is the component instance already loaded ? More... | |
virtual ServiceNode * | createNode (const std::string &name) |
virtual YACS::ENGINE::ComponentInstance * | clone () const |
Clone the component instance. More... | |
virtual YACS::ENGINE::ComponentInstance * | cloneAlways () const |
Public Member Functions inherited from YACS::ENGINE::ComponentInstance | |
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 | attachOnCloning () const |
virtual void | dettachOnCloning () const |
bool | isAttachedOnCloning () const |
virtual std::string | getFileRepr () const |
For dump in file. More... | |
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 [] = "Cpp" |
Static Public Attributes inherited from YACS::ENGINE::ComponentInstance | |
static const char | KIND [] ="" |
Static Public Attributes inherited from YACS::ENGINE::RefCounter | |
static unsigned int | _totalCnt =0 |
Protected Attributes | |
void * | __obj |
YACS::ENGINE::RunFunction | __run |
YACS::ENGINE::TerminateFunction | __terminate |
Protected Attributes inherited from YACS::ENGINE::ComponentInstance | |
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 |
Additional Inherited Members | |
Protected Member Functions inherited from YACS::ENGINE::ComponentInstance | |
virtual | ~ComponentInstance () |
Static Protected Attributes inherited from YACS::ENGINE::ComponentInstance | |
static const char | NULL_FILE_REPR [] ="No repr specified for ComponentInstance" |
static int | _total = 0 |
Definition at line 44 of file CppComponent.hxx.
CppComponent::CppComponent | ( | const std::string & | name | ) |
CppComponent constructor.
Definition at line 86 of file CppComponent.cxx.
References YACS::ENGINE::ComponentInstance::_container, YACS::ENGINE::Runtime::createContainer(), YACS::ENGINE::getRuntime(), and YACS::ENGINE::CppNode::KIND.
Referenced by clone(), and cloneAlways().
|
inline |
Definition at line 48 of file CppComponent.hxx.
CppComponent::CppComponent | ( | const CppComponent & | other | ) |
CppComponent copy constructor.
Definition at line 97 of file CppComponent.cxx.
References YACS::ENGINE::ComponentInstance::_container, YACS::ENGINE::Runtime::createContainer(), YACS::ENGINE::getRuntime(), and YACS::ENGINE::CppNode::KIND.
|
virtual |
Definition at line 107 of file CppComponent.cxx.
References __obj, __terminate, YACS::ENGINE::ComponentInstance::_container, and DEBTRACE.
|
virtual |
Clone the component instance.
Implements YACS::ENGINE::ComponentInstance.
Definition at line 215 of file CppComponent.cxx.
References YACS::ENGINE::ComponentInstance::_isAttachedOnCloning, CppComponent(), and YACS::ENGINE::RefCounter::incrRef().
|
virtual |
Implements YACS::ENGINE::ComponentInstance.
Definition at line 226 of file CppComponent.cxx.
References CppComponent().
|
virtual |
Implements YACS::ENGINE::ComponentInstance.
Definition at line 207 of file CppComponent.cxx.
References YACS::ENGINE::ServiceNode::setComponent().
|
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 from YACS::ENGINE::ComponentInstance.
Definition at line 75 of file CppComponent.cxx.
References KIND.
|
virtual |
Reimplemented from YACS::ENGINE::ComponentInstance.
Definition at line 80 of file CppComponent.cxx.
References KIND.
|
virtual |
Is the component instance already loaded ?
Implements YACS::ENGINE::ComponentInstance.
Definition at line 160 of file CppComponent.cxx.
References __obj.
|
virtual |
Load the component instance.
Implements YACS::ENGINE::ComponentInstance.
Definition at line 165 of file CppComponent.cxx.
References __obj, __run, __terminate, YACS::ENGINE::ComponentInstance::_compoName, YACS::ENGINE::ComponentInstance::_container, YACS::ENGINE::Runtime::createContainer(), YACS::ENGINE::CppContainer::createInternalInstance(), YACS::ENGINE::getRuntime(), YACS::ENGINE::Container::isAlreadyStarted(), YACS::ENGINE::CppNode::KIND, YACS::ENGINE::CppContainer::loadComponentLibrary(), YACS::ENGINE::CppContainer::lock(), YACS::ENGINE::Container::start(), and YACS::ENGINE::CppContainer::unLock().
void CppComponent::run | ( | const char * | service, |
int | nbIn, | ||
int | nbOut, | ||
Any ** | argIn, | ||
Any ** | argOut | ||
) | throw (YACS::Exception) |
Definition at line 115 of file CppComponent.cxx.
References YACS::ENGINE::returnInfo::code, DEBTRACE, CORBAEngineTest::i, and YACS::ENGINE::returnInfo::message.
Referenced by YACS::ENGINE::CppNode::execute().
|
virtual |
Unload the component.
Implements YACS::ENGINE::ComponentInstance.
Definition at line 153 of file CppComponent.cxx.
References DEBTRACE.
|
protected |
Definition at line 69 of file CppComponent.hxx.
Referenced by isLoaded(), load(), and ~CppComponent().
|
protected |
Definition at line 70 of file CppComponent.hxx.
Referenced by load().
|
protected |
Definition at line 71 of file CppComponent.hxx.
Referenced by load(), and ~CppComponent().
|
static |
Definition at line 57 of file CppComponent.hxx.
Referenced by YACS::ENGINE::CppContainer::checkCapabilityToDealWith(), getKind(), and getKindForNode().