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 );
153 inline void*
operator new( size_t );
156 inline void operator delete(
void *pObj );
173 : fCount(0), fRep( pObj )
175 if( pObj != 0 ) fCount = 1;
193 if( --fCount == 0 )
delete this;
232 if( fObj ) fObj->Release();
239 if( fObj != right.fObj )
243 this->fObj = right.fObj;
262 return( fObj ? fObj->fCount : 0 );
268 return( fObj ? fObj->fRep : 0 );
274 return( ( !fObj ) ?
true :
false );
280 return( ( fObj ) ?
true :
false );
286 return( fObj ? fObj->fRep : 0 );
311 #endif // _G4REFERENCECOUNTEDHANDLE_H_
G4GLOB_DLL G4ThreadLocal G4Allocator< G4ReferenceCountedHandle< void > > * aRCHAllocator
G4ReferenceCountedHandle< X > & operator=(const G4ReferenceCountedHandle< X > &right)
G4ReferenceCountedHandle(X *rep=0)
G4GLOB_DLL G4ThreadLocal G4Allocator< G4CountedObject< void > > * aCountedObjectAllocator
G4CountedObject(X *pObj=0)
~G4ReferenceCountedHandle()
unsigned int Count() const