Shared_Memory.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //==========================================================================
00004 /**
00005  *  @file    Shared_Memory.h
00006  *
00007  *  Shared_Memory.h,v 4.16 2005/11/26 03:13:13 ossama Exp
00008  *
00009  *  @author Doug Schmidt
00010  */
00011 //==========================================================================
00012 
00013 
00014 #ifndef ACE_SHARED_MEMORY_H
00015 #define ACE_SHARED_MEMORY_H
00016 
00017 #include /**/ "ace/pre.h"
00018 
00019 #include "ace/ACE_export.h"
00020 
00021 #include "ace/os_include/os_stddef.h"
00022 
00023 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00024 # pragma once
00025 #endif /* ACE_LACKS_PRAGMA_ONCE */
00026 
00027 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00028 
00029 /**
00030  * @class ACE_Shared_Memory
00031  *
00032  * @brief This base class adapts both System V shared memory and "BSD"
00033  * mmap to a common API.
00034  *
00035  * This is a very simple-minded wrapper, i.e., it really is only
00036  * useful for allocating large contiguous chunks of shared
00037  * memory.  For a much more sophisticated version, please check
00038  * out the <ACE_Malloc> class.
00039  */
00040 class ACE_Export ACE_Shared_Memory
00041 {
00042 public:
00043   virtual ~ACE_Shared_Memory (void);
00044 
00045   // = Note that all the following methods are pure virtual.
00046   virtual int close (void) = 0;
00047   virtual int remove (void) = 0;
00048   virtual void *malloc (size_t = 0) = 0;
00049   virtual int free (void *p) = 0;
00050   virtual int get_segment_size (void) const = 0;
00051   virtual ACE_HANDLE get_id (void) const = 0;
00052 };
00053 
00054 ACE_END_VERSIONED_NAMESPACE_DECL
00055 
00056 #include /**/ "ace/post.h"
00057 
00058 #endif /* ACE_SHARED_MEMORY_H */

Generated on Thu Nov 9 09:42:03 2006 for ACE by doxygen 1.3.6