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

Obchunk.h

Go to the documentation of this file.
00001 /* -*- C++ -*- */
00002 //=============================================================================
00003 /**
00004  *  @file    Obchunk.h
00005  *
00006  *  $Id: Obchunk.h,v 1.1.1.1 2001/12/04 14:33:06 chad Exp $
00007  *
00008  *  @author Doug Schmidt
00009  */
00010 //=============================================================================
00011 
00012 
00013 #ifndef ACE_OBCHUNK_H
00014 #define ACE_OBCHUNK_H
00015 #include "ace/pre.h"
00016 
00017 #include "ace/Malloc.h"
00018 
00019 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00020 # pragma once
00021 #endif /* ACE_LACKS_PRAGMA_ONCE */
00022 
00023 /**
00024  * @class ACE_Obchunk
00025  *
00026  * @brief Defines the state that represents a "chunk" of memory.
00027  *        Evenything in this class is public because it is designed
00028  *        as an internal structure of Obstack_T and users are
00029  *        not supposed to use this class directly.
00030  * @sa ACE_Obstack_T
00031  */
00032 class ACE_Export ACE_Obchunk
00033 {
00034 public:
00035   /// Constructor.
00036   ACE_Obchunk (size_t size);
00037 
00038   /// Dtor.
00039   ~ACE_Obchunk (void);
00040 
00041   /// Dump the state of an object.
00042   void dump (void) const;
00043 
00044   /// Declare the dynamic allocation hooks.
00045   ACE_ALLOC_HOOK_DECLARE;
00046 
00047   /// Pointer to the end of the chunk.
00048   char *end_;
00049 
00050   /// Pointer to the head of the current building block.
00051   char *block_;
00052 
00053   /// Pointer to the current location in the chunk.
00054   char *cur_;
00055 
00056   /// Next chunk in the chain.
00057   ACE_Obchunk *next_;
00058 
00059   /**
00060    * Pointer to the beginning contents of this chunk.  This field is
00061    * actually overlayed by the memory allocated by
00062    * <ACE_Obstack::new_chunk>.  Therefore, it *must* come last.
00063    */
00064   char contents_[4];
00065 };
00066 
00067 #if defined (__ACE_INLINE__)
00068 #include "ace/Obchunk.i"
00069 #endif /* __ACE_INLINE__ */
00070 
00071 #include "ace/post.h"
00072 #endif /* ACE_OBCHUNK_H */

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