NEOCCA bindings Specification
0.2.8
|
"neo.cca.BuilderService": the BuilderService. More...
#include <BuilderService.hh>
Public Member Functions | |
virtual | ~BuilderService () |
virtual neo::cca::ComponentID_shared | createInstance (const ::std::string &instanceName, const ::std::string &className,::neo::cca::TypeMap_shared properties)=0 throw ( ::neo::cca::Exception ) |
Creates an instance of a CCA component of the type defined by the string className. | |
virtual neo::cca::ComponentID_shared | createInstance (const ::std::string &instanceName, const ::std::string &className)=0 throw ( ::neo::cca::Exception ) |
Convenience function, for those with no interesting properties to put in. | |
virtual ::std::vector < neo::cca::ComponentID_shared > | getComponentIDs ()=0 throw ( ::neo::cca::Exception ) |
Get component list. | |
virtual ::neo::cca::TypeMap_shared | getComponentProperties (neo::cca::ComponentID_shared cid)=0 throw ( ::neo::cca::Exception ) |
Get property map for component. | |
virtual void | setComponentProperties (neo::cca::ComponentID_shared cid,::neo::cca::TypeMap_shared map)=0 throw ( ::neo::cca::Exception ) |
Causes the framework implementation to associate the given properties with the component designated by cid. | |
virtual neo::cca::ComponentID_shared | getDeserialization (const ::std::string &s)=0 throw ( ::neo::cca::Exception ) |
Get component id from stringified reference. | |
virtual neo::cca::ComponentID_shared | getComponentID (const ::std::string &componentInstanceName)=0 throw ( ::neo::cca::Exception ) |
Get id from name by which it was created. | |
virtual void | destroyInstance (neo::cca::ComponentID_shared toDie, float timeout)=0 throw ( ::neo::cca::Exception ) |
Eliminate the Component instance, from the scope of the framework. | |
virtual ::std::vector < ::std::string > | getProvidedPortNames (neo::cca::ComponentID_shared cid)=0 throw ( ::neo::cca::Exception ) |
Get the names of Port instances provided by the identified component. | |
virtual ::std::vector < ::std::string > | getUsedPortNames (neo::cca::ComponentID_shared cid)=0 throw ( ::neo::cca::Exception ) |
Get the names of Port instances used by the identified component. | |
virtual ::neo::cca::TypeMap_shared | getPortProperties (neo::cca::ComponentID_shared cid, const ::std::string &portname)=0 throw ( ::neo::cca::Exception ) |
Fetch map of Port properties exposed by the framework. | |
virtual void | setPortProperties (neo::cca::ComponentID_shared cid, const ::std::string &portname,::neo::cca::TypeMap_shared map)=0 throw ( ::neo::cca::Exception ) |
Associates the properties given in map with the Port indicated by portname. | |
virtual neo::cca::ConnectionID_shared | connect (neo::cca::ComponentID_shared user, const ::std::string &usingPortName, neo::cca::ComponentID_shared provider, const ::std::string &providingPortName)=0 throw ( ::neo::cca::Exception ) |
Creates a connection between ports on component user and component provider. | |
virtual ::std::vector < neo::cca::ConnectionID_shared > | getConnectionIDs (::std::vector< neo::cca::ComponentID_shared > &componentList)=0 throw ( ::neo::cca::Exception ) |
Returns a list of connections as an array of handles. | |
virtual ::neo::cca::TypeMap_shared | getConnectionProperties (neo::cca::ConnectionID_shared &connID)=0 throw ( ::neo::cca::Exception ) |
Fetch property map of a connection. | |
virtual void | setConnectionProperties (neo::cca::ConnectionID_shared &connID,::neo::cca::TypeMap_shared map)=0 throw ( ::neo::cca::Exception ) |
Associates the properties with the connection. | |
virtual void | disconnect (neo::cca::ConnectionID_shared &connID, float timeout)=0 throw ( ::neo::cca::Exception ) |
Disconnect the connection indicated by connID before the indicated timeout in secs. | |
virtual void | disconnectAll (neo::cca::ComponentID_shared &id1, neo::cca::ComponentID_shared &id2, float timeout)=0 throw ( ::neo::cca::Exception ) |
Remove all connections between components id1 and id2 within the period of timeout secs. |
"neo.cca.BuilderService": the BuilderService.
Less than perfectly useful without a correlated ComponentFactory.
virtual neo::cca::ports::BuilderService::~BuilderService | ( | ) | [inline, virtual] |
{}
virtual neo::cca::ComponentID_shared neo::cca::ports::BuilderService::createInstance | ( | const ::std::string & | instanceName, |
const ::std::string & | className, | ||
::neo::cca::TypeMap_shared | properties | ||
) | throw ( ::neo::cca::Exception ) [pure virtual] |
Creates an instance of a CCA component of the type defined by the string className.
Memory lifecycle: The ComponentID_shared can be dropped on the floor if desired; that won't cause the component instance to stop existing.
virtual neo::cca::ComponentID_shared neo::cca::ports::BuilderService::createInstance | ( | const ::std::string & | instanceName, |
const ::std::string & | className | ||
) | throw ( ::neo::cca::Exception ) [pure virtual] |
Convenience function, for those with no interesting properties to put in.
virtual ::std::vector< neo::cca::ComponentID_shared > neo::cca::ports::BuilderService::getComponentIDs | ( | ) | throw ( ::neo::cca::Exception ) [pure virtual] |
Get component list.
Memory lifecycle: The vector is returned on the stack and when it goes out of scope, all the ComponentID_shared take care of themselves.
virtual ::neo::cca::TypeMap_shared neo::cca::ports::BuilderService::getComponentProperties | ( | neo::cca::ComponentID_shared | cid | ) | throw ( ::neo::cca::Exception ) [pure virtual] |
Get property map for component.
Memory Lifecycle: The info is returned on the stack and takes care of itself per shared_ptr.
a | Exception if the ComponentID is invalid. |
virtual void neo::cca::ports::BuilderService::setComponentProperties | ( | neo::cca::ComponentID_shared | cid, |
::neo::cca::TypeMap_shared | map | ||
) | throw ( ::neo::cca::Exception ) [pure virtual] |
Causes the framework implementation to associate the given properties with the component designated by cid.
Exception | if cid is invalid or if there is an attempted change to a property locked by the framework implementation. |
virtual neo::cca::ComponentID_shared neo::cca::ports::BuilderService::getDeserialization | ( | const ::std::string & | s | ) | throw ( ::neo::cca::Exception ) [pure virtual] |
Get component id from stringified reference.
Memory Lifecycle: The id is returned on the stack and takes care of itself per shared_ptr.
Exception | if the string does not represent the appropriate serialization of a ComponentID for the underlying framework. |
virtual neo::cca::ComponentID_shared neo::cca::ports::BuilderService::getComponentID | ( | const ::std::string & | componentInstanceName | ) | throw ( ::neo::cca::Exception ) [pure virtual] |
Get id from name by which it was created.
Memory Lifecycle: The id is returned on the stack and takes care of itself per shared_ptr.
Exception | if there is no component matching the given componentInstanceName. |
virtual void neo::cca::ports::BuilderService::destroyInstance | ( | neo::cca::ComponentID_shared | toDie, |
float | timeout | ||
) | throw ( ::neo::cca::Exception ) [pure virtual] |
Eliminate the Component instance, from the scope of the framework.
Memory lifecycle: On return, toDie will still be a valid pointer, but queries on it should throw exceptions because the component has been destroyed.
toDie | the component to be removed. |
timeout | the allowable wait; 0 means up to the framework. |
Exception | if toDie refers to an invalid component, or if the operation takes longer than timeout seconds. |
virtual ::std::vector< ::std::string > neo::cca::ports::BuilderService::getProvidedPortNames | ( | neo::cca::ComponentID_shared | cid | ) | throw ( ::neo::cca::Exception ) [pure virtual] |
virtual ::std::vector< ::std::string > neo::cca::ports::BuilderService::getUsedPortNames | ( | neo::cca::ComponentID_shared | cid | ) | throw ( ::neo::cca::Exception ) [pure virtual] |
virtual ::neo::cca::TypeMap_shared neo::cca::ports::BuilderService::getPortProperties | ( | neo::cca::ComponentID_shared | cid, |
const ::std::string & | portname | ||
) | throw ( ::neo::cca::Exception ) [pure virtual] |
virtual void neo::cca::ports::BuilderService::setPortProperties | ( | neo::cca::ComponentID_shared | cid, |
const ::std::string & | portname, | ||
::neo::cca::TypeMap_shared | map | ||
) | throw ( ::neo::cca::Exception ) [pure virtual] |
virtual neo::cca::ConnectionID_shared neo::cca::ports::BuilderService::connect | ( | neo::cca::ComponentID_shared | user, |
const ::std::string & | usingPortName, | ||
neo::cca::ComponentID_shared | provider, | ||
const ::std::string & | providingPortName | ||
) | throw ( ::neo::cca::Exception ) [pure virtual] |
Creates a connection between ports on component user and component provider.
Destroying the ConnectionID does not cause a disconnection; for that, see disconnect(). In anycase, the ConnectionID_shared destroys itself-- that is not the user's concern.
user | the caller component. |
provider | the callee component. |
usingPortName | name of the port in the caller. |
providingPortName | name of the port in the callee. |
Exception | when any one of the following conditions occur:
|
virtual ::std::vector< neo::cca::ConnectionID_shared > neo::cca::ports::BuilderService::getConnectionIDs | ( | ::std::vector< neo::cca::ComponentID_shared > & | componentList | ) | throw ( ::neo::cca::Exception ) [pure virtual] |
Returns a list of connections as an array of handles.
This will return all connections involving components in the given componentList of ComponentIDs. This means that ConnectionID's will be returned even if only one of the participants in the connection appears in componentList. Memory lifecycle: The vector returned and ids therein clean themselves up when leaving the calling scope.
Exception | if any component in componentList is invalid. |
virtual ::neo::cca::TypeMap_shared neo::cca::ports::BuilderService::getConnectionProperties | ( | neo::cca::ConnectionID_shared & | connID | ) | throw ( ::neo::cca::Exception ) [pure virtual] |
Fetch property map of a connection.
Memory lifecycle: the map will delete itself when appropriate.
Exception | if connID is invalid. |
virtual void neo::cca::ports::BuilderService::setConnectionProperties | ( | neo::cca::ConnectionID_shared & | connID, |
::neo::cca::TypeMap_shared | map | ||
) | throw ( ::neo::cca::Exception ) [pure virtual] |
Associates the properties with the connection.
map | the source of the properties. |
connID | connection to receive property values. |
Exception | if connID is invalid, or if this changes a property locked by the underlying framework. |
virtual void neo::cca::ports::BuilderService::disconnect | ( | neo::cca::ConnectionID_shared & | connID, |
float | timeout | ||
) | throw ( ::neo::cca::Exception ) [pure virtual] |
Disconnect the connection indicated by connID before the indicated timeout in secs.
Upon successful completion, connID and the connection it represents become invalid.
timeout | the time in seconds to wait for a connection to close; 0 means to use the framework implementation default. |
connID | the one to break. |
Exception | when any one of the following conditions occur:
|
virtual void neo::cca::ports::BuilderService::disconnectAll | ( | neo::cca::ComponentID_shared & | id1, |
neo::cca::ComponentID_shared & | id2, | ||
float | timeout | ||
) | throw ( ::neo::cca::Exception ) [pure virtual] |
Remove all connections between components id1 and id2 within the period of timeout secs.
If id2 is null, then all connections to id1 are removed (within the period of timeout secs).
Exception | when any one of the following conditions occur:
|