Remove Utility module and move its content to Core and TextRenderer modules
This commit is contained in:
committed by
Jérôme Leclercq
parent
965a00182c
commit
e64c2b036e
82
include/Nazara/Core/IndexIterator.hpp
Normal file
82
include/Nazara/Core/IndexIterator.hpp
Normal file
@@ -0,0 +1,82 @@
|
||||
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
|
||||
// This file is part of the "Nazara Engine - Core module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef NAZARA_CORE_INDEXITERATOR_HPP
|
||||
#define NAZARA_CORE_INDEXITERATOR_HPP
|
||||
|
||||
#include <NazaraUtils/Prerequisites.hpp>
|
||||
|
||||
namespace Nz
|
||||
{
|
||||
class IndexMapper;
|
||||
|
||||
class IndexIterator
|
||||
{
|
||||
friend IndexMapper;
|
||||
|
||||
public:
|
||||
class Reference;
|
||||
|
||||
IndexIterator();
|
||||
IndexIterator(const IndexIterator& iterator);
|
||||
~IndexIterator() = default;
|
||||
|
||||
Reference operator*() const;
|
||||
|
||||
Reference operator[](UInt32 index) const;
|
||||
|
||||
IndexIterator& operator=(const IndexIterator& iterator);
|
||||
|
||||
IndexIterator operator+(UInt32 indexCount) const;
|
||||
IndexIterator operator-(UInt32 indexCount) const;
|
||||
|
||||
IndexIterator& operator+=(UInt32 indexCount);
|
||||
IndexIterator& operator-=(UInt32 indexCount);
|
||||
|
||||
IndexIterator& operator++();
|
||||
IndexIterator operator++(int);
|
||||
|
||||
IndexIterator& operator--();
|
||||
IndexIterator operator--(int);
|
||||
|
||||
friend bool operator==(const IndexIterator& lhs, const IndexIterator& rhs);
|
||||
friend bool operator!=(const IndexIterator& lhs, const IndexIterator& rhs);
|
||||
friend bool operator<(const IndexIterator& lhs, const IndexIterator& rhs);
|
||||
friend bool operator<=(const IndexIterator& lhs, const IndexIterator& rhs);
|
||||
friend bool operator>(const IndexIterator& lhs, const IndexIterator& rhs);
|
||||
friend bool operator>=(const IndexIterator& lhs, const IndexIterator& rhs);
|
||||
|
||||
private:
|
||||
IndexIterator(IndexMapper* mapper, UInt32 index);
|
||||
|
||||
IndexMapper* m_mapper;
|
||||
UInt32 m_index;
|
||||
};
|
||||
|
||||
class IndexIterator::Reference
|
||||
{
|
||||
friend IndexIterator;
|
||||
|
||||
public:
|
||||
Reference(const Reference& reference) = default;
|
||||
~Reference() = default;
|
||||
|
||||
Reference& operator=(UInt32 value);
|
||||
Reference& operator=(const Reference& reference);
|
||||
|
||||
operator UInt32() const;
|
||||
|
||||
private:
|
||||
Reference(IndexMapper* mapper, UInt32 index);
|
||||
|
||||
IndexMapper* m_mapper;
|
||||
UInt32 m_index;
|
||||
};
|
||||
}
|
||||
|
||||
#include <Nazara/Core/IndexIterator.inl>
|
||||
|
||||
#endif // NAZARA_CORE_INDEXITERATOR_HPP
|
||||
Reference in New Issue
Block a user