AGXDynamics  2.31.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
agxUnit::AlwaysFailingAllocator< T > Class Template Reference

Never allocates anything, throws always an exception. Only for testing. More...

#include <ContainerTests.h>

+ Inheritance diagram for agxUnit::AlwaysFailingAllocator< T >:

Public Member Functions

void * allocateBytes (size_t numBytes, size_t alignment=16)
 
void deallocateBytes (void *, size_t)
 
void setContainer (class agx::Container *)
 

Private Member Functions

T * allocate (size_t numElements)
 Allocate/deallocate raw memory. More...
 
void deallocate (T *buffer)
 
void deallocateBytes (void *buffer)
 
const char * getName () const
 

Static Private Member Functions

static void initMemory (void *data, size_t numBytes, agx::UInt32 pattern)
 
static void * standaloneAllocateBytes (size_t numBytes, size_t alignment=16)
 
static void standaloneDeallocateTypes (void *buffer)
 

Static Private Attributes

static agx::UInt32 allocatedMemoryPattern
 
static agx::UInt32 deallocatedMemoryPattern
 
static bool initMemoryFlag
 

Detailed Description

template<typename T>
class agxUnit::AlwaysFailingAllocator< T >

Never allocates anything, throws always an exception. Only for testing.

Definition at line 30 of file ContainerTests.h.

Member Function Documentation

template<typename T >
void* agxUnit::AlwaysFailingAllocator< T >::allocateBytes ( size_t  numBytes,
size_t  alignment = 16 
)
inline

Definition at line 33 of file ContainerTests.h.

References agxThrow, and agx::AgXString< std::string >::format().

template<typename T >
void agxUnit::AlwaysFailingAllocator< T >::deallocateBytes ( void *  ,
size_t   
)
inline

Definition at line 38 of file ContainerTests.h.

template<typename T >
void agxUnit::AlwaysFailingAllocator< T >::setContainer ( class agx::Container *  )
inline

Definition at line 42 of file ContainerTests.h.


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