diff options
author | jai <jai@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2007-01-29 21:15:18 +0000 |
---|---|---|
committer | jai <jai@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2007-01-29 21:15:18 +0000 |
commit | b71531b42b3325fd6079a7039aae8641262c8adf (patch) | |
tree | a5b9aa16924c541fcb424ee9460b1ac7f5a89352 /modules/CIAO/ciaosvcs/Events/CIAO_EventService_Factory_impl.h | |
parent | a0f67cc97c0050d907145e312135b60c0125e56e (diff) | |
download | ATCD-DS-main.tar.gz |
branching/taggingDS-main
Diffstat (limited to 'modules/CIAO/ciaosvcs/Events/CIAO_EventService_Factory_impl.h')
-rw-r--r-- | modules/CIAO/ciaosvcs/Events/CIAO_EventService_Factory_impl.h | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/modules/CIAO/ciaosvcs/Events/CIAO_EventService_Factory_impl.h b/modules/CIAO/ciaosvcs/Events/CIAO_EventService_Factory_impl.h new file mode 100644 index 00000000000..7ba36ac9a0d --- /dev/null +++ b/modules/CIAO/ciaosvcs/Events/CIAO_EventService_Factory_impl.h @@ -0,0 +1,82 @@ +// -*- C++ -*- + +//============================================================================= +/** + * @file CIAO_EventService_Factory_impl.h + * + * $Id$ + * + * @author Gan Deng <dengg@dre.vanderbilt.edu> + * @author George Edwards <g.edwards@vanderbilt.edu> + */ +//============================================================================= + +#ifndef CIAO_EVENTSERVICE_FACTORY_IMPL_H +#define CIAO_EVENTSERVICE_FACTORY_IMPL_H +#include /**/ "ace/pre.h" + +#include "tao/PortableServer/PortableServer.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +#pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "CIAO_Events_Export.h" +#include "ciaosvcs/Events/CIAO_Events_Base/CIAO_EventServiceBase.h" + +namespace CIAO +{ + class CIAO_EVENTS_Export EventService_Factory_impl : + public ACE_Service_Object + { + public: + EventService_Factory_impl (void); + + EventService_Factory_impl (CORBA::ORB_ptr orb, + PortableServer::POA_ptr poa); + + //void init (CORBA::ORB_ptr orb, + // PortableServer::POA_ptr poa); + + virtual ~EventService_Factory_impl (void); + + /// A factory method which creates an CIAO_Event_Service object + virtual CIAO_Event_Service_ptr create (EventServiceType type, + const char * ec_name); + + virtual void initialize (CORBA::ORB_ptr orb, PortableServer::POA_ptr poa); + + /// Used to force the initialization. + static int Initializer (void); + + private: + /// Reference to the ORB + CORBA::ORB_var orb_; + + /// Reference to the Root POA + PortableServer::POA_var poa_; + }; + +ACE_STATIC_SVC_DECLARE (EventService_Factory_impl) +ACE_FACTORY_DECLARE (CIAO_EVENTS, EventService_Factory_impl) + +} + +#if defined (ACE_HAS_BROKEN_STATIC_CONSTRUCTORS) + +typedef int (*CIAO_Module_Initializer) (void); + +static CIAO_Module_Initializer +CIAO_Requires_EventService_Initializer = + &CIAO::EventService_Factory_impl::Initializer; + +#else + +static int +CIAO_Requires_EventService_Initializer = + CIAO::EventService_Factory_impl::Initializer (); + +#endif /* ACE_HAS_BROKEN_STATIC_CONSTRUCTORS */ + +#include /**/ "ace/post.h" +#endif /* CIAO_EVENTSERVICE_FACTORY_IMPL_H */ |