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

Shared_Memory.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //==========================================================================
00004 /**
00005  *  @file    Shared_Memory.h
00006  *
00007  *  $Id: Shared_Memory.h,v 1.1.1.4 2003/02/21 18:36:32 chad 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 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00022 # pragma once
00023 #endif /* ACE_LACKS_PRAGMA_ONCE */
00024 
00025 #include "ace/OS.h"
00026 
00027 /**
00028  * @class ACE_Shared_Memory
00029  *
00030  * @brief This base class adapts both System V shared memory and "BSD"
00031  * mmap to a common API.
00032  *
00033  * This is a very simple-minded wrapper, i.e., it really is only
00034  * useful for allocating large contiguous chunks of shared
00035  * memory.  For a much more sophisticated version, please check
00036  * out the <ACE_Malloc> class.
00037  */
00038 class ACE_Export ACE_Shared_Memory
00039 {
00040 public:
00041   virtual ~ACE_Shared_Memory (void);
00042 
00043   // = Note that all the following methods are pure virtual.
00044   virtual int close (void) = 0;
00045   virtual int remove (void) = 0;
00046   virtual void *malloc (size_t = 0) = 0;
00047   virtual int free (void *p) = 0;
00048   virtual int get_segment_size (void) const = 0;
00049   virtual ACE_HANDLE get_id (void) const = 0;
00050 };
00051 
00052 #include "ace/post.h"
00053 
00054 #endif /* ACE_SHARED_MEMORY_H */

Generated on Mon Jun 16 11:21:13 2003 for ACE by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002