classic::gov::cca::Services Class Reference

The handle through which the component communicates with its containing framework. More...

#include <cca.h>

List of all members.

Public Member Functions

virtual ~Services ()
 obligatory virtual destructor
virtual PortInfocreatePortInfo (CONST char *name, CONST char *type, CONST char **properties) CLASSIC_CCA_PURE
 Creates a PortInfo to be used in subsequent calls to describe a Port.
virtual PortgetPort (CONST char *name) CLASSIC_CCA_PURE
 Fetch a port from the framework.
virtual PortgetPort (const std::string &name) CLASSIC_CCA_PURE
 stl version of getport
virtual void releasePort (CONST char *name) CLASSIC_CCA_PURE
 Free's the port indicated by the instance name for modification by the component's containing framework.
virtual void releasePort (const std::string &name) CLASSIC_CCA_PURE
 stl version of releaseport
virtual int registerUsesPort (PortInfo *name_and_type) CLASSIC_CCA_PURE
 Notifies the framework that a port described by PortInfo may be used by this component.
virtual int registerUsesPort (const std::string &portName, const std::string &portType) CLASSIC_CCA_PURE
 always returns 0.
virtual int unregisterUsesPort (CONST char *name) CLASSIC_CCA_PURE
 Notify the framework that a Port, previously registered by this component, is no longer desired.
virtual int unregisterUsesPort (const std::string &name) CLASSIC_CCA_PURE
 always returns 0.
virtual int addProvidesPort (Port *inPort, PortInfo *name) CLASSIC_CCA_PURE
 Exports a Port implemented by this component to the framework.
virtual int addProvidesPort (Port *inPort, const std::string &portName, const std::string &portType) CLASSIC_CCA_PURE
 always returns 0.
virtual void removeProvidesPort (CONST char *name) CLASSIC_CCA_PURE
 Notifies the framework that a previously exported Port is no longer available for use.
virtual void removeProvidesPort (const std::string &name) CLASSIC_CCA_PURE
 always returns 0.
virtual CDELETE ComponentIDgetComponentID () CLASSIC_CCA_PURE
 Get a reference to the component which this Services object belongs.


Detailed Description

The handle through which the component communicates with its containing framework.

Constructor & Destructor Documentation

virtual classic::gov::cca::Services::~Services (  )  [inline, virtual]

obligatory virtual destructor

00145 {}


Member Function Documentation

virtual PortInfo* classic::gov::cca::Services::createPortInfo ( CONST char *  name,
CONST char *  type,
CONST char **  properties 
) [virtual]

Creates a PortInfo to be used in subsequent calls to describe a Port.

The arguments given are copied, not kept. properties is an even length list (argv) of key/value pairs terminated by a NULL key. Note that names of Ports in a component are not distinct for used and provided ports. Standard properties: (UNADOPTED, extensible list) MIN_CONNECTIONS (int >= 0; default 0) MAX_CONNECTIONS (int >= 1, default 1) ABLE_TO_PROXY (true,false; default false)

virtual Port* classic::gov::cca::Services::getPort ( CONST char *  name  )  [virtual]

Fetch a port from the framework.

Normally this means a uses port. If no uses port is connected and a provided port of the name requested is available, the component will be handed back that port. Returns NULL if no provided port or uses port connection matches name.

See also:
Services.java; UNADOPTED C++ definition of "an error occurs".

virtual Port* classic::gov::cca::Services::getPort ( const std::string &  name  )  [virtual]

stl version of getport

virtual void classic::gov::cca::Services::releasePort ( CONST char *  name  )  [virtual]

Free's the port indicated by the instance name for modification by the component's containing framework.

After this call the port will not be valid for use until getPort() is called again.

virtual void classic::gov::cca::Services::releasePort ( const std::string &  name  )  [virtual]

stl version of releaseport

virtual int classic::gov::cca::Services::registerUsesPort ( PortInfo name_and_type  )  [virtual]

Notifies the framework that a port described by PortInfo may be used by this component.

The portinfo is obtained from createPortInfo. Returns nonzero if there is an error in registering, such as bad PortInfo or already registered.

See also:
Services.java; UNADOPTED C++ definition of "an error occurs".

virtual int classic::gov::cca::Services::registerUsesPort ( const std::string &  portName,
const std::string &  portType 
) [virtual]

always returns 0.

If it fails, throws a std::exception or something derived therefrom. No properties option is allowed.

virtual int classic::gov::cca::Services::unregisterUsesPort ( CONST char *  name  )  [virtual]

Notify the framework that a Port, previously registered by this component, is no longer desired.

Returns nonzero if the port is still in use, ignoring the unregister request.

See also:
Services.java; UNADOPTED C++ definition of "an error occurs".

virtual int classic::gov::cca::Services::unregisterUsesPort ( const std::string &  name  )  [virtual]

always returns 0.

if an error occurs, throws something derived from std::exception.

virtual int classic::gov::cca::Services::addProvidesPort ( Port inPort,
PortInfo name 
) [virtual]

Exports a Port implemented by this component to the framework.

This Port is now available for the framework to connect to other components. The PortInfo is obtained from createPortInfo. Returns nonzero if addProvidesPort fails, for example, because that name is already provided.

See also:
Services.java; UNADOPTED C++ definition of "an error occurs".

virtual int classic::gov::cca::Services::addProvidesPort ( Port inPort,
const std::string &  portName,
const std::string &  portType 
) [virtual]

always returns 0.

If it fails, throws a std::exception or something derived therefrom. No properties option is allowed.

virtual void classic::gov::cca::Services::removeProvidesPort ( CONST char *  name  )  [virtual]

Notifies the framework that a previously exported Port is no longer available for use.

virtual void classic::gov::cca::Services::removeProvidesPort ( const std::string &  name  )  [virtual]

always returns 0.

if an error occurs, throws something derived from std::exception.

virtual CDELETE ComponentID* classic::gov::cca::Services::getComponentID (  )  [virtual]

Get a reference to the component which this Services object belongs.

Delete it when you're done with it.


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

Generated on Thu Mar 3 08:43:35 2011 for 'Classic' CCA c++ binding (ccaffeine-only) by  doxygen 1.5.9