home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
cset21v1.zip
/
IBMCPP
/
IBMCLASS
/
ICNROBJ.INL
< prev
next >
Wrap
Text File
|
1993-10-22
|
3KB
|
79 lines
#ifndef _ICNROBJ_INL_
#define _ICNROBJ_INL_ 0
/*******************************************************************************
* FILE NAME: icnrobj.inl *
* *
* DESCRIPTION: *
* This file contains the definition of the inline functions for the *
* class(es) declared in icnrobj.hpp. *
* *
* COPYRIGHT: *
* Licensed Materials - Property of IBM *
* (C) Copyright IBM Corporation 1992, 1993 *
* All Rights Reserved *
* US Government Users Restricted Rights - Use, duplication, or *
* disclosure *
* restricted by GSA ADP Schedule Contract with IBM Corp. *
* *
*******************************************************************************/
#ifndef _ICNROBJ_
#undef _ICNROBJ_INL_
#define _ICNROBJ_INL_ 1
#include <icnrobj.hpp>
#endif
#ifdef __DEBUG_ALLOC__
#include <itrace.hpp>
#endif
#if _ICNROBJ_INL_
#define inline
#endif
inline unsigned long IContainerObject :: useCount() const
{ return((IContainerObject*)this)->ulClUseCount; }
inline IMiniCnrRecord* IContainerObject :: baseRecord()
{ return((IContainerObject*)this)->pbase; }
#ifdef __DEBUG_ALLOC__
inline void* IContainerObject :: operator new ( size_t size,
const char * fileName,
size_t lineNumber)
{
void* p = newRecord(size);
ITRACE_DEVELOP(IString("CnrObj::new at: ")+IString((unsigned long)p).d2x()+
IString(" line: ") + IString(lineNumber) +
IString(" in file: ") + IString(fileName));
return p;
}
inline void IContainerObject :: operator delete ( void *p,
const char * fileName,
size_t lineNumber)
{
ITRACE_DEVELOP(IString("CnrObj::delete: ")+IString((unsigned long)p).d2x()+
IString(" line: ") + IString(lineNumber) +
IString(" in file: ") + IString(fileName));
deleteRecord(p);
}
#else
inline void * IContainerObject :: operator new ( size_t size)
{
return newRecord(size);
}
inline void IContainerObject :: operator delete ( void *p )
{
deleteRecord(p);
}
#endif
#endif // _ICNROBJ_INL_