diff options
Diffstat (limited to 'TAO/CIAO/DAnCE/ciao/Dynamic_Component_Servant_T.h')
-rw-r--r-- | TAO/CIAO/DAnCE/ciao/Dynamic_Component_Servant_T.h | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/TAO/CIAO/DAnCE/ciao/Dynamic_Component_Servant_T.h b/TAO/CIAO/DAnCE/ciao/Dynamic_Component_Servant_T.h new file mode 100644 index 00000000000..9e4c8828fc8 --- /dev/null +++ b/TAO/CIAO/DAnCE/ciao/Dynamic_Component_Servant_T.h @@ -0,0 +1,78 @@ +// -*- C++ -*- + +//============================================================================= +/** + * @file Dynamic_Component_Servant_T.h + * + * $Id$ + * + * This file contains the declaration of a mixin base class for + * the generated home servant class. + * + */ +//============================================================================= + + +#ifndef CIAO_DYNAMIC_COMPONENT_SERVANT_T_H +#define CIAO_DYNAMIC_COMPONENT_SERVANT_T_H + +#include /**/ "ace/pre.h" + +#include "Dynamic_Component_Servant_Base.h" +#include "SwapExecC.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "tao/PortableServer/Key_Adapters.h" +#include "ace/Hash_Map_Manager_T.h" + +namespace CIAO +{ + template <typename COMP_SVNT, typename COMP_EXEC, + typename COMP_EXEC_VAR, typename EXEC, typename EXEC_VAR, + typename COMP> + class Dynamic_Component_Servant + : public virtual Dynamic_Component_Servant_Base + { + public: + Dynamic_Component_Servant (Components::EnterpriseComponent_ptr ec, + Components::CCMHome_ptr home, + Home_Servant_Impl_Base *home_servant, + Session_Container *c); + + virtual ~Dynamic_Component_Servant (void); + + virtual PortableServer::Servant + create (PortableServer::ObjectId &oid); + + virtual void destroy (PortableServer::ObjectId &oid); + + virtual void update_destroy_count (); + + protected: + Components::EnterpriseComponent_var executor_; + Home_Servant_Impl_Base *home_servant_; + Components::CCMHome_var home_; + ACE_Hash_Map_Manager_Ex<PortableServer::ObjectId, + COMP_SVNT *, + TAO_ObjectId_Hash, + ACE_Equal_To<PortableServer::ObjectId>, + ACE_SYNCH_MUTEX> + servant_map_; + int component_removed_; + }; +} + +#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) +#include "Dynamic_Component_Servant_T.cpp" +#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ + +#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) +#pragma implementation ("Dynamic_Component_Servant_T.cpp") +#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ + +#include /**/ "ace/post.h" + +#endif /* CIAO_DYNAMIC_COMPONENT_SERVANT_T_H */ |