Container::PrivateGenericImplementation::MemoryPolicy< T > Struct Template Reference

#include <Container.hpp>

List of all members.


Detailed Description

template<typename T>
struct Container::PrivateGenericImplementation::MemoryPolicy< T >

The memory policy interface.


Static Public Member Functions

static bool CompareArray (const T *array1, const T *array2, const size_t &commonSize)
 Compare array.
static void Copy (T &dest, const T &src)
 This method copy (can also move depending on policy) the given data.
static void CopyArray (T *&dest, const T *src, size_t &destSize, const size_t &srcSize)
 This method copy the srcSize data from src to dest, resizing dest if required.
static void CopyArray (T *dest, const T *src, const size_t &destSize, const size_t &srcSize)
 This method copy the srcSize data from src to dest, but doesn't resizing dest if it's too small (Copy is then limited to destSize elements).
static T & DefaultElement ()
 This method returns a default constructed element or can throw.
static void DeleteArray (const T *array, const size_t &currentSize)
 Delete the array.
static T * Insert (const T *array, const size_t &currentSize, const size_t &newSize, const size_t &index, const T &elementToInsert)
 This method perform a non destructive allocation in place if possible or move the given array to a new place copying data in it, plus inserting the given object at the given place and DefaultElement for empty places if any.
static T * NonDestructiveAlloc (const T *array, const size_t &currentSize, const size_t &newSize, const T &fillWith)
 This method perform a non destructive allocation in place if possible or move the given array to a new place copying data in it.
static size_t ReverseSearch (const T *array, const size_t &arraySize, const T &valueToLookFor)
 This method search for the last element that match the given element and returns arraySize if not found.
static size_t Search (const T *array, const size_t &arraySize, const T &valueToLookFor)
 This method search for the first element that match the given element and returns arraySize if not found.


Member Function Documentation

template<typename T>
static bool Container::PrivateGenericImplementation::MemoryPolicy< T >::CompareArray ( const T *  array1,
const T *  array2,
const size_t &  commonSize 
) [static]

Compare array.

template<typename T>
static void Container::PrivateGenericImplementation::MemoryPolicy< T >::Copy ( T &  dest,
const T &  src 
) [static]

This method copy (can also move depending on policy) the given data.

template<typename T>
static void Container::PrivateGenericImplementation::MemoryPolicy< T >::CopyArray ( T *&  dest,
const T *  src,
size_t &  destSize,
const size_t &  srcSize 
) [static]

This method copy the srcSize data from src to dest, resizing dest if required.

Warning:
dest must not be NULL

template<typename T>
static void Container::PrivateGenericImplementation::MemoryPolicy< T >::CopyArray ( T *  dest,
const T *  src,
const size_t &  destSize,
const size_t &  srcSize 
) [static]

This method copy the srcSize data from src to dest, but doesn't resizing dest if it's too small (Copy is then limited to destSize elements).

template<typename T>
static T& Container::PrivateGenericImplementation::MemoryPolicy< T >::DefaultElement (  )  [static]

This method returns a default constructed element or can throw.

template<typename T>
static void Container::PrivateGenericImplementation::MemoryPolicy< T >::DeleteArray ( const T *  array,
const size_t &  currentSize 
) [static]

Delete the array.

template<typename T>
static T* Container::PrivateGenericImplementation::MemoryPolicy< T >::Insert ( const T *  array,
const size_t &  currentSize,
const size_t &  newSize,
const size_t &  index,
const T &  elementToInsert 
) [static]

This method perform a non destructive allocation in place if possible or move the given array to a new place copying data in it, plus inserting the given object at the given place and DefaultElement for empty places if any.

template<typename T>
static T* Container::PrivateGenericImplementation::MemoryPolicy< T >::NonDestructiveAlloc ( const T *  array,
const size_t &  currentSize,
const size_t &  newSize,
const T &  fillWith 
) [static]

This method perform a non destructive allocation in place if possible or move the given array to a new place copying data in it.

template<typename T>
static size_t Container::PrivateGenericImplementation::MemoryPolicy< T >::ReverseSearch ( const T *  array,
const size_t &  arraySize,
const T &  valueToLookFor 
) [static]

This method search for the last element that match the given element and returns arraySize if not found.

template<typename T>
static size_t Container::PrivateGenericImplementation::MemoryPolicy< T >::Search ( const T *  array,
const size_t &  arraySize,
const T &  valueToLookFor 
) [static]

This method search for the first element that match the given element and returns arraySize if not found.


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

(C) An X-Ryl669 project 2007

This document describes Unlimited Zooming Interface source code. UZI stands for Unlimited Zooming Interface, and source code license is