51 #ifndef CGAL_HANDLE_FOR_H
52 #define CGAL_HANDLE_FOR_H
58 template <
class RefCounted,
class Allocator>
class Handle_for;
80 template <
class RefCounted,
105 ptr->add_reference();
110 ptr->remove_reference();
111 if ( !
ptr->is_referenced() )
121 h.
ptr->add_reference();
122 ptr->remove_reference();
123 if ( !
ptr->is_referenced() )
141 if (
ptr->is_shared() )
143 RefCounted* tmp_ptr =
allocator.allocate(1);
145 ptr->remove_reference();
156 {
return reinterpret_cast<long int>( &(*ptr)); }
160 typename Allocator::pointer
ptr;
164 template <
class RefCounted,
class Allocator>
168 #endif // CGAL_HANDLE_FOR_H
Handle_for(const RefCounted &rc)
Handle_for(const Handle_for &h)
#define CGAL_ALLOCATOR(t)
Handle_for & operator=(const Handle_for &h)
void initialize_with(const RefCounted &rc)
Ref_counted(const Ref_counted &)
static Allocator allocator
bool identical(const Handle_for &h) const