![]() |
Nazara Engine
0.4
A fast, complete, cross-platform API designed for game development
|
Core class that represents a pointer and the step between two elements. More...
Public Member Functions | |
| SparsePtr () | |
| Constructs a SparsePtr object by default. | |
| SparsePtr (T *ptr) | |
| Constructs a SparsePtr object with a pointer. More... | |
| SparsePtr (VoidPtr ptr, int stride) | |
| Constructs a SparsePtr object with a pointer and a step. More... | |
| SparsePtr (VoidPtr ptr, std::size_t stride) | |
| Constructs a SparsePtr object with a pointer and a step. More... | |
| template<typename U > | |
| SparsePtr (const SparsePtr< U > &ptr) | |
| Constructs a SparsePtr object from another type of SparsePtr. More... | |
| SparsePtr (const SparsePtr &ptr)=default | |
| VoidPtr | GetPtr () const |
| Gets the original pointer. More... | |
| int | GetStride () const |
| Gets the stride. More... | |
| void | Reset () |
| Resets the SparsePtr. | |
| void | Reset (T *ptr) |
| Resets the SparsePtr with a pointer. More... | |
| void | Reset (VoidPtr ptr, int stride) |
| Resets the SparsePtr with a pointer and its stride. More... | |
| void | Reset (const SparsePtr &ptr) |
| Resets the SparsePtr with another SparsePtr. More... | |
| template<typename U > | |
| void | Reset (const SparsePtr< U > &ptr) |
| Resets the SparsePtr with another type of SparsePtr. More... | |
| void | SetPtr (VoidPtr ptr) |
| Sets the pointer. More... | |
| void | SetStride (int stride) |
| Sets the stride. More... | |
| operator bool () const | |
| Converts the pointer to bool. More... | |
| operator T* () const | |
| Converts the pointer to a pointer to the value. More... | |
| T & | operator* () const |
| Dereferences the pointer. More... | |
| T * | operator-> () const |
| Dereferences the pointer. More... | |
| T & | operator[] (int index) const |
| Gets the ith element of the stride pointer. More... | |
| SparsePtr & | operator= (const SparsePtr &ptr)=default |
| SparsePtr | operator+ (int count) const |
| Gets the SparsePtr with an offset. More... | |
| SparsePtr | operator+ (unsigned int count) const |
| Gets the SparsePtr with an offset. More... | |
| SparsePtr | operator- (int count) const |
| Gets the SparsePtr with an offset. More... | |
| SparsePtr | operator- (unsigned int count) const |
| Gets the SparsePtr with an offset. More... | |
| std::ptrdiff_t | operator- (const SparsePtr &ptr) const |
| Gets the difference between the two SparsePtr. More... | |
| SparsePtr & | operator+= (int count) |
| Gets the SparsePtr with an offset. More... | |
| SparsePtr & | operator-= (int count) |
| Gets the SparsePtr with an offset. More... | |
| SparsePtr & | operator++ () |
| Gets the SparsePtr with the next element. More... | |
| SparsePtr | operator++ (int) |
| Gets the SparsePtr with the next element. More... | |
| SparsePtr & | operator-- () |
| Gets the SparsePtr with the previous element. More... | |
| SparsePtr | operator-- (int) |
| Gets the SparsePtr with the previous element. More... | |
| bool | operator== (const SparsePtr &ptr) const |
| Compares the SparsePtr to another one. More... | |
| bool | operator!= (const SparsePtr &ptr) const |
| Compares the SparsePtr to another one. More... | |
| bool | operator< (const SparsePtr &ptr) const |
| Compares the SparsePtr to another one. More... | |
| bool | operator> (const SparsePtr &ptr) const |
| Compares the SparsePtr to another one. More... | |
| bool | operator<= (const SparsePtr &ptr) const |
| Compares the SparsePtr to another one. More... | |
| bool | operator>= (const SparsePtr &ptr) const |
| Compares the SparsePtr to another one. More... | |
Core class that represents a pointer and the step between two elements.
| Nz::SparsePtr< T >::SparsePtr | ( | T * | ptr | ) |
Constructs a SparsePtr object with a pointer.
| ptr | Pointer to data |
| Nz::SparsePtr< T >::SparsePtr | ( | VoidPtr | ptr, |
| int | stride | ||
| ) |
Constructs a SparsePtr object with a pointer and a step.
| ptr | Pointer to data |
| stride | Step between two elements |
| Nz::SparsePtr< T >::SparsePtr | ( | VoidPtr | ptr, |
| std::size_t | stride | ||
| ) |
Constructs a SparsePtr object with a pointer and a step.
| ptr | Pointer to data |
| stride | Step between two elements |
| Nz::SparsePtr< T >::SparsePtr | ( | const SparsePtr< U > & | ptr | ) |
| SparsePtr< T >::VoidPtr Nz::SparsePtr< T >::GetPtr | ( | ) | const |
Gets the original pointer.
| int Nz::SparsePtr< T >::GetStride | ( | ) | const |
Gets the stride.
|
explicit |
Converts the pointer to bool.
| Nz::SparsePtr< T >::operator T* | ( | ) | const |
Converts the pointer to a pointer to the value.
| bool Nz::SparsePtr< T >::operator!= | ( | const SparsePtr< T > & | ptr | ) | const |
| T & Nz::SparsePtr< T >::operator* | ( | ) | const |
Dereferences the pointer.
| SparsePtr< T > Nz::SparsePtr< T >::operator+ | ( | int | count | ) | const |
| SparsePtr< T > Nz::SparsePtr< T >::operator+ | ( | unsigned int | count | ) | const |
| SparsePtr< T > & Nz::SparsePtr< T >::operator++ | ( | ) |
Gets the SparsePtr with the next element.
| SparsePtr< T > Nz::SparsePtr< T >::operator++ | ( | int | ) |
| SparsePtr< T > & Nz::SparsePtr< T >::operator+= | ( | int | count | ) |
Gets the SparsePtr with an offset.
| count | Number of stride to do |
| SparsePtr< T > Nz::SparsePtr< T >::operator- | ( | int | count | ) | const |
| SparsePtr< T > Nz::SparsePtr< T >::operator- | ( | unsigned int | count | ) | const |
| std::ptrdiff_t Nz::SparsePtr< T >::operator- | ( | const SparsePtr< T > & | ptr | ) | const |
Gets the difference between the two SparsePtr.
| ptr | Other ptr |
| SparsePtr< T > & Nz::SparsePtr< T >::operator-- | ( | ) |
Gets the SparsePtr with the previous element.
| SparsePtr< T > Nz::SparsePtr< T >::operator-- | ( | int | ) |
| SparsePtr< T > & Nz::SparsePtr< T >::operator-= | ( | int | count | ) |
Gets the SparsePtr with an offset.
| count | Number of stride to do |
| T * Nz::SparsePtr< T >::operator-> | ( | ) | const |
Dereferences the pointer.
| bool Nz::SparsePtr< T >::operator< | ( | const SparsePtr< T > & | ptr | ) | const |
| bool Nz::SparsePtr< T >::operator<= | ( | const SparsePtr< T > & | ptr | ) | const |
| bool Nz::SparsePtr< T >::operator== | ( | const SparsePtr< T > & | ptr | ) | const |
| bool Nz::SparsePtr< T >::operator> | ( | const SparsePtr< T > & | ptr | ) | const |
| bool Nz::SparsePtr< T >::operator>= | ( | const SparsePtr< T > & | ptr | ) | const |
| T & Nz::SparsePtr< T >::operator[] | ( | int | index | ) | const |
Gets the ith element of the stride pointer.
| index | Number of stride to do |
| void Nz::SparsePtr< T >::Reset | ( | T * | ptr | ) |
Resets the SparsePtr with a pointer.
| ptr | Pointer to data |
| void Nz::SparsePtr< T >::Reset | ( | VoidPtr | ptr, |
| int | stride | ||
| ) |
Resets the SparsePtr with a pointer and its stride.
| ptr | Pointer to data |
| stride | Step between two elements |
| void Nz::SparsePtr< T >::Reset | ( | const SparsePtr< T > & | ptr | ) |
| void Nz::SparsePtr< T >::Reset | ( | const SparsePtr< U > & | ptr | ) |
| void Nz::SparsePtr< T >::SetPtr | ( | VoidPtr | ptr | ) |
Sets the pointer.
| ptr | Pointer to data |
| void Nz::SparsePtr< T >::SetStride | ( | int | stride | ) |
Sets the stride.
| stride | Step between two elements |