defalloc.h

00001 /*
00002  *
00003  * Copyright (c) 1994
00004  * Hewlett-Packard Company
00005  *
00006  * Permission to use, copy, modify, distribute and sell this software
00007  * and its documentation for any purpose is hereby granted without fee,
00008  * provided that the above copyright notice appear in all copies and
00009  * that both that copyright notice and this permission notice appear
00010  * in supporting documentation.  Hewlett-Packard Company makes no
00011  * representations about the suitability of this software for any
00012  * purpose.  It is provided "as is" without express or implied warranty.
00013  *
00014  */
00015 
00016 // Inclusion of this file is DEPRECATED.  This is the original HP
00017 // default allocator.  It is provided only for backward compatibility.
00018 // This file WILL BE REMOVED in a future release.
00019 //
00020 // DO NOT USE THIS FILE unless you have an old container implementation
00021 // that requires an allocator with the HP-style interface.  
00022 //
00023 // Standard-conforming allocators have a very different interface.  The
00024 // standard default allocator is declared in the header <memory>.
00025 
00026 // Adaptation note: THIS version of allocator<T> is fully compatible with
00027 // SGI containers and works OK standalone. It is also as close to CD2 version
00028 // as possible w/o member templates.
00029 // However, explicit use of allocator<T>  is not recommended 
00030 // unless you have to do so ( for example, compiling third-party code).
00031 
00032 #ifndef _STLP_DEFALLOC_H
00033 #define _STLP_DEFALLOC_H
00034 
00035 # ifndef _STLP_OUTERMOST_HEADER_ID
00036 #  define _STLP_OUTERMOST_HEADER_ID 0xa005
00037 #  include <stl/_prolog.h>
00038 # endif
00039 
00040 # if defined (_STLP_DEBUG) && ! defined ( _STLP_DEBUG_H )
00041 #  include <stl/debug/_debug.h>
00042 # endif
00043 
00044 #if defined (_STLP_USE_NEW_STYLE_HEADERS)
00045 # include <cstddef>
00046 # include <cstdlib>
00047 # include <cstring>
00048 # include <cassert>
00049 #else
00050 # include <stddef.h>
00051 # include <stdlib.h>
00052 # include <string.h>
00053 # include <assert.h>
00054 #endif
00055 
00056 # include <new>
00057 
00058 #ifdef _STLP_THREADS
00059 # include <stl/_threads.h>
00060 #endif
00061 
00062 # if !defined (__THROW_BAD_ALLOC) && !defined(_STLP_USE_EXCEPTIONS)
00063 #   if defined (_STLP_USE_NEW_STYLE_HEADERS)
00064 #    include <cstdio>
00065 #   else
00066 #    include <stdio.h>
00067 #   endif
00068 # endif
00069 #  include <stl/_alloc.h>
00070 
00071 // fbp: just for backwards compatibility,
00072 // hope this doesn't break anything.
00073 #ifdef _STLP_USE_NAMESPACES
00074 # ifdef _STLP_BROKEN_USING_DIRECTIVE
00075 using namespace STLPORT;
00076 # else
00077 using STLPORT::allocator;
00078 # endif /* _STLP_BROKEN_USING_DIRECTIVE */
00079 #endif /*  _STLP_USE_NAMESPACES */
00080 
00081 # if (_STLP_OUTERMOST_HEADER_ID == 0xa005)
00082 #  include <stl/_epilog.h>
00083 #  undef _STLP_OUTERMOST_HEADER_ID
00084 # endif
00085 
00086 #endif /* _STLP_DEFALLOC_H */
00087 

Generated on Mon Jun 5 10:20:43 2006 for Intelligence.kdevelop by  doxygen 1.4.6