Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

RMCast_Singleton_Factory.h

Go to the documentation of this file.
00001 /* -*- C++ -*- */
00002 // $Id: RMCast_Singleton_Factory.h,v 1.1.1.2 2003/02/21 18:36:32 chad Exp $
00003 
00004 // ============================================================================
00005 //
00006 // = LIBRARY
00007 //    ace
00008 //
00009 // = FILENAME
00010 //    RMCast_Singleton_Factory.h
00011 //
00012 // = AUTHOR
00013 //    Carlos O'Ryan <coryan@uci.edu>
00014 //
00015 // ============================================================================
00016 
00017 #ifndef ACE_RMCAST_SINGLETON_FACTORY_H
00018 #define ACE_RMCAST_SINGLETON_FACTORY_H
00019 #include "ace/pre.h"
00020 
00021 #include "RMCast_Module_Factory.h"
00022 
00023 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00024 # pragma once
00025 #endif /* ACE_LACKS_PRAGMA_ONCE */
00026 
00027 /// Implement an ACE_RMCast_Module_Factory that "creates" a single
00028 /// object.
00029 /**
00030  * Many applications (and even some internal components), will use a
00031  * single ACE_RMCast_Module to process all the events, for example, a
00032  * receiver may decide to use the same ACE_RMCast_Module to process
00033  * all incoming events, instead of using one per remote sender.
00034  */
00035 class ACE_RMCast_Export ACE_RMCast_Singleton_Factory : public ACE_RMCast_Module_Factory
00036 {
00037 public:
00038   /// Constructor
00039   /**
00040    * @param singleton This object is returned by any call to
00041    * create().
00042    */
00043   ACE_RMCast_Singleton_Factory (ACE_RMCast_Module *singleton);
00044 
00045   //! Destructor
00046   virtual ~ACE_RMCast_Singleton_Factory (void);
00047 
00048   virtual ACE_RMCast_Module *create (void);
00049   virtual void destroy (ACE_RMCast_Module *);
00050 
00051 private:
00052   /// The singleton object
00053   ACE_RMCast_Module *singleton_;
00054 };
00055 
00056 #if defined (__ACE_INLINE__)
00057 #include "RMCast_Singleton_Factory.i"
00058 #endif /* __ACE_INLINE__ */
00059 
00060 #include "ace/post.h"
00061 #endif /* ACE_RMCAST_SINGLETON_FACTORY_H */

Generated on Mon Jun 16 13:12:38 2003 for ACE_RMCast by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002