AudRecordLib
Classes | Public Types | Public Member Functions
StraightHeapAlloc< Type > Struct Template Reference

List of all members.

Classes

struct  rebind

Public Types

typedef std::allocator< Type > BaseAlloc
typedef BaseAlloc::pointer pointer

Public Member Functions

 StraightHeapAlloc ()
template<class Other >
 StraightHeapAlloc (const StraightHeapAlloc< Other > &)
pointer allocate (size_t count)
pointer allocate (size_t count, void *)
void deallocate (pointer pData, size_t)

Detailed Description

template<class Type>
struct StraightHeapAlloc< Type >

Allocator which directly uses the Win32 heap functions Inherits from allocator for those members which don't need to be changed. Yes, I know this is technically bad but its only debugging code.

Template Parameters:
TypeThe type to allocate memory for

Member Typedef Documentation

template<class Type >
typedef std::allocator<Type> StraightHeapAlloc< Type >::BaseAlloc

Base typedef for clarity

template<class Type >
typedef BaseAlloc::pointer StraightHeapAlloc< Type >::pointer

Pointer typedef, also for clarity


Constructor & Destructor Documentation

template<class Type >
StraightHeapAlloc< Type >::StraightHeapAlloc ( ) [inline]

Does nothing as there's nothing to construct

template<class Type >
template<class Other >
StraightHeapAlloc< Type >::StraightHeapAlloc ( const StraightHeapAlloc< Other > &  ) [inline]

Constructs an allocator of one type using a different type There's still nothing to construct so it does nothing


Member Function Documentation

template<class Type >
pointer StraightHeapAlloc< Type >::allocate ( size_t  count) [inline]

Allocates count * sizeof(Type) bytes of memory from the process heap and returns it

Parameters:
countThe number of Types to allocate
Returns:
The allocated memory
template<class Type >
pointer StraightHeapAlloc< Type >::allocate ( size_t  count,
void *   
) [inline]

Allocates count * sizeof(Type) bytes of memory from the process heap and returns it

Parameters:
countThe number of Types to allocate
Returns:
The allocated memory
template<class Type >
void StraightHeapAlloc< Type >::deallocate ( pointer  pData,
size_t   
) [inline]

Returns memory back to the process heap

Parameters:
pDataThe memory to free

The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Defines