#include <cel_dsarray.h>

Public Member Functions | |
| virtual void | serialize (Stream *inStream, size_t inLevel, Endian inEndian) |
| virtual AutoPtr< Serializable > | duplicate () const |
| virtual AutoPtr< DataArray< T > > | duplicateDataArray () const |
| SimpleArray< T > & | getReference () |
| const SimpleArray< T > & | getReference () const |
| T * | getPtr () |
| const T * | getPtr () const |
| virtual const void * | getVoidPtr () const |
| T & | at (size_t pos) |
| const T & | at (size_t pos) const |
| virtual bool | isValid () const |
| virtual size_t | getSize () const |
| void | allocate (size_t inSize, size_t inReserve=(size_t)-1) |
| void | reserve (size_t inSize) |
| void | reallocate (size_t inSize) |
| void | resize (size_t inSize) |
| void | free () |
| void | duplicate (const SimpleArray< T > &inSa) |
| void | duplicate (const Serializable *inDataArray) |
| void | duplicate (const T *inBuffer, size_t inSize, Endian inEndian=endianHost) |
| void | fill (const T &t) |
| void | zeroClear () |
| void | swap (SimpleArray< T > &inSa) |
| void | swap (Serializable *inDataArray) |
| void | push_back (T &t) |
| T | pop_back () |
| virtual u16 | getTag () const |
| virtual void | setTag (u16 tag) |
| virtual u16 | getType () const |
| virtual void | setType (u16 type) |
Static Public Member Functions | |
| static AutoPtr< Serializable > | deserialize (Stream *inStream, size_t inLevel, Endian inEndian) |
| static AutoPtr< DataArray< T > > | create () |
| static AutoPtr< DataArray< T > > | create (size_t inSize, size_t inReserve=(size_t)-1) |
Definition at line 121 of file cel_dsarray.h.
| virtual void Celartem::DataArray< T >::serialize | ( | Stream * | inStream, | |
| size_t | inLevel, | |||
| Endian | inEndian | |||
| ) | [inline, virtual] |
This method serializes a DataArray instance into the specified storage.
| inStream | The stream to which the instance information is written. | |
| inLevel | The serialization level. In the top level, this value is 0. | |
| inEndian | The endianness used to write the data. |
Implements Celartem::Serializable.
Definition at line 135 of file cel_dsarray.h.
| virtual AutoPtr<Serializable> Celartem::DataArray< T >::duplicate | ( | ) | const [inline, virtual] |
This method duplicates the DataArray<T> instance.
Implements Celartem::Serializable.
Definition at line 152 of file cel_dsarray.h.
| virtual AutoPtr<DataArray<T> > Celartem::DataArray< T >::duplicateDataArray | ( | ) | const [inline, virtual] |
This method duplicates the DataArray<T> instance.
Definition at line 165 of file cel_dsarray.h.
| static AutoPtr<Serializable> Celartem::DataArray< T >::deserialize | ( | Stream * | inStream, | |
| size_t | inLevel, | |||
| Endian | inEndian | |||
| ) | [inline, static] |
This method deserializes a DataArray<T> instance from the specified storage.
| inStream | The stream from which the instance information is read. | |
| inLevel | The de-serialization level. In the top level, this value is 0. | |
| inEndian | The endianness used to read the data. |
Definition at line 185 of file cel_dsarray.h.
| static AutoPtr<DataArray<T> > Celartem::DataArray< T >::create | ( | ) | [inline, static] |
This function creates a new DataArray<T> instance. The SimpleArray instance held by this instance is set SimpleArray::strictCleanup attributes.
Definition at line 211 of file cel_dsarray.h.
Referenced by Celartem::DataArray< T >::deserialize().
| static AutoPtr<DataArray<T> > Celartem::DataArray< T >::create | ( | size_t | inSize, | |
| size_t | inReserve = (size_t)-1 | |||
| ) | [inline, static] |
This function creates a new DataArray<T> instance. The SimpleArray instance held by this instance is set SimpleArray::strictCleanup attributes.
Definition at line 226 of file cel_dsarray.h.
| SimpleArray<T>& Celartem::DataArray< T >::getReference | ( | ) | [inline] |
This method returns the reference to the holding SimpleArray instance.
Definition at line 241 of file cel_dsarray.h.
| const SimpleArray<T>& Celartem::DataArray< T >::getReference | ( | ) | const [inline] |
This method returns the reference to the holding SimpleArray instance. (const version)
Definition at line 250 of file cel_dsarray.h.
| T* Celartem::DataArray< T >::getPtr | ( | ) | [inline] |
This method returns raw pointer to the array.
Definition at line 257 of file cel_dsarray.h.
| const T* Celartem::DataArray< T >::getPtr | ( | ) | const [inline] |
This method returns raw pointer to the array.
Definition at line 264 of file cel_dsarray.h.
| virtual const void* Celartem::DataArray< T >::getVoidPtr | ( | ) | const [inline, virtual] |
This method returns the pointer to the internal data.
Implements Celartem::BasicDataArray.
Definition at line 272 of file cel_dsarray.h.
| T& Celartem::DataArray< T >::at | ( | size_t | pos | ) | [inline] |
This method provides access to the array entries. Since DataArray is Serializable derivative class, it is usually used via AutoPtr<DataStore> and could not provide [] array operator, this method provides the same function to it.
Definition at line 282 of file cel_dsarray.h.
| const T& Celartem::DataArray< T >::at | ( | size_t | pos | ) | const [inline] |
This method provides access to the array entries. Since DataArray is Serializable derivative class, it is usually used via AutoPtr<DataStore> and could not provide [] array operator, this method provides the same function to it.
Definition at line 292 of file cel_dsarray.h.
| virtual bool Celartem::DataArray< T >::isValid | ( | ) | const [inline, virtual] |
This method checks whether the array is valid or not.
true if the array is valid, otherwise false. Implements Celartem::BasicDataArray.
Definition at line 302 of file cel_dsarray.h.
| virtual size_t Celartem::DataArray< T >::getSize | ( | ) | const [inline, virtual] |
This method returns the size of array in number of entries.
Implements Celartem::BasicDataArray.
Definition at line 312 of file cel_dsarray.h.
| void Celartem::DataArray< T >::allocate | ( | size_t | inSize, | |
| size_t | inReserve = (size_t)-1 | |||
| ) | [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.
| 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. |
Definition at line 322 of file cel_dsarray.h.
| void Celartem::DataArray< T >::reserve | ( | size_t | inSize | ) | [inline] |
This method changes the reservation size of the array.
| 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. |
Definition at line 333 of file cel_dsarray.h.
| void Celartem::DataArray< T >::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.
| inSize | Specifies the new size of the array in number of entries. |
Definition at line 343 of file cel_dsarray.h.
| void Celartem::DataArray< T >::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.
| inSize | Specifies the new size of the array in number of entries. |
Definition at line 353 of file cel_dsarray.h.
| void Celartem::DataArray< T >::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.
Definition at line 363 of file cel_dsarray.h.
| void Celartem::DataArray< T >::duplicate | ( | const SimpleArray< T > & | inSa | ) | [inline] |
This method also set strictCleanup attributes to this instance after duplication. The tag/type associated to the instance will be cleared.
Definition at line 377 of file cel_dsarray.h.
| void Celartem::DataArray< T >::duplicate | ( | const Serializable * | inDataArray | ) | [inline] |
This method duplicates the specified array.
| inDataArray | Pointer to the DataArray<T> instance to be duplicated. This method also set strictCleanup attributes to this instance after duplication. |
Definition at line 395 of file cel_dsarray.h.
| void Celartem::DataArray< T >::duplicate | ( | const T * | inBuffer, | |
| size_t | inSize, | |||
| Endian | inEndian = endianHost | |||
| ) | [inline] |
This method duplicates the specified array.
| inBuffer | An array to be duplicated. | |
| inSize | The size of the array. | |
| inEndian | The endianness of the specified buffer. |
Definition at line 416 of file cel_dsarray.h.
| void Celartem::DataArray< T >::fill | ( | const T & | t | ) | [inline] |
This method is a general version of fill function; fill(0) fills all array with 0.
| t | The value to fill with. |
Definition at line 430 of file cel_dsarray.h.
| void Celartem::DataArray< T >::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.
Definition at line 440 of file cel_dsarray.h.
| void Celartem::DataArray< T >::swap | ( | SimpleArray< T > & | inSa | ) | [inline] |
This method swaps the contents of the array with the specified array instance.
| inSa | The SimpleArray instance with which this instance will exchange the contents. |
Definition at line 454 of file cel_dsarray.h.
| void Celartem::DataArray< T >::swap | ( | Serializable * | inDataArray | ) | [inline] |
This method swaps the contents of the array with the specified array instance.
| inDataArray | Pointer to the DataArray<T> instance with which this instance will exchange the contents. This method also set strictCleanup attributes to this instance after duplication. |
Definition at line 474 of file cel_dsarray.h.
| void Celartem::DataArray< T >::push_back | ( | T & | t | ) | [inline] |
This method is almost identical to vector::push_back .
| t | Value to add. |
Definition at line 492 of file cel_dsarray.h.
| T Celartem::DataArray< T >::pop_back | ( | ) | [inline] |
This method is almost identical to vector::pop_back .
Definition at line 502 of file cel_dsarray.h.
| virtual u16 Celartem::DataArray< T >::getTag | ( | ) | const [inline, virtual] |
This method is for compatibility with TIFF 6.0 Specification.
Implements Celartem::BasicDataArray.
Definition at line 511 of file cel_dsarray.h.
| virtual void Celartem::DataArray< T >::setTag | ( | u16 | tag | ) | [inline, virtual] |
This method is for compatibility with TIFF 6.0 Specification.
Implements Celartem::BasicDataArray.
Definition at line 520 of file cel_dsarray.h.
| virtual u16 Celartem::DataArray< T >::getType | ( | ) | const [inline, virtual] |
This method is for compatibility with TIFF 6.0 Specification.
Implements Celartem::BasicDataArray.
Definition at line 529 of file cel_dsarray.h.
| virtual void Celartem::DataArray< T >::setType | ( | u16 | type | ) | [inline, virtual] |
This method is for compatibility with TIFF 6.0 Specification.
Implements Celartem::BasicDataArray.
Definition at line 538 of file cel_dsarray.h.