home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / include / ibuffern.inl < prev    next >
Encoding:
Text File  |  1996-02-22  |  1.7 KB  |  42 lines

  1. #ifndef _IBUFFERN_INL_
  2. #define _IBUFFERN_INL_ 0
  3. /*******************************************************************************
  4. * FILE NAME: ibuffern.inl                                                      *
  5. *                                                                              *
  6. * DESCRIPTION:                                                                 *
  7. *   This file contains the definition of the inline, non-memory-debug version  *
  8. *   of operators new and delete for the classes declared in ibuffer.hpp.       *
  9. *                                                                              *
  10. * COPYRIGHT:                                                                   *
  11. *   IBM Open Class Library                                                     *
  12. *   (C) Copyright International Business Machines Corporation 1992, 1996       *
  13. *   Licensed Material - Program-Property of IBM - All Rights Reserved.         *
  14. *   US Government Users Restricted Rights - Use, duplication, or disclosure    *
  15. *   restricted by GSA ADP Schedule Contract with IBM Corp.                     *
  16. *                                                                              *
  17. *******************************************************************************/
  18. #ifndef _IBUFFER_
  19.   #undef  _IBUFFERN_INL_
  20.   #define _IBUFFERN_INL_ 1
  21.   #include <ibuffer.hpp>
  22. #endif
  23.  
  24. #if _IBUFFERN_INL_
  25.   #define inline
  26. #endif
  27.  
  28. #ifndef __DEBUG_ALLOC__
  29. inline void* IBuffer::operator new ( size_t, unsigned realSize )
  30. {
  31.   void *p = ::new char[ checkAddition( sizeof( IBuffer ), realSize ) ];
  32.   return p;
  33. }
  34.  
  35. inline void IBuffer::operator delete ( void *p )
  36. {
  37.   ::delete [] (char*)p;
  38. }
  39. #endif
  40.  
  41. #endif // _IBUFFERN_INL_
  42.