TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
google::protobuf::internal::scoped_ptr< C > Class Template Reference

#include <common.h>

Public Types

typedef C element_type
 

Public Member Functions

 scoped_ptr (C *p=NULL)
 
 ~scoped_ptr ()
 
void reset (C *p=NULL)
 
C & operator* () const
 
C * operator-> () const
 
C * get () const
 
bool operator== (C *p) const
 
bool operator!= (C *p) const
 
void swap (scoped_ptr &p2)
 
C * release ()
 

Private Member Functions

template<class C2 >
bool operator== (scoped_ptr< C2 > const &p2) const
 
template<class C2 >
bool operator!= (scoped_ptr< C2 > const &p2) const
 
 scoped_ptr (const scoped_ptr &)
 
void operator= (const scoped_ptr &)
 

Private Attributes

C * ptr_
 

Member Typedef Documentation

template<class C>
typedef C google::protobuf::internal::scoped_ptr< C >::element_type

Constructor & Destructor Documentation

template<class C>
google::protobuf::internal::scoped_ptr< C >::scoped_ptr ( C *  p = NULL)
inlineexplicit
455 : ptr_(p) { }
C * ptr_
Definition: common.h:512
template<class C>
google::protobuf::internal::scoped_ptr< C >::~scoped_ptr ( )
inline
459  {
460  enum { type_must_be_complete = sizeof(C) };
461  delete ptr_;
462  }
C * ptr_
Definition: common.h:512
template<class C>
google::protobuf::internal::scoped_ptr< C >::scoped_ptr ( const scoped_ptr< C > &  )
private

Member Function Documentation

template<class C>
C* google::protobuf::internal::scoped_ptr< C >::get ( ) const
inline
485 { return ptr_; }
C * ptr_
Definition: common.h:512
template<class C>
bool google::protobuf::internal::scoped_ptr< C >::operator!= ( C *  p) const
inline
491 { return ptr_ != p; }
C * ptr_
Definition: common.h:512
template<class C>
template<class C2 >
bool google::protobuf::internal::scoped_ptr< C >::operator!= ( scoped_ptr< C2 > const p2) const
private
template<class C>
C& google::protobuf::internal::scoped_ptr< C >::operator* ( ) const
inline
477  {
478  assert(ptr_ != NULL);
479  return *ptr_;
480  }
arena_t NULL
Definition: jemalloc_internal.h:624
C * ptr_
Definition: common.h:512
template<class C>
C* google::protobuf::internal::scoped_ptr< C >::operator-> ( ) const
inline
481  {
482  assert(ptr_ != NULL);
483  return ptr_;
484  }
arena_t NULL
Definition: jemalloc_internal.h:624
C * ptr_
Definition: common.h:512
template<class C>
void google::protobuf::internal::scoped_ptr< C >::operator= ( const scoped_ptr< C > &  )
private
template<class C>
bool google::protobuf::internal::scoped_ptr< C >::operator== ( C *  p) const
inline
490 { return ptr_ == p; }
C * ptr_
Definition: common.h:512
template<class C>
template<class C2 >
bool google::protobuf::internal::scoped_ptr< C >::operator== ( scoped_ptr< C2 > const p2) const
private
template<class C>
C* google::protobuf::internal::scoped_ptr< C >::release ( )
inline
505  {
506  C* retVal = ptr_;
507  ptr_ = NULL;
508  return retVal;
509  }
arena_t NULL
Definition: jemalloc_internal.h:624
C * ptr_
Definition: common.h:512
template<class C>
void google::protobuf::internal::scoped_ptr< C >::reset ( C *  p = NULL)
inline
467  {
468  if (p != ptr_) {
469  enum { type_must_be_complete = sizeof(C) };
470  delete ptr_;
471  ptr_ = p;
472  }
473  }
C * ptr_
Definition: common.h:512
template<class C>
void google::protobuf::internal::scoped_ptr< C >::swap ( scoped_ptr< C > &  p2)
inline
494  {
495  C* tmp = ptr_;
496  ptr_ = p2.ptr_;
497  p2.ptr_ = tmp;
498  }
C * ptr_
Definition: common.h:512

Member Data Documentation

template<class C>
C* google::protobuf::internal::scoped_ptr< C >::ptr_
private

The documentation for this class was generated from the following file: