From: Robert L. <rle...@us...> - 2007-03-05 09:26:23
|
Update of /cvsroot/ccmtools/cpp-environment/ccm/local/LocalComponents In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv32019/ccm/local/LocalComponents Modified Files: ccmtools.h Added Files: ComponentDelegator.cc Log Message: new prototype Index: ccmtools.h =================================================================== RCS file: /cvsroot/ccmtools/cpp-environment/ccm/local/LocalComponents/ccmtools.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ccmtools.h 5 Jan 2007 14:09:35 -0000 1.1 --- ccmtools.h 5 Mar 2007 09:25:47 -0000 1.2 *************** *** 79,83 **** class HomeNotFound ! : public Exception { public: --- 79,83 ---- class HomeNotFound ! : public Exception { public: *************** *** 172,176 **** RemoveFailure(const FailureReason reason) throw(); virtual ~RemoveFailure() throw(); ! private: FailureReason reason_; --- 172,176 ---- RemoveFailure(const FailureReason reason) throw(); virtual ~RemoveFailure() throw(); ! private: FailureReason reason_; *************** *** 198,202 **** CCMException(const CCMExceptionReason reason) throw(); virtual ~CCMException() throw(); ! private: CCMExceptionReason reason_; --- 198,202 ---- CCMException(const CCMExceptionReason reason) throw(); virtual ~CCMException() throw(); ! private: CCMExceptionReason reason_; *************** *** 237,241 **** public: typedef wamas::platform::utils::SmartPtr<EnterpriseComponent> SmartPtr; ! virtual ~EnterpriseComponent() {} }; --- 237,241 ---- public: typedef wamas::platform::utils::SmartPtr<EnterpriseComponent> SmartPtr; ! virtual ~EnterpriseComponent() {} }; *************** *** 260,269 **** { public: ! typedef wamas::platform::utils::SmartPtr<CCMHome> SmartPtr; virtual ~CCMHome() {} virtual void remove_component(wamas::platform::utils::SmartPtr<CCMObject> component) ! throw(CCMException, RemoveFailure) = 0; }; --- 260,269 ---- { public: ! typedef wamas::platform::utils::SmartPtr<CCMHome> SmartPtr; virtual ~CCMHome() {} virtual void remove_component(wamas::platform::utils::SmartPtr<CCMObject> component) ! throw(CCMException, RemoveFailure) = 0; }; *************** *** 280,285 **** { public: ! typedef wamas::platform::utils::SmartPtr<KeylessCCMHome> SmartPtr; ! virtual ~KeylessCCMHome() {} --- 280,285 ---- { public: ! typedef wamas::platform::utils::SmartPtr<KeylessCCMHome> SmartPtr; ! virtual ~KeylessCCMHome() {} *************** *** 299,303 **** typedef wamas::platform::utils::SmartPtr<HomeExecutorBase> SmartPtr; ! virtual ~HomeExecutorBase() {} }; --- 299,303 ---- typedef wamas::platform::utils::SmartPtr<HomeExecutorBase> SmartPtr; ! virtual ~HomeExecutorBase() {} }; *************** *** 333,337 **** * Note: this method is NOT defined in the CCM specification!! */ ! virtual void unregister_home(const std::string& home_name) = 0; }; --- 333,337 ---- * Note: this method is NOT defined in the CCM specification!! */ ! virtual void unregister_home(const std::string& home_name) = 0; }; *************** *** 353,357 **** static HomeFinder* Instance(); static void destroy(); ! virtual ~HomeFinder() {} --- 353,357 ---- static HomeFinder* Instance(); static void destroy(); ! virtual ~HomeFinder() {} *************** *** 364,377 **** virtual CCMHome::SmartPtr find_home_by_type(const std::string& home_repid) throw(HomeNotFound); ! ! // Methods defined in Components::HomeRegistration virtual void register_home(CCMHome::SmartPtr home_ref, const std::string& home_name); virtual void unregister_home(CCMHome::SmartPtr home_ref); ! virtual void unregister_home(const std::string& home_name); ! protected: ! static HomeFinder* instance_; HomePoolMap HomePool; ! HomeFinder() {}; }; --- 364,377 ---- virtual CCMHome::SmartPtr find_home_by_type(const std::string& home_repid) throw(HomeNotFound); ! ! // Methods defined in Components::HomeRegistration virtual void register_home(CCMHome::SmartPtr home_ref, const std::string& home_name); virtual void unregister_home(CCMHome::SmartPtr home_ref); ! virtual void unregister_home(const std::string& home_name); ! protected: ! static HomeFinder* instance_; HomePoolMap HomePool; ! HomeFinder() {}; }; *************** *** 397,401 **** virtual ~CCMContext() {} ! virtual HomeExecutorBase* get_CCM_home() = 0; }; --- 397,401 ---- virtual ~CCMContext() {} ! virtual HomeExecutorBase* get_CCM_home() = 0; }; *************** *** 412,416 **** { public: ! typedef wamas::platform::utils::SmartPtr<SessionContext> SmartPtr; virtual ~SessionContext() {} --- 412,416 ---- { public: ! typedef wamas::platform::utils::SmartPtr<SessionContext> SmartPtr; virtual ~SessionContext() {} *************** *** 423,427 **** ***/ virtual Object* get_CCM_object() ! throw (IllegalState) = 0; }; --- 423,427 ---- ***/ virtual Object* get_CCM_object() ! throw (IllegalState) = 0; }; *************** *** 443,447 **** { public: ! typedef wamas::platform::utils::SmartPtr<SessionComponent> SmartPtr; virtual ~SessionComponent() {} --- 443,447 ---- { public: ! typedef wamas::platform::utils::SmartPtr<SessionComponent> SmartPtr; virtual ~SessionComponent() {} *************** *** 474,478 **** */ virtual void ccm_remove() ! throw (CCMException) = 0; }; --- 474,478 ---- */ virtual void ccm_remove() ! throw (CCMException) = 0; }; *************** *** 489,494 **** { public: ! typedef wamas::platform::utils::SmartPtr<SessionSynchronisation> SmartPtr; ! virtual ~SessionSynchronisation() {} --- 489,494 ---- { public: ! typedef wamas::platform::utils::SmartPtr<SessionSynchronisation> SmartPtr; ! virtual ~SessionSynchronisation() {} *************** *** 523,527 **** { public: ! typedef wamas::platform::utils::SmartPtr<Navigation> SmartPtr; virtual ~Navigation() {} --- 523,527 ---- { public: ! typedef wamas::platform::utils::SmartPtr<Navigation> SmartPtr; virtual ~Navigation() {} *************** *** 534,538 **** */ virtual Object::SmartPtr provide_facet(const std::string& name) ! throw(InvalidName) = 0; }; --- 534,538 ---- */ virtual Object::SmartPtr provide_facet(const std::string& name) ! throw(InvalidName) = 0; }; *************** *** 556,560 **** virtual ~Cookie(); bool operator< (const Cookie& ck) const; ! protected: virtual OctetSeq cookieValue() const; --- 556,560 ---- virtual ~Cookie(); bool operator< (const Cookie& ck) const; ! protected: virtual OctetSeq cookieValue() const; *************** *** 577,581 **** { public: ! typedef wamas::platform::utils::SmartPtr<Receptacles> SmartPtr; virtual ~Receptacles() {} --- 577,581 ---- { public: ! typedef wamas::platform::utils::SmartPtr<Receptacles> SmartPtr; virtual ~Receptacles() {} *************** *** 592,596 **** throw(InvalidName, InvalidConnection, AlreadyConnected, ExceededConnectionLimit) = 0; ! /* * Simplex receptacle: the operation will disassociate any object * reference currently connected to the receptacle - the cookie --- 592,596 ---- throw(InvalidName, InvalidConnection, AlreadyConnected, ExceededConnectionLimit) = 0; ! /* * Simplex receptacle: the operation will disassociate any object * reference currently connected to the receptacle - the cookie *************** *** 600,604 **** */ virtual void disconnect(const FeatureName& name, const Cookie& ck) ! throw(InvalidName, InvalidConnection, CookieRequired, NoConnection) = 0; }; --- 600,604 ---- */ virtual void disconnect(const FeatureName& name, const Cookie& ck) ! throw(InvalidName, InvalidConnection, CookieRequired, NoConnection) = 0; }; *************** *** 615,619 **** { public: ! typedef wamas::platform::utils::SmartPtr<CCMObject> SmartPtr; virtual ~CCMObject() {} --- 615,619 ---- { public: ! typedef wamas::platform::utils::SmartPtr<CCMObject> SmartPtr; virtual ~CCMObject() {} *************** *** 641,645 **** */ virtual void remove() ! throw(RemoveFailure) = 0; }; --- 641,645 ---- */ virtual void remove() ! throw(RemoveFailure) = 0; }; *************** *** 742,746 **** * Note: This is an CCM extension to support nested components. */ ! virtual void configuration_complete() = 0; }; --- 742,746 ---- * Note: This is an CCM extension to support nested components. */ ! virtual void configuration_complete() = 0; }; *************** *** 750,755 **** { public: ! typedef wamas::platform::utils::SmartPtr<AssemblyFactory> SmartPtr; ! virtual ~AssemblyFactory() {} --- 750,755 ---- { public: ! typedef wamas::platform::utils::SmartPtr<AssemblyFactory> SmartPtr; ! virtual ~AssemblyFactory() {} *************** *** 773,777 **** Assembly::SmartPtr assembly(new T()); return assembly; ! } }; --- 773,795 ---- Assembly::SmartPtr assembly(new T()); return assembly; ! } ! }; ! ! ! /** ! @interface ComponentDelegator ! */ ! class ComponentDelegator ! { ! public: ! virtual ~ComponentDelegator() {} ! ! typedef std::map<Cookie, Object::SmartPtr> Connections; ! ! virtual Object::SmartPtr provide(const std::string& facet) = 0; ! virtual Cookie connect(const FeatureName& receptacle, Object::SmartPtr facet) = 0; ! virtual void disconnect(const FeatureName& receptacle, const Cookie& cookie) = 0; ! ! void disconnect(const FeatureName& receptacle); }; --- NEW FILE: ComponentDelegator.cc --- #include "ccmtools.h" namespace Components { void ComponentDelegator::disconnect(const FeatureName& receptacle) { static Cookie dummy; this->disconnect(receptacle, dummy); } } // /namespace Components |