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

Shared_Memory_SV.i

Go to the documentation of this file.
00001 /* -*- C++ -*- */
00002 // $Id: Shared_Memory_SV.i,v 1.1.1.3 2003/02/21 18:36:32 chad Exp $
00003 
00004 // Shared_Memory_SV.i
00005 
00006 ACE_INLINE int         
00007 ACE_Shared_Memory_SV::open (key_t id, 
00008                             int length, 
00009                             int create, 
00010                             int perms, 
00011                             void *addr, 
00012                             int flags)
00013 {
00014   ACE_TRACE ("ACE_Shared_Memory_SV::open");
00015   return shared_memory_.open_and_attach (id, length, create, 
00016                                          perms, addr, flags);
00017 }
00018 
00019 // The overall size of the segment. 
00020 
00021 ACE_INLINE int
00022 ACE_Shared_Memory_SV::get_segment_size (void) const
00023 {
00024   ACE_TRACE ("ACE_Shared_Memory_SV::get_segment_size");
00025   // This cast is ok since the 'open' method for this class allows only
00026   // an 'int' size. Therefore, this case should not lose information.
00027   return ACE_static_cast (int, this->shared_memory_.get_segment_size ());
00028 }
00029 
00030 // Removes the shared memory segment.
00031 
00032 ACE_INLINE int
00033 ACE_Shared_Memory_SV::remove (void)
00034 {
00035   ACE_TRACE ("ACE_Shared_Memory_SV::remove");
00036   return shared_memory_.remove ();
00037 }
00038 
00039 // Closes (detaches) the shared memory segment. 
00040 
00041 ACE_INLINE int
00042 ACE_Shared_Memory_SV::close (void)
00043 {
00044   ACE_TRACE ("ACE_Shared_Memory_SV::close");
00045   return shared_memory_.detach ();
00046 }
00047 
00048 ACE_INLINE void *
00049 ACE_Shared_Memory_SV::malloc (size_t)
00050 {
00051   ACE_TRACE ("ACE_Shared_Memory_SV::malloc");
00052   return this->shared_memory_.get_segment_ptr ();
00053 }
00054 
00055 ACE_INLINE ACE_HANDLE
00056 ACE_Shared_Memory_SV::get_id (void) const
00057 {
00058   ACE_TRACE ("ACE_Shared_Memory_SV::get_id");
00059   return this->shared_memory_.get_id ();
00060 }
00061 
00062 // The "do-nothing" constructor.
00063 
00064 ACE_INLINE
00065 ACE_Shared_Memory_SV::ACE_Shared_Memory_SV (void)
00066 {
00067   ACE_TRACE ("ACE_Shared_Memory_SV::ACE_Shared_Memory_SV");
00068 }
00069 
00070 ACE_INLINE int  
00071 ACE_Shared_Memory_SV::free (void *p)
00072 {
00073   ACE_TRACE ("ACE_Shared_Memory_SV::free");
00074   return p != 0;
00075 }

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