diff options
Diffstat (limited to 'TAO/CIAO/DAnCE/ciao/Dynamic_Component_Servant_Base.h')
-rw-r--r-- | TAO/CIAO/DAnCE/ciao/Dynamic_Component_Servant_Base.h | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/TAO/CIAO/DAnCE/ciao/Dynamic_Component_Servant_Base.h b/TAO/CIAO/DAnCE/ciao/Dynamic_Component_Servant_Base.h new file mode 100644 index 00000000000..7831fd3a0d0 --- /dev/null +++ b/TAO/CIAO/DAnCE/ciao/Dynamic_Component_Servant_Base.h @@ -0,0 +1,52 @@ +// -*- C++ -*- + +//============================================================================= +/** + * @file Dynamic_Component_Servant_Base.h + * + * $Id$ + * + */ +//============================================================================= + + +#ifndef CIAO_DYNAMIC_COMPONENT_SERVANT_BASE_H +#define CIAO_DYNAMIC_COMPONENT_SERVANT_BASE_H + +#include /**/ "ace/pre.h" + +#include "CCM_ComponentS.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "tao/PortableServer/PortableServer.h" +#include "CIAO_Server_Export.h" + +namespace CIAO +{ + class CIAO_SERVER_Export Dynamic_Component_Servant_Base + { + public: + explicit Dynamic_Component_Servant_Base (void); + + virtual ~Dynamic_Component_Servant_Base (void); + + virtual PortableServer::Servant create (void) = 0; + + }; + + template<typename COMP_SERVANT> + class Dynamic_Component_Servant : public Dynamic_Component_Servant_Base + { + public: + PortableServer::Servant create (void) + { + return new COMP_SERVANT; + } +} + +#include /**/ "ace/post.h" + +#endif /* CIAO_DYNAMIC_COMPONENT_SERVANT_BASE_H */ |