Class ConstRowIterator

Synopsis

#include <orm_lib/inc/drogon/orm/RowIterator.h>

class ConstRowIterator : public std::iterator<std::random_access_iterator_tag,
                                              const Field,
                                              Row::DifferenceType,
                                              ConstRowIterator,
                                              Field>,
                         protected Field

Description

No description yet.

Inheritance

Ancestors: std::iterator< std::random_access_iterator_tag, const Field, Row::DifferenceType, ConstRowIterator, Field >, Field

Decsendents: ConstReverseRowIterator

Methods

operator!=
operator*
operator++
operator+=
operator--
operator-=
operator->
operator<
operator<=
operator==
operator>
operator>=

Source

Lines 26-103 in orm_lib/inc/drogon/orm/RowIterator.h. Line 32 in orm_lib/inc/drogon/orm/RowIterator.h.

class ConstRowIterator : public std::iterator<std::random_access_iterator_tag,
                                              const Field,
                                              Row::DifferenceType,
                                              ConstRowIterator,
                                              Field>,
                         protected Field
{
  public:
    using pointer = const Field *;
    using reference = const Field &;
    using value_type = const Field;
    using size_type = Row::SizeType;
    using difference_type = Row::DifferenceType;
    // ConstRowIterator(const Field &t) noexcept : Field(t) {}

    pointer operator->()
    {
        return this;
    }
    reference operator*()
    {
        return *this;
    }

    ConstRowIterator operator++(int);
    ConstRowIterator &operator++()
    {
        ++column_;
        return *this;
    }
    ConstRowIterator operator--(int);
    ConstRowIterator &operator--()
    {
        --column_;
        return *this;
    }
    ConstRowIterator &operator+=(difference_type i)
    {
        column_ += i;
        return *this;
    }
    ConstRowIterator &operator-=(difference_type i)
    {
        column_ -= i;
        return *this;
    }

    bool operator==(const ConstRowIterator &other) const
    {
        return column_ == other.column_;
    }
    bool operator!=(const ConstRowIterator &other) const
    {
        return column_ != other.column_;
    }
    bool operator>(const ConstRowIterator &other) const
    {
        return column_ > other.column_;
    }
    bool operator<(const ConstRowIterator &other) const
    {
        return column_ < other.column_;
    }
    bool operator>=(const ConstRowIterator &other) const
    {
        return column_ >= other.column_;
    }
    bool operator<=(const ConstRowIterator &other) const
    {
        return column_ <= other.column_;
    }

  private:
    friend class Row;
    ConstRowIterator(const Row &r, SizeType column) noexcept : Field(r, column)
    {
    }
};





Add Discussion as Guest

Log in to DocsForge