00001 #ifndef dc_fwk_ConnectionID_h_seen
00002 #define dc_fwk_ConnectionID_h_seen
00003
00004 #include <boost/shared_ptr.hpp>
00005 #include <string>
00006
00007 class ConnectionID_impl;
00008 class Gizzard;
00009
00010 typedef boost::shared_ptr< ConnectionID_impl > ConnectionID_ptr;
00011
00016 class ConnectionID_impl : public virtual ::ccafeopq::ConnectionID_Interface
00017 {
00018 private:
00019 bool dead;
00020 bool inUse;
00021 bool selfConnection;
00022 ::std::string pPortName;
00023 ::std::string uPortName;
00024 Gizzard *p;
00025 Gizzard *u;
00026 ::ccafeopq::TypeMap_shared tm;
00027 ::ccafeopq::Port *pp;
00028
00029 public:
00030
00031
00032 ConnectionID_impl(Gizzard *provider, const ::std::string & providerPortName,
00033 Gizzard *user, const ::std::string & userPortName , ::ccafeopq::Port *pp_);
00034
00035
00036 ConnectionID_impl(Gizzard *user, const ::std::string & userPortName,
00037 ::ccafeopq::Port *pp_);
00038
00040 virtual ~ConnectionID_impl();
00041
00042 virtual ::ccafeopq::ComponentID_shared getProvider() throw ( ::ccafeopq::Exception );
00043
00047 virtual ::ccafeopq::ComponentID_shared getUser() throw ( ::ccafeopq::Exception );
00048
00049 virtual ::std::string getProviderPortName() throw ( ::ccafeopq::Exception );
00050
00051 virtual ::std::string getUserPortName() throw ( ::ccafeopq::Exception );
00052
00053 virtual bool isSameAs( ConnectionID_ptr cp);
00054
00055 virtual bool isSameAs( ::ccafeopq::ConnectionID_shared & cp);
00056
00060 virtual int isActive();
00061
00063 virtual int isFrameworkConnection();
00064
00065 virtual ::ccafeopq::TypeMap_shared getProperties();
00066
00067 virtual void setProperties( ::ccafeopq::TypeMap_shared tm_);
00068
00069 Gizzard *getProviderGizzard();
00070
00071 Gizzard *getUserGizzard();
00072
00073 ::ccafeopq::Port *getCachedPort();
00074
00075
00076 static int indexOfConnection( const ::std::vector< ConnectionID_ptr > & conns,
00077 const ::std::string & upname,
00078 const ::std::string & ppname,
00079 Gizzard *userg, Gizzard * providerg);
00080
00081
00082 static int indexOfConnection( const ::std::vector< ConnectionID_ptr > & conns,
00083 ConnectionID_ptr c);
00084
00085 };
00086
00087 #endif // dc_fwk_ConnectionID_h_seen