27 #ifndef G2O_SCOPED_POINTER_H 28 #define G2O_SCOPED_POINTER_H 35 struct ScopedPointerDeleter
38 void operator()(T* t) {
delete t;}
45 template <
typename T,
typename Del = ScopedPo
interDeleter>
62 T*
get()
const {
return _pointer;}
69 assert((p == 0 || p != _pointer) &&
"ScopedPointer should not reset with itself");
109 assert(_pointer != 0 && i >= 0);
114 T*
get()
const {
return _pointer;}
121 assert((p == 0 || p != _pointer) &&
"ScopedPointer should not reset with itself");
T * operator->() const
access the pointer via ->
T & operator[](std::ptrdiff_t i) const
void swap(ScopedPointer &b)
T & operator*() const
dereference the pointer
a scoped pointer for an objectarray, i.e., object will be deleted on leaving the scope ...
a scoped pointer for an array, i.e., array will be deleted on leaving the scope
void swap(ScopedArray &b)