NEOCCA bindings Specification  0.2.8
Public Member Functions
neo::cca::ports::BuilderService Class Reference

"neo.cca.BuilderService": the BuilderService. More...

#include <BuilderService.hh>

Inheritance diagram for neo::cca::ports::BuilderService:
Inheritance graph
[legend]
Collaboration diagram for neo::cca::ports::BuilderService:
Collaboration graph
[legend]

List of all members.

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.

Detailed Description

"neo.cca.BuilderService": the BuilderService.

Less than perfectly useful without a correlated ComponentFactory.


Constructor & Destructor Documentation

virtual neo::cca::ports::BuilderService::~BuilderService ( ) [inline, virtual]
{}

Member Function Documentation

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.

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.

Returns:
a ComponentID for each component currently created.

Get property map for component.

Memory Lifecycle: The info is returned on the stack and takes care of itself per shared_ptr.

Returns:
the public properties associated with the component referred to by ComponentID.
Exceptions:
aException if the ComponentID is invalid.

Causes the framework implementation to associate the given properties with the component designated by cid.

Exceptions:
Exceptionif 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.

Returns:
a ComponentID from the string produced by ComponentID.getSerialization().
Exceptions:
Exceptionif 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.

Returns:
a ComponentID from the instance name of the component produced by ComponentID.getInstanceName().
Exceptions:
Exceptionif 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.

Parameters:
toDiethe component to be removed.
timeoutthe allowable wait; 0 means up to the framework.
Exceptions:
Exceptionif 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]

Get the names of Port instances provided by the identified component.

Memory lifecycle: The vector is returned on the stack and when it goes out of scope, all the string take care of themselves.

Parameters:
cidthe component.
Exceptions:
Exceptionif cid refers to an invalid component.
virtual ::std::vector< ::std::string > neo::cca::ports::BuilderService::getUsedPortNames ( neo::cca::ComponentID_shared  cid) throw ( ::neo::cca::Exception ) [pure virtual]

Get the names of Port instances used by the identified component.

Memory lifecycle: The vector is returned on the stack and when it goes out of scope, all the string take care of themselves.

Parameters:
cidthe component.
Exceptions:
Exceptionif cid refers to an invalid component.
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]

Fetch map of Port properties exposed by the framework.

Returns:
the public properties pertaining to the Port instance portname on the component referred to by cid.
Exceptions:
Exceptionwhen any one of the following conditions occur:
  • portname is not a registered Port on the component indicated by cid,
  • cid refers to an invalid component.
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]

Associates the properties given in map with the Port indicated by portname.

The component must have a Port known by portname.

Exceptions:
Exceptionif either cid or portname are invalid, or if this a changed property is locked by the underlying framework or component.
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.

Parameters:
userthe caller component.
providerthe callee component.
usingPortNamename of the port in the caller.
providingPortNamename of the port in the callee.
Exceptions:
Exceptionwhen any one of the following conditions occur:
  • If either user or provider refer to an invalid component,
  • If either usingPortName or providingPortName refer to a nonexistent Port on their respective component,
  • If other-- In reality there are a lot of things that can go wrong with this operation, especially if the underlying connections involve networking.
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.

Exceptions:
Exceptionif any component in componentList is invalid.

Fetch property map of a connection.

Memory lifecycle: the map will delete itself when appropriate.

Returns:
the properties for the given connection.
Exceptions:
Exceptionif connID is invalid.

Associates the properties with the connection.

Parameters:
mapthe source of the properties.
connIDconnection to receive property values.
Exceptions:
Exceptionif 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.

Parameters:
timeoutthe time in seconds to wait for a connection to close; 0 means to use the framework implementation default.
connIDthe one to break.
Exceptions:
Exceptionwhen any one of the following conditions occur:
  • id refers to an invalid ConnectionID,
  • timeout is exceeded, after which, if id was valid before disconnect() was invoked, it remains valid
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).

Exceptions:
Exceptionwhen any one of the following conditions occur:
  • id1 or id2 refer to an invalid ComponentID (other than id2 == null),
  • The timeout period is exceeded before the disconnections can be made.

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