// Copyright (C) 2014 Jérôme Leclercq // This file is part of the "Nazara Engine - Core module" // For conditions of distribution and use, see copyright notice in Config.hpp #include template NzSparsePtr::NzSparsePtr() : m_ptr(nullptr), m_stride(0) { } template NzSparsePtr::NzSparsePtr(void* ptr, unsigned int stride) { Set(ptr); SetStride(stride); } template void* NzSparsePtr::Get() const { return m_ptr; } template unsigned int NzSparsePtr::GetStride() const { return m_stride; } template void NzSparsePtr::Set(void* ptr) { m_ptr = reinterpret_cast(ptr); } template void NzSparsePtr::SetStride(unsigned int stride) { m_stride = stride; } template T& NzSparsePtr::operator*() { return *reinterpret_cast(m_ptr); } template T& NzSparsePtr::operator->() { return *reinterpret_cast(m_ptr); } template T& NzSparsePtr::operator[](unsigned int index) { return *reinterpret_cast(m_ptr + index*m_stride); } template NzSparsePtr NzSparsePtr::operator+(unsigned int count) { return NzSparsePtr(m_ptr + count*m_stride, m_stride); } template NzSparsePtr NzSparsePtr::operator-(unsigned int count) { return NzSparsePtr(m_ptr - count*m_stride, m_stride); } template NzSparsePtr& NzSparsePtr::operator+=(unsigned int count) { m_ptr += count*m_stride; return *this; } template NzSparsePtr& NzSparsePtr::operator-=(unsigned int count) { m_ptr -= count*m_stride; return *this; } template NzSparsePtr& NzSparsePtr::operator++() { m_ptr += m_stride; return *this; } template NzSparsePtr NzSparsePtr::operator++(int) { NzSparsePtr tmp(*this); operator++(); return tmp; } template NzSparsePtr& NzSparsePtr::operator--() { m_ptr -= m_stride; return *this; } template NzSparsePtr NzSparsePtr::operator--(int) { NzSparsePtr tmp(*this); operator--(); return tmp; } template bool NzSparsePtr::operator==(const NzSparsePtr& ptr) const { return m_ptr == ptr.m_ptr; } template bool NzSparsePtr::operator!=(const NzSparsePtr& ptr) const { return m_ptr != ptr.m_ptr; } template bool NzSparsePtr::operator<(const NzSparsePtr& ptr) const { return m_ptr < ptr.m_ptr; } template bool NzSparsePtr::operator>(const NzSparsePtr& ptr) const { return m_ptr > ptr.m_ptr; } template bool NzSparsePtr::operator<=(const NzSparsePtr& ptr) const { return m_ptr <= ptr.m_ptr; } template bool NzSparsePtr::operator>=(const NzSparsePtr& ptr) const { return m_ptr >= ptr.m_ptr; } #include