55#ifndef _G4REFERENCECOUNTEDHANDLE_H_
56#define _G4REFERENCECOUNTEDHANDLE_H_ 1
84 inline unsigned int Count()
const;
96 inline operator bool()
const;
106 inline void*
operator new( size_t );
109 inline void operator delete(
void *pObj );
115 void*
operator new( size_t,
void *pObj );
127#ifdef G4GLOB_ALLOC_EXPORT
157 inline void*
operator new( size_t );
160 inline void operator delete(
void *pObj );
171#ifdef G4GLOB_ALLOC_EXPORT
181 : fCount(0), fRep( pObj )
203 if( --fCount == 0 )
delete this;
241 if( fObj ) fObj->Release();
248 if( fObj != right.fObj ) {
251 this->fObj = right.fObj;
270 return( fObj ? fObj->fCount : 0 );
276 return( fObj ? fObj->fRep : 0 );
282 return( ( !fObj ) ?
true :
false );
288 return( ( fObj ) ?
true :
false );
294 return( fObj ? fObj->fRep : 0 );
G4DLLIMPORT G4Allocator< G4ReferenceCountedHandle< void > > aRCHAllocator
G4DLLIMPORT G4Allocator< G4CountedObject< void > > aCountedObjectAllocator
G4CountedObject(X *pObj=0)
unsigned int Count() const
G4ReferenceCountedHandle(X *rep=0)
G4ReferenceCountedHandle< X > & operator=(const G4ReferenceCountedHandle< X > &right)
G4ReferenceCountedHandle(const G4ReferenceCountedHandle< X > &right)
~G4ReferenceCountedHandle()