Generated on: Thu Mar 29 07:46:58 PDT 2012 for custom file set
// doxy/ or-tools/ src/ base/

or-tools/src/base/scoped_ptr.h File Reference

#include <assert.h>
#include <stdlib.h>
#include <algorithm>
#include <cstddef>
#include "base/basictypes.h"
#include "base/macros.h"

Go to the source code of this file.

Namespaces

namespace  operations_research

Classes

class  operations_research::scoped_ptr< C >
 A scoped_ptr<T> is like a T*, except that the destructor of scoped_ptr<T> automatically deletes the pointer it holds (if any). More...
class  operations_research::scoped_array< C >
 scoped_array<C> is like scoped_ptr<C>, except that the caller must allocate with new [] and the destructor deletes objects with delete []. More...
class  operations_research::ScopedPtrMallocFree
 This class wraps the c library function free() in a class that can be passed as a template argument to scoped_ptr_malloc below. More...
class  operations_research::scoped_ptr_malloc< C, FreeProc >
 scoped_ptr_malloc<> is similar to scoped_ptr<>, but it accepts a second template argument, the functor used to free the object. More...

Functions

template<class C>
scoped_ptr< C > operations_research::make_scoped_ptr (C *param)
template<class C>
void operations_research::swap (scoped_ptr< C > &p1, scoped_ptr< C > &p2)
 Free functions.
template<class C>
bool operations_research::operator== (C *p1, const scoped_ptr< C > &p2)
template<class C>
bool operations_research::operator!= (C *p1, const scoped_ptr< C > &p2)
template<class C>
void operations_research::swap (scoped_array< C > &p1, scoped_array< C > &p2)
 Free functions.
template<class C>
bool operations_research::operator== (C *p1, const scoped_array< C > &p2)
template<class C>
bool operations_research::operator!= (C *p1, const scoped_array< C > &p2)
template<class C, class FP>
void operations_research::swap (scoped_ptr_malloc< C, FP > &a, scoped_ptr_malloc< C, FP > &b)
template<class C, class FP>
bool operations_research::operator== (C *p, const scoped_ptr_malloc< C, FP > &b)
template<class C, class FP>
bool operations_research::operator!= (C *p, const scoped_ptr_malloc< C, FP > &b)