Horizon
Public Member Functions | Friends | List of all members
libzip::archive::iterator Class Reference

Base iterator class. More...

#include <zip.hpp>

Inheritance diagram for libzip::archive::iterator:

Public Member Functions

 iterator () noexcept=default
 Default iterator.
 
libzip::stat operator* () const
 Dereference the iterator. More...
 
stat_ptr operator-> () const
 Dereference the iterator. More...
 
iteratoroperator++ () noexcept
 Post increment. More...
 
iterator operator++ (int) noexcept
 Pre increment. More...
 
iteratoroperator-- () noexcept
 Post decrement. More...
 
iterator operator-- (int) noexcept
 Pre decrement. More...
 
iterator operator+ (int inc) const noexcept
 Increment. More...
 
iterator operator- (int dec) const noexcept
 Decrement. More...
 
bool operator== (const iterator &other) const noexcept
 Compare equality. More...
 
bool operator!= (const iterator &other) const noexcept
 Compare equality. More...
 
libzip::stat operator[] (int index)
 Access a stat information at the specified index. More...
 

Friends

class archive
 

Detailed Description

Base iterator class.

Member Function Documentation

◆ operator!=()

bool libzip::archive::iterator::operator!= ( const iterator other) const
inlinenoexcept

Compare equality.

Parameters
otherthe other iterator
Returns
true if different

◆ operator*()

libzip::stat libzip::archive::iterator::operator* ( ) const
inline

Dereference the iterator.

Returns
the stat information

◆ operator+()

iterator libzip::archive::iterator::operator+ ( int  inc) const
inlinenoexcept

Increment.

Parameters
incthe number
Returns
the new iterator

◆ operator++() [1/2]

iterator& libzip::archive::iterator::operator++ ( )
inlinenoexcept

Post increment.

Returns
this

◆ operator++() [2/2]

iterator libzip::archive::iterator::operator++ ( int  )
inlinenoexcept

Pre increment.

Returns
this

◆ operator-()

iterator libzip::archive::iterator::operator- ( int  dec) const
inlinenoexcept

Decrement.

Parameters
decthe number
Returns
the new iterator

◆ operator--() [1/2]

iterator& libzip::archive::iterator::operator-- ( )
inlinenoexcept

Post decrement.

Returns
this

◆ operator--() [2/2]

iterator libzip::archive::iterator::operator-- ( int  )
inlinenoexcept

Pre decrement.

Returns
this

◆ operator->()

stat_ptr libzip::archive::iterator::operator-> ( ) const
inline

Dereference the iterator.

Returns
the stat information as point

◆ operator==()

bool libzip::archive::iterator::operator== ( const iterator other) const
inlinenoexcept

Compare equality.

Parameters
otherthe other iterator
Returns
true if same

◆ operator[]()

libzip::stat libzip::archive::iterator::operator[] ( int  index)
inline

Access a stat information at the specified index.

Precondition
must not be default-constructed
Parameters
indexthe new index
Returns
stat information
Exceptions
std::runtime_erroron errors

The documentation for this class was generated from the following file: