home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / cset21v1.zip / IBMCPP / IBMCLASS / ICNROBJ.INL < prev    next >
Text File  |  1993-10-22  |  3KB  |  79 lines

  1. #ifndef _ICNROBJ_INL_
  2. #define _ICNROBJ_INL_ 0
  3. /*******************************************************************************
  4. * FILE NAME: icnrobj.inl                                                       *
  5. *                                                                              *
  6. * DESCRIPTION:                                                                 *
  7. *   This file contains the definition of the inline functions for the          *
  8. *   class(es) declared in icnrobj.hpp.                                         *
  9. *                                                                              *
  10. * COPYRIGHT:                                                                   *
  11. *   Licensed Materials - Property of IBM                                       *
  12. *   (C) Copyright IBM Corporation 1992, 1993                                   *
  13. *   All Rights Reserved                                                        *
  14. *   US Government Users Restricted Rights - Use, duplication, or               *
  15. *   disclosure                                                                 *
  16. *   restricted by GSA ADP Schedule Contract with IBM Corp.                     *
  17. *                                                                              *
  18. *******************************************************************************/
  19. #ifndef _ICNROBJ_
  20.   #undef  _ICNROBJ_INL_
  21.   #define _ICNROBJ_INL_ 1
  22.   #include <icnrobj.hpp>
  23. #endif
  24.  
  25. #ifdef __DEBUG_ALLOC__
  26.   #include <itrace.hpp>
  27. #endif
  28.  
  29. #if _ICNROBJ_INL_
  30.   #define inline
  31. #endif
  32.  
  33.  
  34. inline unsigned long IContainerObject ::  useCount() const
  35.     { return((IContainerObject*)this)->ulClUseCount; }
  36.  
  37. inline IMiniCnrRecord* IContainerObject ::  baseRecord()
  38.     { return((IContainerObject*)this)->pbase; }
  39.  
  40.  
  41.  
  42.  
  43. #ifdef __DEBUG_ALLOC__
  44. inline void* IContainerObject :: operator new ( size_t size,
  45.                                                 const char * fileName,
  46.                                                 size_t lineNumber)
  47. {
  48.   void* p = newRecord(size);
  49.   ITRACE_DEVELOP(IString("CnrObj::new at: ")+IString((unsigned long)p).d2x()+
  50.                  IString(" line: ") + IString(lineNumber) +
  51.                  IString(" in file: ") + IString(fileName));
  52.   return p;
  53. }
  54.  
  55. inline void IContainerObject :: operator delete ( void *p,
  56.                                                   const char * fileName,
  57.                                                   size_t lineNumber)
  58. {
  59.   ITRACE_DEVELOP(IString("CnrObj::delete: ")+IString((unsigned long)p).d2x()+
  60.                  IString(" line: ") + IString(lineNumber) +
  61.                  IString(" in file: ") + IString(fileName));
  62.   deleteRecord(p);
  63. }
  64. #else
  65. inline void * IContainerObject :: operator new ( size_t size)
  66. {
  67.   return  newRecord(size);
  68. }
  69. inline void IContainerObject :: operator delete ( void *p )
  70. {
  71.   deleteRecord(p);
  72. }
  73. #endif
  74.  
  75.  
  76.  
  77. #endif // _ICNROBJ_INL_
  78.  
  79.