CCAFFEINE  0.8.8
testcca.h
00001 
00004 #ifdef _FAKE_CCA_TESTING
00005 #ifndef __TestCCA_H__
00006 #define __TestCCA_H__
00007 
00008 
00013 #define ENDSEMI   // use of this macro is deprecated
00014 #define CCA_NAMESPACE_ENDSEMICOLON 
00015 #define CONST 
00016 
00020 namespace classic {
00021 
00022 namespace gov {
00026   namespace cca {
00027 
00031     class Version {
00032     public:
00034       static const char *name(); 
00036       static const char *id();
00042       static const int Major(); 
00047       static const int Minor(); 
00050       static const int Patch(); 
00052     };
00053 
00054  
00055 //===================================================================
00056 
00059     class Port  {
00060     public:
00062       virtual ~Port (){}
00063     };
00064 
00065 //===================================================================
00067     class PortInfo  {
00068     public:
00070       virtual ~PortInfo(){}
00071 
00074       virtual const char* getType() const = 0;
00075 
00079       virtual const char* getName() const = 0;
00080 
00083       virtual const char* getProperty(char* name) = 0;
00084 
00085     };
00086 
00087 //===================================================================
00089     class ComponentID  {
00090     public:
00092       virtual ~ComponentID() {}
00093 
00099       virtual char* toString()=0;
00100 
00101 
00102     };
00103 
00104 //===================================================================
00109     class Services  {
00110     public:
00112       virtual ~Services (){}
00113 
00124       virtual PortInfo *  createPortInfo(const char *name, const char *type, const char** properties) = 0;
00125 
00132       virtual Port *getPort(const char *name) = 0;
00133 
00138       virtual void releasePort(const char *name) = 0;
00139 
00146       virtual int registerUsesPort(PortInfo *name_and_type) = 0;
00147 
00154       virtual int unregisterUsesPort(const char *name) = 0;
00155 
00162       virtual int addProvidesPort(Port *inPort, PortInfo *name) = 0;
00163 
00166       virtual void removeProvidesPort(const char *name) = 0;
00167 
00172       virtual ComponentID* getComponentID() = 0;
00173 
00174     };
00175 
00176 //===================================================================
00180     class CCAComponent {
00181     public:
00183       virtual ~CCAComponent(){}
00184 
00187       virtual void setServices(Services *cc)=0;
00188     };
00189 
00190 //===================================================================
00191 
00192 } CCA_NAMESPACE_ENDSEMICOLON // end namespace cca
00193 } CCA_NAMESPACE_ENDSEMICOLON // end namespace gov
00194 } CCA_NAMESPACE_ENDSEMICOLON // end namespace classic
00195 
00196 #endif //__TestCCA_H_ 
00197 #endif // _FAKE_CCA_TESTING