Adobe Source Libraries 1.49.0
A collection of C++ libraries.
Loading...
Searching...
No Matches
ptr_traits< T * > Struct Template Reference

The ptr_traits class provide basic information and operations associated with a pointer type. More...

#include <memory.hpp>

Classes

struct  rebind

Public Types

enum  { is_array }
typedef T element_type
typedef T * pointer_type
typedef const pointer_type const_pointer_type

Static Public Member Functions

static void delete_ptr (pointer_type x) throw ()
static bool empty_ptr (const_pointer_type x) throw ()

Detailed Description

template<typename T>
struct adobe::ptr_traits< T * >

This section defines requirements on classes representing pointer traits. The template class ptr_traits< ptrT > is defined along with several specializations.

A pointer may be any type used to refer to another, possibly not visible, type.

In the following table, X denotes a Traits class defining types and functions for the pointer type PtrT. The type of the item refered to is T. T may be void or an incomplete type. The argument p is of type PtrT.

expressionreturn typenotescomplexity
X::element_typeTthe type of the item refered tocompile time
X::pointer_typePtrTif opaque, may be any type used to refer to Tcompile time
X::const_pointer_typeimplementation definedtype corresponding to PtrT refering to a const Tcompile time
X::is_arraybooltrue iff T is an array; type may also be convertable to boolcompile time
X::delete_ptr(p)voiddestructs and deallocates item refered to by p; if p is empty, delete_ptr() has no effectimplementation defined
X::empty_ptr(p)boolresult is true if p refers to nothing (corresponds to NULL); false otherwiseconstant

Definition at line 157 of file memory.hpp.

Member Typedef Documentation

◆ element_type

template<typename T>
typedef T element_type

Definition at line 158 of file memory.hpp.

◆ pointer_type

template<typename T>
typedef T* pointer_type

Definition at line 159 of file memory.hpp.

◆ const_pointer_type

template<typename T>
typedef const pointer_type const_pointer_type

Definition at line 160 of file memory.hpp.

Member Enumeration Documentation

◆ anonymous enum

template<typename T>
anonymous enum
Enumerator
is_array 

Definition at line 166 of file memory.hpp.

Member Function Documentation

◆ delete_ptr()

template<typename T>
void delete_ptr ( pointer_type x)
throw ( )
static

Definition at line 168 of file memory.hpp.

◆ empty_ptr()

template<typename T>
bool empty_ptr ( const_pointer_type x)
throw ( )
static

Definition at line 169 of file memory.hpp.