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

#include <common.h>

Public Types

typedef C element_type
 

Public Member Functions

 scoped_array (C *p=NULL)
 
 ~scoped_array ()
 
void reset (C *p=NULL)
 
C & operator[] (std::ptrdiff_t i) const
 
C * get () const
 
bool operator== (C *p) const
 
bool operator!= (C *p) const
 
void swap (scoped_array &p2)
 
C * release ()
 

Private Member Functions

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

Private Attributes

C * array_
 

Member Typedef Documentation

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

Constructor & Destructor Documentation

template<class C>
google::protobuf::internal::scoped_array< C >::scoped_array ( C *  p = NULL)
inlineexplicit
542 : array_(p) { }
C * array_
Definition: common.h:601
template<class C>
google::protobuf::internal::scoped_array< C >::~scoped_array ( )
inline
546  {
547  enum { type_must_be_complete = sizeof(C) };
548  delete[] array_;
549  }
C * array_
Definition: common.h:601
template<class C>
google::protobuf::internal::scoped_array< C >::scoped_array ( const scoped_array< C > &  )
private

Member Function Documentation

template<class C>
C* google::protobuf::internal::scoped_array< C >::get ( ) const
inline
572  {
573  return array_;
574  }
C * array_
Definition: common.h:601
template<class C>
bool google::protobuf::internal::scoped_array< C >::operator!= ( C *  p) const
inline
580 { return array_ != p; }
C * array_
Definition: common.h:601
template<class C>
template<class C2 >
bool google::protobuf::internal::scoped_array< C >::operator!= ( scoped_array< C2 > const p2) const
private
template<class C>
void google::protobuf::internal::scoped_array< C >::operator= ( const scoped_array< C > &  )
private
template<class C>
bool google::protobuf::internal::scoped_array< C >::operator== ( C *  p) const
inline
579 { return array_ == p; }
C * array_
Definition: common.h:601
template<class C>
template<class C2 >
bool google::protobuf::internal::scoped_array< C >::operator== ( scoped_array< C2 > const p2) const
private
template<class C>
C& google::protobuf::internal::scoped_array< C >::operator[] ( std::ptrdiff_t  i) const
inline
564  {
565  assert(i >= 0);
566  assert(array_ != NULL);
567  return array_[i];
568  }
C * array_
Definition: common.h:601
arena_t NULL
Definition: jemalloc_internal.h:624
template<class C>
C* google::protobuf::internal::scoped_array< C >::release ( )
inline
594  {
595  C* retVal = array_;
596  array_ = NULL;
597  return retVal;
598  }
C * array_
Definition: common.h:601
arena_t NULL
Definition: jemalloc_internal.h:624
template<class C>
void google::protobuf::internal::scoped_array< C >::reset ( C *  p = NULL)
inline
554  {
555  if (p != array_) {
556  enum { type_must_be_complete = sizeof(C) };
557  delete[] array_;
558  array_ = p;
559  }
560  }
C * array_
Definition: common.h:601
template<class C>
void google::protobuf::internal::scoped_array< C >::swap ( scoped_array< C > &  p2)
inline
583  {
584  C* tmp = array_;
585  array_ = p2.array_;
586  p2.array_ = tmp;
587  }
C * array_
Definition: common.h:601

Member Data Documentation

template<class C>
C* google::protobuf::internal::scoped_array< C >::array_
private

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