CCAFFEINE  0.8.8
OpqBuilderService.h
00001 #ifndef CCAFE_OPQBS_H_SEEN
00002 #define CCAFE_OPQBS_H_SEEN
00003 
00004 class DefaultBuilderModel;
00005 class ConnectionFramework;
00006 class CmdLineBuilderView;
00007 
00008 //===================================================================
00009 
00028 class OpqBuilderService : public virtual ::ccafeopq::BuilderService, 
00029 public virtual KernelPort
00030 #ifdef HAVE_CLASSIC
00031 , public virtual ::classic::gov::cca::Port
00032 #endif // HAVE_CLASSIC
00033 {
00034 
00035 private:
00036 
00037   ::std::map<std::string, void *> * frame;
00038 
00039   // A null builderview
00040   CmdLineBuilderView * nullBV;
00041 
00042   // Utility methods to retrieve model, framework, and/or, view
00043   DefaultBuilderModel * getDefaultBuilderModel();
00044   CmdLineBuilderView * getCmdLineBuilderView();
00045   ConnectionFramework * getConnectionFramework();
00046 
00047 public:
00048   OpqBuilderService();
00049   virtual ~OpqBuilderService();
00050 
00051   // opaque builderservice ness
00055   virtual ::ccafeopq::ComponentID_shared createInstance(const ::std::string & instanceName, const ::std::string & className, ::ccafeopq::TypeMap_shared & properties) throw ( ::ccafeopq::Exception ); 
00056 
00061   virtual ::std::vector< ::ccafeopq::ComponentID_shared > getComponentIDs() throw (::ccafeopq::Exception ); 
00062 
00068   virtual ::ccafeopq::TypeMap_shared getComponentProperties( ::ccafeopq::ComponentID_shared & cid) throw (::ccafeopq::Exception );
00069 
00072   virtual void setComponentProperties( ::ccafeopq::ComponentID_shared & cid,  ::ccafeopq::TypeMap_shared & map) throw (::ccafeopq::Exception );
00073 
00079   virtual ::ccafeopq::ComponentID_shared getDeserialization( const ::std::string & s) throw (::ccafeopq::Exception );
00080 
00086   virtual ::ccafeopq::ComponentID_shared getComponentID( const ::std::string & componentInstanceName) throw (::ccafeopq::Exception );
00087 
00090   virtual void destroyInstance( ::ccafeopq::ComponentID_shared & toDie,  float timeout ) throw (::ccafeopq::Exception );
00091 
00094   virtual ::std::vector< ::std::string > getProvidedPortNames( ::ccafeopq::ComponentID_shared & cid) throw (::ccafeopq::Exception ); 
00095 
00098   virtual ::std::vector< ::std::string > getUsedPortNames( ::ccafeopq::ComponentID_shared & cid) throw (::ccafeopq::Exception ); 
00099 
00102   virtual ::ccafeopq::TypeMap_shared getPortProperties( ::ccafeopq::ComponentID_shared & cid, const ::std::string & portname) throw (::ccafeopq::Exception );
00103 
00106   virtual void setPortProperties( ::ccafeopq::ComponentID_shared & cid, const ::std::string & portname,  ::ccafeopq::TypeMap_shared & map) throw (::ccafeopq::Exception );
00107 
00110   virtual ::ccafeopq::ConnectionID_shared connect( ::ccafeopq::ComponentID_shared & user, const ::std::string & usingPortName,  ::ccafeopq::ComponentID_shared & provider, const ::std::string & providingPortName) throw (::ccafeopq::Exception ); 
00111 
00114   virtual ::std::vector < ::ccafeopq::ConnectionID_shared > getConnectionIDs( ::std::vector< ::ccafeopq::ComponentID_shared > & componentList) throw (::ccafeopq::Exception ); 
00115 
00116   virtual ::std::vector < ::ccafeopq::ConnectionID_shared > getConnectionIDs(  const ::std::string & userName, const ::std::string & usingPortName,  const ::std::string & providerName, const ::std::string & providingPortName) throw (::ccafeopq::Exception );
00117 
00120   virtual ::ccafeopq::TypeMap_shared getConnectionProperties( ::ccafeopq::ConnectionID_shared & connID) throw (::ccafeopq::Exception );
00121 
00124   virtual void setConnectionProperties( ::ccafeopq::ConnectionID_shared & connID,  ::ccafeopq::TypeMap_shared & map) throw (::ccafeopq::Exception );
00125 
00128   virtual void disconnect( ::ccafeopq::ConnectionID_shared & connID,  float timeout) throw (::ccafeopq::Exception ); 
00129 
00132   virtual void disconnectAll( ::ccafeopq::ComponentID_shared & id1,  ::ccafeopq::ComponentID_shared & id2,  float timeout) throw (::ccafeopq::Exception ); 
00133 
00134   std::vector< ::ccafeopq::ComponentID_shared > 
00135     getComponentsThatUse(const std::string& portType);
00136 
00137   std::vector< ::ccafeopq::ComponentID_shared > 
00138     getComponentsThatProvide(const std::string& portType);
00139 
00140   virtual void appendRepositoryPath ( const ::std::string& dirPathElement );
00141 
00142   virtual void loadRepositoryClass (const ::std::string& className, bool loadGlobal, bool loadLazy );
00143 
00144 
00145   void setFrameData( std::map<std::string, void *> *v);
00146 } ; // end interface BuilderService
00147 
00148 #include <boost/shared_ptr.hpp>
00149 
00150 typedef boost::shared_ptr< OpqBuilderService * > OpqBuilderService_ptr;
00151 
00152 #endif //CCAFE_OPQBS_H_SEEN