mirror of
https://github.com/tfussell/xlnt.git
synced 2024-03-22 13:11:17 +08:00
Merge pull request #53 from xpol/fixes-reference-type-for-iterators
Fixes type for all iterator::reference.
This commit is contained in:
commit
e8c2dd37c3
|
@ -33,7 +33,7 @@ namespace xlnt {
|
||||||
class workbook;
|
class workbook;
|
||||||
class worksheet;
|
class worksheet;
|
||||||
|
|
||||||
class XLNT_CLASS const_worksheet_iterator : public std::iterator<std::bidirectional_iterator_tag, const worksheet>
|
class XLNT_CLASS const_worksheet_iterator : public std::iterator<std::bidirectional_iterator_tag, const worksheet, std::ptrdiff_t, const worksheet*, const worksheet>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
const_worksheet_iterator(const workbook &wb, std::size_t index);
|
const_worksheet_iterator(const workbook &wb, std::size_t index);
|
||||||
|
|
|
@ -33,7 +33,7 @@ namespace xlnt {
|
||||||
class workbook;
|
class workbook;
|
||||||
class worksheet;
|
class worksheet;
|
||||||
|
|
||||||
class XLNT_CLASS worksheet_iterator : public std::iterator<std::bidirectional_iterator_tag, worksheet>
|
class XLNT_CLASS worksheet_iterator : public std::iterator<std::bidirectional_iterator_tag, worksheet, std::ptrdiff_t, worksheet*, worksheet>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
worksheet_iterator(workbook &wb, std::size_t index);
|
worksheet_iterator(workbook &wb, std::size_t index);
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
// @author: see AUTHORS file
|
// @author: see AUTHORS file
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <cstddef> // std::ptrdiff_t
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
|
|
||||||
#include <xlnt/xlnt_config.hpp>
|
#include <xlnt/xlnt_config.hpp>
|
||||||
|
@ -37,7 +38,7 @@ class cell_reference;
|
||||||
class range_reference;
|
class range_reference;
|
||||||
enum class major_order;
|
enum class major_order;
|
||||||
|
|
||||||
class XLNT_CLASS cell_iterator : public std::iterator<std::bidirectional_iterator_tag, cell>
|
class XLNT_CLASS cell_iterator : public std::iterator<std::bidirectional_iterator_tag, cell, std::ptrdiff_t, cell*, cell>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
cell_iterator(worksheet ws, const cell_reference &start_cell);
|
cell_iterator(worksheet ws, const cell_reference &start_cell);
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
// @author: see AUTHORS file
|
// @author: see AUTHORS file
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <cstddef> // std::ptrdiff_t
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
|
|
||||||
#include <xlnt/xlnt_config.hpp>
|
#include <xlnt/xlnt_config.hpp>
|
||||||
|
@ -37,7 +38,7 @@ class cell_reference;
|
||||||
class range_reference;
|
class range_reference;
|
||||||
enum class major_order;
|
enum class major_order;
|
||||||
|
|
||||||
class XLNT_CLASS const_cell_iterator : public std::iterator<std::bidirectional_iterator_tag, const cell>
|
class XLNT_CLASS const_cell_iterator : public std::iterator<std::bidirectional_iterator_tag, const cell, std::ptrdiff_t, const cell*, const cell>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
const_cell_iterator(worksheet ws, const cell_reference &start_cell);
|
const_cell_iterator(worksheet ws, const cell_reference &start_cell);
|
||||||
|
|
|
@ -22,6 +22,8 @@
|
||||||
// @author: see AUTHORS file
|
// @author: see AUTHORS file
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <cstddef> // std::ptrdiff_t
|
||||||
|
|
||||||
#include <xlnt/xlnt_config.hpp>
|
#include <xlnt/xlnt_config.hpp>
|
||||||
#include <xlnt/cell/cell_reference.hpp>
|
#include <xlnt/cell/cell_reference.hpp>
|
||||||
#include <xlnt/worksheet/major_order.hpp>
|
#include <xlnt/worksheet/major_order.hpp>
|
||||||
|
@ -40,7 +42,7 @@ struct worksheet_impl;
|
||||||
/// A const version of range_iterator which does not allow modification
|
/// A const version of range_iterator which does not allow modification
|
||||||
/// to the dereferenced cell_vector.
|
/// to the dereferenced cell_vector.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
class XLNT_CLASS const_range_iterator : public std::iterator<std::bidirectional_iterator_tag, const cell_vector>
|
class XLNT_CLASS const_range_iterator : public std::iterator<std::bidirectional_iterator_tag, const cell_vector, std::ptrdiff_t, const cell_vector*, const cell_vector>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
const_range_iterator(
|
const_range_iterator(
|
||||||
|
|
|
@ -22,6 +22,8 @@
|
||||||
// @author: see AUTHORS file
|
// @author: see AUTHORS file
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <cstddef> // std::ptrdiff_t
|
||||||
|
|
||||||
#include <xlnt/xlnt_config.hpp>
|
#include <xlnt/xlnt_config.hpp>
|
||||||
#include <xlnt/cell/cell_reference.hpp>
|
#include <xlnt/cell/cell_reference.hpp>
|
||||||
#include <xlnt/worksheet/major_order.hpp>
|
#include <xlnt/worksheet/major_order.hpp>
|
||||||
|
@ -40,7 +42,7 @@ struct worksheet_impl;
|
||||||
/// An iterator used by worksheet and range for traversing
|
/// An iterator used by worksheet and range for traversing
|
||||||
/// a 2D grid of cells by row/column then across that row/column.
|
/// a 2D grid of cells by row/column then across that row/column.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
class XLNT_CLASS range_iterator : public std::iterator<std::bidirectional_iterator_tag, cell_vector>
|
class XLNT_CLASS range_iterator : public std::iterator<std::bidirectional_iterator_tag, cell_vector, std::ptrdiff_t, cell_vector*, cell_vector>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
range_iterator(worksheet &ws, const range_reference &start_cell, major_order order = major_order::row);
|
range_iterator(worksheet &ws, const range_reference &start_cell, major_order order = major_order::row);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user