Public Member Functions

Celartem::SimpleArray< T, copyPolicy > Class Template Reference

#include <cel_memory.h>

Inheritance diagram for Celartem::SimpleArray< T, copyPolicy >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 SimpleArray (size_t inSize=0, size_t inReserve=AUTO_SIZE, MemoryAllocator *inAllocator=NULL, size_t inAllocationUnit=0)
 SimpleArray (const SimpleArray &inSa)
 ~SimpleArray ()
void init (size_t inSize=0, size_t inReserve=0, MemoryAllocator *inAllocator=NULL, size_t inAllocationUnit=0)
SimpleArrayoperator= (const SimpleArray &inSa)
void strictCleanup (bool doIt=true)
void setAllocationUnit (size_t inAllocationUnit)
size_t getAllocationUnit ()
T * getPtr ()
const T * getPtr () const
size_t getSize () const
size_t getReservedSize () const
bool isValid () const
T & operator[] (size_t inPos)
const T & operator[] (size_t inPos) const
void allocate (size_t inSize, size_t inReserve=AUTO_SIZE)
void reserve (size_t inSize)
void reallocate (size_t inSize)
void resize (size_t inSize)
void compact ()
void free ()
void clear ()
void remove (size_t inPos, size_t inCount)
void insert (size_t inPos, size_t inCount)
void insert (size_t inPos, size_t inCount, const T *inElements)
void insert (size_t inPos, const SimpleArray &inElements)
void append (size_t inCount, const T *inElements)
void append (const SimpleArray &inElements)
void duplicate (const SimpleArray &inSa, bool inNeedCompaction=false)
void duplicate (const T *inBuffer, size_t inSize)
void duplicate (const T *inBuffer, size_t inSize, Endian inEndian)
void fill (const T &t)
template<typename U >
void fill (const U &u)
void zeroClear ()
int indexOf (const T &t) const
template<typename U >
int indexOf (const U &u) const
void swap (SimpleArray &inSa)
void push_back (const T &t)
template<typename U >
void push_back (const U &t)
pop_back ()
void push_front (const T &t)
template<typename U >
void push_front (const U &t)
pop_front ()
T * begin ()
T * end ()
T * last ()
const T * begin () const
const T * end () const
const T * last () const
T & front ()
const T & front () const
T & back ()
const T & back () const

Detailed Description

template<class T, CopyPolicy copyPolicy = DataTraits<T>::copyPolicy>
class Celartem::SimpleArray< T, copyPolicy >

SimpleArray is a simplified substitution to std::vector. This class does not need T(const T& t) type constructor but T() .
The second template parameter copyPolicy is one of the CopyPolicy enumeration and it specifies how to copy the instance if needed. The default for this value is DataTraits::copyPolicy for T.
If copyPolicy is byConstructor, SimpleArray copies the instance in the usual way, using copy-constuctor. Although this scheme is normal and simple enough, it may down the performance of array operations if the T is simple types such as int, long, ... In these cases, copyPolicy should be changed into byMemcpy. With byMemcpy , copy operations are done with std::memcpy and it may increases the performance of the array operations. byMemcpy is default for the type like int, long ... (types which are called POD).
Another option, named noCopy is to deal with the structs/classes that do not have copy-constructor, with such data, SimpleArray could not resize the array and it only can allocate and free.
Although SimpleArray class itself is thread-safe, you should synchronize the operations if an instance is used between threads.

See also:
CopyPolicy, DataTraits.

Constructor & Destructor Documentation

template<class T, CopyPolicy copyPolicy = DataTraits<T>::copyPolicy>
Celartem::SimpleArray< T, copyPolicy >::SimpleArray ( size_t  inSize = 0,
size_t  inReserve = AUTO_SIZE,
MemoryAllocator inAllocator = NULL,
size_t  inAllocationUnit = 0 
) [inline]

This constructor initializes the SimpleArray instance by the specified size; it does almost same as init method.

Parameters:
inSize Specifies the size of the array in number of entries.
inReserve Specifies the reservation size of the array in number of entries. The reservation size is a parameter that controls relocation of the array. Although the larger reservation size assures you of the better speed performance of array resizing until the size surpasses the reservation size, it firstly request the reservation size of memory to the operating system.
inAllocator Specifies the MemoryAllocator instance that is used to allocate/deallocate memory blocks. It can be NULL and then SimpleArray uses the default allocator.
inAllocationUnit Specifies the unit size for allocation. For more information, see setAllocationUnit.
See also:
MemoryAllocator, init, setAllocationUnit, MemoryStorage
template<class T, CopyPolicy copyPolicy = DataTraits<T>::copyPolicy>
Celartem::SimpleArray< T, copyPolicy >::SimpleArray ( const SimpleArray< T, copyPolicy > &  inSa  )  [inline]

This constructor initializes the SimpleArray instance with the data copied from the other instance.

Parameters:
inSa An array to be duplicated. This constructor really copies the memory block held by the instance.
template<class T, CopyPolicy copyPolicy = DataTraits<T>::copyPolicy>
Celartem::SimpleArray< T, copyPolicy >::~SimpleArray (  )  [inline]

Deletes the array.


Member Function Documentation

template<class T, CopyPolicy copyPolicy = DataTraits<T>::copyPolicy>
void Celartem::SimpleArray< T, copyPolicy >::allocate ( size_t  inSize,
size_t  inReserve = AUTO_SIZE 
) [inline]

This method allocates the array.
This method firstly frees all the contents on the array and renew the array itself; if you want to keep the contents during the reconstruction of the array, use reallocate or resize.

Parameters:
inSize Specifies the size of the array in number of entries.
inReserve Specifies the reservation size of the array in number of entries. The reservation size is a parameter that controls relocation of the array. Although the larger reservation size assures you of the better speed performance of array resizing until the size surpasses the reservation size, it firstly request the reservation size of memory to the operating system.
See also:
reallocate, resize

Referenced by Celartem::DjVu::PackedBitmap::allocate(), Celartem::SimpleArray< AutoPtr< Bookmark > >::duplicate(), Celartem::SimpleArray< AutoPtr< Bookmark > >::init(), and Celartem::SimpleArray< AutoPtr< Bookmark > >::SimpleArray().

template<class T, CopyPolicy copyPolicy = DataTraits<T>::copyPolicy>
void Celartem::SimpleArray< T, copyPolicy >::append ( size_t  inCount,
const T *  inElements 
) [inline]

This method inserts the specified number of elements to the end of the array.

Parameters:
inCount The number of the elements in inElements.
inElements The elements to insert.
template<class T, CopyPolicy copyPolicy = DataTraits<T>::copyPolicy>
void Celartem::SimpleArray< T, copyPolicy >::append ( const SimpleArray< T, copyPolicy > &  inElements  )  [inline]

This method inserts the specified number of elements to the end of the array.

Parameters:
inElements The elements to insert.
template<class T, CopyPolicy copyPolicy = DataTraits<T>::copyPolicy>
T& Celartem::SimpleArray< T, copyPolicy >::back (  )  [inline]

This method is for the compatibility with STL algorithms.

Returns:
Reference to the last element in the array. This reference is identical to array[getSize() - 1] .
template<class T, CopyPolicy copyPolicy = DataTraits<T>::copyPolicy>
const T& Celartem::SimpleArray< T, copyPolicy >::back (  )  const [inline]

This method is for the compatibility with STL algorithms.

Returns:
Reference to the last element in the array. This reference is identical to array[getSize() - 1] .
template<class T, CopyPolicy copyPolicy = DataTraits<T>::copyPolicy>
T* Celartem::SimpleArray< T, copyPolicy >::begin (  )  [inline]

This method is for the compatibility with STL algorithms.

Returns:
Pointer to the first element in the array. This pointer is identical to &array[0] .

Referenced by Celartem::SimpleArray< AutoPtr< Bookmark > >::front().

template<class T, CopyPolicy copyPolicy = DataTraits<T>::copyPolicy>
const T* Celartem::SimpleArray< T, copyPolicy >::begin (  )  const [inline]

This method is for the compatibility with STL algorithms.

Returns:
Pointer to the first element in the array. This pointer is identical to &array[0] .
template<class T, CopyPolicy copyPolicy = DataTraits<T>::copyPolicy>
void Celartem::SimpleArray< T, copyPolicy >::clear (  )  [inline]

This method release the memory.
This is just an alias of free method.

template<class T, CopyPolicy copyPolicy = DataTraits<T>::copyPolicy>
void Celartem::SimpleArray< T, copyPolicy >::compact (  )  [inline]

This method reduces memory consumption by deallocating the unused reserved area.
Please note that compaction actually moves the location of the array and it may take relatively long time.

See also:
reserve, allocate, reallocate, resize

Referenced by Celartem::DjVu::MemoryData::compact().

template<class T, CopyPolicy copyPolicy = DataTraits<T>::copyPolicy>
void Celartem::SimpleArray< T, copyPolicy >::duplicate ( const SimpleArray< T, copyPolicy > &  inSa,
bool  inNeedCompaction = false 
) [inline]

This method duplicates the specified array.

Parameters:
inSa An array to be duplicated.
inNeedCompaction Whether compaction (removing reserved area) is needed or not.

Referenced by Celartem::SimpleArray< AutoPtr< Bookmark > >::operator=(), Celartem::DjVu::IW44Encoder::Params::Params(), and Celartem::SimpleArray< AutoPtr< Bookmark > >::SimpleArray().

template<class T, CopyPolicy copyPolicy = DataTraits<T>::copyPolicy>
void Celartem::SimpleArray< T, copyPolicy >::duplicate ( const T *  inBuffer,
size_t  inSize 
) [inline]

This method duplicates the specified array.

Parameters:
inBuffer An array to be duplicated.
inSize The size of the array.
template<class T, CopyPolicy copyPolicy = DataTraits<T>::copyPolicy>
void Celartem::SimpleArray< T, copyPolicy >::duplicate ( const T *  inBuffer,
size_t  inSize,
Endian  inEndian 
) [inline]

This method duplicates the specified array.

Parameters:
inBuffer An array to be duplicated.
inSize The size of the array.
inEndian The endianness of the specified buffer.
template<class T, CopyPolicy copyPolicy = DataTraits<T>::copyPolicy>
T* Celartem::SimpleArray< T, copyPolicy >::end (  )  [inline]

This method is for the compatibility with STL algorithms.

Returns:
Pointer to the end of the array. This pointer is identical to &array[array.getSize()] .

Referenced by Celartem::SimpleArray< AutoPtr< Bookmark > >::remove().

template<class T, CopyPolicy copyPolicy = DataTraits<T>::copyPolicy>
const T* Celartem::SimpleArray< T, copyPolicy >::end (  )  const [inline]

This method is for the compatibility with STL algorithms.

Returns:
Pointer to the end of the array. This pointer is identical to &array[array.getSize()] .
template<class T, CopyPolicy copyPolicy = DataTraits<T>::copyPolicy>
void Celartem::SimpleArray< T, copyPolicy >::fill ( const T &  t  )  [inline]

This method is a general version of fill function; fill(0) fills all array with 0.

Parameters:
t The value to fill with.
See also:
zeroClear
template<class T, CopyPolicy copyPolicy = DataTraits<T>::copyPolicy>
template<typename U >
void Celartem::SimpleArray< T, copyPolicy >::fill ( const U &  u  )  [inline]

This method is a general version of fill function; fill(0) fills all array with 0.

Parameters:
t The value to fill with.
See also:
zeroClear
template<class T, CopyPolicy copyPolicy = DataTraits<T>::copyPolicy>
void Celartem::SimpleArray< T, copyPolicy >::free (  )  [inline]

This method releases the memory.
Please note that since this method really deallocates the memory block associated with this SimpleArray instance, it does not keep the reservation size after the call. If you want to preserve the allocated memory for it, use reallocate (0) rather than this method.
Please note that this method keeps the current memory allocation unit. To revert the value to the default, use setAllocationUnit method.

See also:
reserve, allocate, reallocate

Referenced by Celartem::SimpleArray< AutoPtr< Bookmark > >::allocate(), Celartem::SimpleArray< AutoPtr< Bookmark > >::clear(), Celartem::SimpleArray< AutoPtr< Bookmark > >::compact(), Celartem::SimpleArray< AutoPtr< Bookmark > >::duplicate(), Celartem::DjVu::IFF::Layout::init(), Celartem::SimpleArray< AutoPtr< Bookmark > >::init(), Celartem::SimpleArray< AutoPtr< Bookmark > >::insert(), and Celartem::SimpleArray< AutoPtr< Bookmark > >::~SimpleArray().

template<class T, CopyPolicy copyPolicy = DataTraits<T>::copyPolicy>
T& Celartem::SimpleArray< T, copyPolicy >::front (  )  [inline]

This method is for the compatibility with STL algorithms.

Returns:
Reference to the first element in the array. This reference is identical to array[0] .
template<class T, CopyPolicy copyPolicy = DataTraits<T>::copyPolicy>
const T& Celartem::SimpleArray< T, copyPolicy >::front (  )  const [inline]

This method is for the compatibility with STL algorithms.

Returns:
Reference to the first element in the array. This reference is identical to array[0] .
template<class T, CopyPolicy copyPolicy = DataTraits<T>::copyPolicy>
size_t Celartem::SimpleArray< T, copyPolicy >::getAllocationUnit (  )  [inline]

This method is to obtain the current memory allocation unit.

Returns:
The current memory allocation unit.
See also:
setAllocationUnit, reallocate
template<class T, CopyPolicy copyPolicy = DataTraits<T>::copyPolicy>
T* Celartem::SimpleArray< T, copyPolicy >::getPtr (  )  [inline]

This method returns raw pointer to the array.

Returns:
Raw pointer to the array.

Referenced by Celartem::DjVu::MemoryData::getRawPtr(), and Celartem::DjVu::MemoryData::getReadOnlyStorage().

template<class T, CopyPolicy copyPolicy = DataTraits<T>::copyPolicy>
const T* Celartem::SimpleArray< T, copyPolicy >::getPtr (  )  const [inline]

This method returns const raw pointer to the array.

Returns:
Raw pointer (read-only) to the array.
template<class T, CopyPolicy copyPolicy = DataTraits<T>::copyPolicy>
size_t Celartem::SimpleArray< T, copyPolicy >::getReservedSize (  )  const [inline]

This method returns the reserved size of array in number of entries.

Returns:
The number of entries reserved.
template<class T, CopyPolicy copyPolicy = DataTraits<T>::copyPolicy>
size_t Celartem::SimpleArray< T, copyPolicy >::getSize (  )  const [inline]
template<class T, CopyPolicy copyPolicy = DataTraits<T>::copyPolicy>
int Celartem::SimpleArray< T, copyPolicy >::indexOf ( const T &  t  )  const [inline]

This method returns the index of the specified item.

Returns:
0-based index of the first found item. If none is found, returns -1.
template<class T, CopyPolicy copyPolicy = DataTraits<T>::copyPolicy>
template<typename U >
int Celartem::SimpleArray< T, copyPolicy >::indexOf ( const U &  u  )  const [inline]

This method returns the index of the specified item.

Returns:
0-based index of the first found item. If none is found, returns -1.
template<class T, CopyPolicy copyPolicy = DataTraits<T>::copyPolicy>
void Celartem::SimpleArray< T, copyPolicy >::init ( size_t  inSize = 0,
size_t  inReserve = 0,
MemoryAllocator inAllocator = NULL,
size_t  inAllocationUnit = 0 
) [inline]

This method initializes the SimpleArray instance by the specified size. No other method can replace the allocator except the constructor.

Parameters:
inSize Specifies the size of the array in number of entries.
inReserve Specifies the reservation size of the array in number of entries. The reservation size is a parameter that controls relocation of the array. Although the larger reservation size assures you of the better speed performance of array resizing until the size surpasses the reservation size, it firstly request the reservation size of memory to the operating system.
inAllocator Specifies the MemoryAllocator instance that is used to allocate/deallocate memory blocks. It can be NULL and then SimpleArray uses the default allocator.
inAllocationUnit Specifies the unit size for allocation. For more information, see setAllocationUnit.
See also:
MemoryAllocator, SimpleArray, setAllocationUnit
template<class T, CopyPolicy copyPolicy = DataTraits<T>::copyPolicy>
void Celartem::SimpleArray< T, copyPolicy >::insert ( size_t  inPos,
size_t  inCount 
) [inline]

This method inserts the specified number of elements to the specified position.

Parameters:
inPos It indicates the position on which new elements are inserted.
inCount The number of the new elements.

Referenced by Celartem::SimpleArray< AutoPtr< Bookmark > >::append(), Celartem::SimpleArray< AutoPtr< Bookmark > >::insert(), and Celartem::SimpleArray< AutoPtr< Bookmark > >::push_front().

template<class T, CopyPolicy copyPolicy = DataTraits<T>::copyPolicy>
void Celartem::SimpleArray< T, copyPolicy >::insert ( size_t  inPos,
size_t  inCount,
const T *  inElements 
) [inline]

This method inserts the specified number of elements to the specified position.

Parameters:
inPos It indicates the position on which new elements are inserted.
inCount The number of the elements in inElements.
inElements The elements to insert.
template<class T, CopyPolicy copyPolicy = DataTraits<T>::copyPolicy>
void Celartem::SimpleArray< T, copyPolicy >::insert ( size_t  inPos,
const SimpleArray< T, copyPolicy > &  inElements 
) [inline]

This method inserts the specified number of elements to the specified position.

Parameters:
inPos It indicates the position on which new elements are inserted.
inElements The elements to insert.
template<class T, CopyPolicy copyPolicy = DataTraits<T>::copyPolicy>
bool Celartem::SimpleArray< T, copyPolicy >::isValid (  )  const [inline]

This method checks whether the array is valid or not.

Returns:
true if the array is valid, otherwise false.
template<class T, CopyPolicy copyPolicy = DataTraits<T>::copyPolicy>
const T* Celartem::SimpleArray< T, copyPolicy >::last (  )  const [inline]

This method is for the compatibility with STL algorithms.

Returns:
Pointer to the last element in the array. This pointer is identical to &array[array.getSize() - 1] .
template<class T, CopyPolicy copyPolicy = DataTraits<T>::copyPolicy>
T* Celartem::SimpleArray< T, copyPolicy >::last (  )  [inline]

This method is for the compatibility with STL algorithms.

Returns:
Pointer to the last element in the array. This pointer is identical to &array[array.getSize() - 1] .

Referenced by Celartem::SimpleArray< AutoPtr< Bookmark > >::back().

template<class T, CopyPolicy copyPolicy = DataTraits<T>::copyPolicy>
SimpleArray& Celartem::SimpleArray< T, copyPolicy >::operator= ( const SimpleArray< T, copyPolicy > &  inSa  )  [inline]

This method copies the specified instance.

Parameters:
inSa An array to be duplicated. This constructor really copies the memory block held by the instance.
Returns:
Reference to this instance (*this).
template<class T, CopyPolicy copyPolicy = DataTraits<T>::copyPolicy>
T& Celartem::SimpleArray< T, copyPolicy >::operator[] ( size_t  inPos  )  [inline]

This method provides the array interface.

Parameters:
inPos Index to an entry.
Returns:
The reference to the specified entry.
template<class T, CopyPolicy copyPolicy = DataTraits<T>::copyPolicy>
const T& Celartem::SimpleArray< T, copyPolicy >::operator[] ( size_t  inPos  )  const [inline]

This method provides the array interface (for read).

Parameters:
inPos Index to an entry.
Returns:
A const reference to the specified entry.
template<class T, CopyPolicy copyPolicy = DataTraits<T>::copyPolicy>
T Celartem::SimpleArray< T, copyPolicy >::pop_back (  )  [inline]

This method is almost identical to vector::pop_back .

Returns:
The value that was on the tail of the array.
template<class T, CopyPolicy copyPolicy = DataTraits<T>::copyPolicy>
T Celartem::SimpleArray< T, copyPolicy >::pop_front (  )  [inline]

This method is almost identical to deque::pop_front .
Please note that this method is much slower than pop_back.

Returns:
The value that was on the tail of the array.
template<class T, CopyPolicy copyPolicy = DataTraits<T>::copyPolicy>
void Celartem::SimpleArray< T, copyPolicy >::push_back ( const T &  t  )  [inline]

This method is almost identical to vector::push_back .

Parameters:
t Value to add.

Referenced by Celartem::SimpleArray< AutoPtr< Bookmark > >::push_back().

template<class T, CopyPolicy copyPolicy = DataTraits<T>::copyPolicy>
template<typename U >
void Celartem::SimpleArray< T, copyPolicy >::push_back ( const U &  t  )  [inline]

This method is almost identical to vector::push_back .

Parameters:
t Value to add.
template<class T, CopyPolicy copyPolicy = DataTraits<T>::copyPolicy>
template<typename U >
void Celartem::SimpleArray< T, copyPolicy >::push_front ( const U &  t  )  [inline]

This method is almost identical to deque::push_front .

Parameters:
t Value to add.
template<class T, CopyPolicy copyPolicy = DataTraits<T>::copyPolicy>
void Celartem::SimpleArray< T, copyPolicy >::push_front ( const T &  t  )  [inline]

This method is almost identical to deque::push_front .

Parameters:
t Value to add.

Referenced by Celartem::SimpleArray< AutoPtr< Bookmark > >::push_front().

template<class T, CopyPolicy copyPolicy = DataTraits<T>::copyPolicy>
void Celartem::SimpleArray< T, copyPolicy >::reallocate ( size_t  inSize  )  [inline]

This method reallocates the array. This method keeps the contents on the array during the reconstruction of the array and it is slower than allocate method; if you don't want to keep the contents, use allocate instead.
resize is just an alias of this method and the behavior is identical to this method.

Parameters:
inSize Specifies the new size of the array in number of entries.
See also:
resize, allocate

Referenced by Celartem::SimpleArray< AutoPtr< Bookmark > >::resize().

template<class T, CopyPolicy copyPolicy = DataTraits<T>::copyPolicy>
void Celartem::SimpleArray< T, copyPolicy >::remove ( size_t  inPos,
size_t  inCount 
) [inline]

This method removes elements of the specified range and moves the elements after them toward the front of the array.

Parameters:
inPos The index of the first element to remove.
inCount The number of elements to remove.
template<class T, CopyPolicy copyPolicy = DataTraits<T>::copyPolicy>
void Celartem::SimpleArray< T, copyPolicy >::reserve ( size_t  inSize  )  [inline]

This method changes the reservation size of the array.

Parameters:
inSize Specifies the reservation size of the array in number of entries. The reservation size is a parameter that controls relocation of the array. Although the larger reservation size assures you of the better speed performance of array resizing until the size surpasses the reservation size, it firstly request the reservation size of memory to the operating system.
template<class T, CopyPolicy copyPolicy = DataTraits<T>::copyPolicy>
void Celartem::SimpleArray< T, copyPolicy >::resize ( size_t  inSize  )  [inline]

This method reallocates the array. This method is identical to reallocate method. See reallocate for more information.
This method is provided for the compatibility with std::vector.

Parameters:
inSize Specifies the new size of the array in number of entries.
See also:
reallocate

Referenced by Celartem::SimpleArray< AutoPtr< Bookmark > >::pop_back(), and Celartem::SimpleArray< AutoPtr< Bookmark > >::push_back().

template<class T, CopyPolicy copyPolicy = DataTraits<T>::copyPolicy>
void Celartem::SimpleArray< T, copyPolicy >::setAllocationUnit ( size_t  inAllocationUnit  )  [inline]

This method is to set the memory allocation unit which is used during reallocation calls.

Parameters:
inAllocationUnit Specifies the unit size for allocation. This is not the size in bytes but the count of elements.
A large value makes reallocate calls faster but result in the larger memory consumption. For use with MemoryStorage, we recommend you should choose a large value for it. 0 means using the default.
See also:
reallocate

Referenced by Celartem::SimpleArray< AutoPtr< Bookmark > >::init(), and Celartem::SimpleArray< AutoPtr< Bookmark > >::SimpleArray().

template<class T, CopyPolicy copyPolicy = DataTraits<T>::copyPolicy>
void Celartem::SimpleArray< T, copyPolicy >::strictCleanup ( bool  doIt = true  )  [inline]

This method is to control whether the array will be zero-cleared or not in the destruction/reallocation phase. You should do zero-clear of the memory block if you store some sensitive information such as user credential.

Parameters:
doIt true to do zero-clear in the destruction/reallocation phase. false to disable zero-clear.

Referenced by Celartem::SimpleArray< AutoPtr< Bookmark > >::swap().

template<class T, CopyPolicy copyPolicy = DataTraits<T>::copyPolicy>
void Celartem::SimpleArray< T, copyPolicy >::swap ( SimpleArray< T, copyPolicy > &  inSa  )  [inline]

This method swaps the contents of the array with the specified array instance.

Parameters:
inSa The SimpleArray instance with which this instance will exchange the contents.

Referenced by Celartem::DjVu::PackedBitmap::swap().

template<class T, CopyPolicy copyPolicy = DataTraits<T>::copyPolicy>
void Celartem::SimpleArray< T, copyPolicy >::zeroClear (  )  [inline]

This method zero-clears the array in the way of std::memset . This is very dangerous method and you should consider that you should use fill instead of it.

See also:
fill

Referenced by Celartem::DjVu::PackedBitmap::zeroClear().


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

This document is made with doxygen 1.7.1 at Sun Sep 5 2010 13:03:38.
Caminova Logo