Container::PlainOldDataPolicy::DefaultMemoryPolicy< T > Struct Template Reference

#include <Container.hpp>

List of all members.


Detailed Description

template<typename T>
struct Container::PlainOldDataPolicy::DefaultMemoryPolicy< T >

The default memory policy interface for plain old data.


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, not resizing dest even if required.
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 size_t min (size_t a, size_t b)
 Very stupid declaration of min, if missing.
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 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 given element and returns arraySize if not found.


Member Function Documentation

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

Compare array.

template<typename T>
static void Container::PlainOldDataPolicy::DefaultMemoryPolicy< T >::Copy ( T &  dest,
const T &  src 
) [inline, static]

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

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

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

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

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

template<typename T>
static T& Container::PlainOldDataPolicy::DefaultMemoryPolicy< T >::DefaultElement (  )  [inline, static]

This method returns a default constructed element or can throw.

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

Delete the array.

template<typename T>
static T* Container::PlainOldDataPolicy::DefaultMemoryPolicy< T >::Insert ( const T *  array,
const size_t &  currentSize,
const size_t &  newSize,
const size_t &  index,
const T &  elementToInsert 
) [inline, 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 size_t Container::PlainOldDataPolicy::DefaultMemoryPolicy< T >::min ( size_t  a,
size_t  b 
) [inline, static]

Very stupid declaration of min, if missing.

template<typename T>
static T* Container::PlainOldDataPolicy::DefaultMemoryPolicy< T >::NonDestructiveAlloc ( const T *  array,
const size_t &  currentSize,
const size_t &  newSize,
const T &  fillWith 
) [inline, 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::PlainOldDataPolicy::DefaultMemoryPolicy< T >::ReverseSearch ( const T *  array,
const size_t &  arraySize,
const T &  valueToLookFor 
) [inline, static]

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

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

This method search for 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