SHMIOP_Factory.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  * @file SHMIOP_Factory.h
00006  *
00007  * SHMIOP_Factory.h,v 1.9 2006/04/19 11:38:50 jwillemsen Exp
00008  *
00009  * @author Nanbor Wang <nanbor@cs.wustl.edu>
00010  */
00011 //=============================================================================
00012 
00013 #ifndef TAO_SHMIOP_FACTORY_H
00014 #define TAO_SHMIOP_FACTORY_H
00015 
00016 #include /**/ "ace/pre.h"
00017 
00018 #include "tao/orbconf.h"
00019 
00020 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00021 # pragma once
00022 #endif /* ACE_LACKS_PRAGMA_ONCE */
00023 
00024 #if defined (TAO_HAS_SHMIOP) && (TAO_HAS_SHMIOP != 0)
00025 
00026 #include "tao/Protocol_Factory.h"
00027 #include "tao/Strategies/strategies_export.h"
00028 
00029 #include "ace/Service_Config.h"
00030 
00031 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00032 
00033 class TAO_Acceptor;
00034 class TAO_Connector;
00035 
00036 class TAO_Strategies_Export TAO_SHMIOP_Protocol_Factory
00037   : public TAO_Protocol_Factory
00038 {
00039 public:
00040   /// Constructor.
00041   TAO_SHMIOP_Protocol_Factory (void);
00042 
00043   /// Destructor.
00044   virtual ~TAO_SHMIOP_Protocol_Factory (void);
00045 
00046   // = Service Configurator hooks.
00047   /// Dynamic linking hook
00048   virtual int init (int argc, ACE_TCHAR* argv[]);
00049 
00050   /// Verify prefix is a match
00051   virtual int match_prefix (const ACE_CString &prefix);
00052 
00053   /// Returns the prefix used by the protocol.
00054   virtual const char *prefix (void) const;
00055 
00056   /// Return the character used to mark where an endpoint ends and
00057   /// where its options begin.
00058   virtual char options_delimiter (void) const;
00059 
00060   /**
00061    * @name Protocol factory methods
00062    *
00063    * Check Protocol_Factory.h for a description of these methods.
00064    */
00065   //@{
00066   virtual TAO_Acceptor  *make_acceptor (void);
00067   virtual TAO_Connector *make_connector  (void);
00068   virtual int requires_explicit_endpoint (void) const;
00069   //@}
00070 
00071   /// Set mmap file prefix
00072   void mmap_file_prefix (const ACE_TCHAR *prefix);
00073 
00074   /// Get mmap file prefix
00075   const ACE_TCHAR *mmap_file_prefix (void);
00076 
00077 private:
00078   int major_;
00079   int minor_;
00080   // Changing the version number can be used to provide backwards
00081   // compatibility with old clients.
00082 
00083   /// Specify the prefix (full path) for mmap files
00084   ACE_TCHAR *mmap_prefix_;
00085 
00086   /// Minimum bytes of the mmap files.
00087   off_t min_bytes_;
00088 };
00089 
00090 TAO_END_VERSIONED_NAMESPACE_DECL
00091 
00092 ACE_STATIC_SVC_DECLARE (TAO_SHMIOP_Protocol_Factory)
00093 ACE_FACTORY_DECLARE (TAO_Strategies, TAO_SHMIOP_Protocol_Factory)
00094 
00095 #endif /* TAO_HAS_SHMIOP && TAO_HAS_SHMIOP != 0 */
00096 
00097 #include /**/ "ace/post.h"
00098 
00099 #endif /* TAO_SHMIOP_FACTORY_H */

Generated on Thu Nov 9 13:39:30 2006 for TAO_Strategies by doxygen 1.3.6