Classes | Public Types | Public Member Functions | List of all members
BentleyAllocator< _Ty > Class Template Reference

An STL-compliant allocator that calls bentleyAllocator_malloc and bentleyAllocator_free. More...

#include <BentleyAllocator.h>


struct  rebind

Public Types

typedef _Ty value_type
typedef _Ty * pointer
typedef _Ty & reference
typedef _Ty const * const_pointer
typedef _Ty const & const_reference
typedef std::size_t size_type
typedef std::ptrdiff_t difference_type

Public Member Functions

pointer address (reference _Val) const
const_pointer address (const_reference _Val) const
 BentleyAllocator ()
 BentleyAllocator (const BentleyAllocator< _Ty > &)
template<class _Other >
 BentleyAllocator (const BentleyAllocator< _Other > &)
template<class _Other >
BentleyAllocator< _Ty > & operator= (const BentleyAllocator< _Other > &)
void deallocate (pointer _Ptr, size_type _Size)
pointer allocate (size_type _Count)
pointer allocate (size_type _Count, typename std::allocator< void >::const_pointer)
void construct (pointer _Ptr, const _Ty &_Val)
void destroy (pointer _Ptr)
size_type max_size () const

Detailed Description

template<class _Ty>
class Bentley::BentleyAllocator< _Ty >

An STL-compliant allocator that calls bentleyAllocator_malloc and bentleyAllocator_free.

An instance of a class that uses BentleyAllocator avoids cross-DLL memory management problems. That makes this allocator useful for defining parameters of public API functions.

Member Typedef Documentation

typedef _Ty const* const_pointer
typedef _Ty const& const_reference
typedef std::ptrdiff_t difference_type
typedef _Ty* pointer
typedef _Ty& reference
typedef std::size_t size_type
typedef _Ty value_type

Constructor & Destructor Documentation

BentleyAllocator ( const BentleyAllocator< _Ty > &  )
BentleyAllocator ( const BentleyAllocator< _Other > &  )

Member Function Documentation

pointer address ( reference  _Val) const
const_pointer address ( const_reference  _Val) const
pointer allocate ( size_type  _Count)
pointer allocate ( size_type  _Count,
typename std::allocator< void >::const_pointer   
void construct ( pointer  _Ptr,
const _Ty &  _Val 
void deallocate ( pointer  _Ptr,
size_type  _Size 
void destroy ( pointer  _Ptr)
size_type max_size ( ) const
BentleyAllocator<_Ty>& operator= ( const BentleyAllocator< _Other > &  )

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

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.