NEOCCA bindings Specification  0.2.8
Services.hh
Go to the documentation of this file.
1 #ifndef __neo_Services_hh_seen
2 #define __neo_Services_hh_seen
3 
4 namespace neo {
5 namespace cca {
6 
16 class Services
17 {
18 
19 public:
20 
22  virtual ~Services(){}
23 
33  virtual Port * getPort(const ::std::string & name) throw(Exception )= 0;
34 
39  virtual Port * getPortNonBlocking(const ::std::string & name) throw(Exception )= 0;
40 
49  virtual void releasePort(const ::std::string & name) throw(Exception )= 0;
50 
56  virtual void registerUsesPort( const ::std::string & name, const ::std::string & type) throw(Exception )= 0;
57 
66  virtual void registerUsesPort( const ::std::string & name, const ::std::string & type, TypeMap_shared properties) throw(Exception )= 0;
67 
68 
74  virtual void unregisterUsesPort(const ::std::string & name) throw(Exception )= 0;
75 
83  virtual void addProvidesPort( Port * inPort, const ::std::string & name, const ::std::string & type) throw (Exception )= 0;
92  virtual void addProvidesPort( Port * inPort, const ::std::string & name, const ::std::string & type, TypeMap_shared properties) throw (Exception )= 0;
93 
99  virtual void removeProvidesPort(const ::std::string & name) throw (Exception )= 0;
100 
104  virtual ComponentID_shared getComponentID()= 0;
105 
107  virtual TypeMap_shared createTypeMap() throw (Exception )= 0;
108 
113  virtual TypeMap_shared getPortProperties(const ::std::string & portName) throw (Exception )= 0;
114 
117  virtual ::std::string genUniquePortName(const ::std::string & base)= 0;
118 
129  virtual void registerForRelease(ComponentRelease *callBack) throw(Exception)= 0;
130 
131 };
132 
133 } // end namespace cca
134 } // end namespace neo
135 
136 #endif // __neo_Services_hh_seen
virtual void addProvidesPort(Port *inPort, const ::std::string &name, const ::std::string &type)=0
Exports a Port implemented by this component to the framework.
virtual void registerUsesPort(const ::std::string &name, const ::std::string &type)=0
Notifies the framework that a port of specified name and type may be used by this component...
boost::shared_ptr< ComponentID > ComponentID_shared
This typedef is the type everyone should use everywhere in the BuilderService and event related ports...
Definition: ComponentID.hh:33
boost::shared_ptr< TypeMap > TypeMap_shared
This (TypeMap_shared) is what everyone declares in component code and noone ever calls new on...
Definition: TypeMap.hh:14
virtual ComponentID_shared getComponentID()=0
Get a reference to the component which this Services object belongs.
virtual TypeMap_shared getPortProperties(const ::std::string &portName)=0
Fetch the framework&#39;s idea of the properties for a port already defined in the component that this Se...
This class extends the STL std::exception to allow the thrower to specify the message that the stl sa...
Definition: Exception.hh:48
virtual Port * getPort(const ::std::string &name)=0
Fetch a port from the framework.
The handle through which the component communicates with its containing framework.
Definition: Services.hh:16
virtual ::std::string genUniquePortName(const ::std::string &base)=0
Construct a unique port name derived from the base name given.
virtual Port * getPortNonBlocking(const ::std::string &name)=0
As getPort, but the framework is not permitted to block execution and do possibly complex internal th...
virtual void registerForRelease(ComponentRelease *callBack)=0
Obtain a callback for component destruction.
Definition: ComponentRelease.hh:6
virtual ~Services()
Obligatory virtual destructor.
Definition: Services.hh:22
virtual void releasePort(const ::std::string &name)=0
Free&#39;s the connection indicated by the name for modification by the component&#39;s containing framework...
A pure-virtual tag interface to identify a function set capable of being exported to or imported from...
Definition: Port.hh:17
virtual void unregisterUsesPort(const ::std::string &name)=0
Notify the framework that use of a Port, previously registered by this component, is no longer needed...
virtual TypeMap_shared createTypeMap()=0
Construct and return a shared_ptr<> to a TypeMap.
virtual void removeProvidesPort(const ::std::string &name)=0
Notifies the framework that a previously exported Port is no longer available for use...
This is neoclassic – the ::classic::gov::cca headers updated to be similar to the official CCA speci...
Definition: neocca.hh:62