CppCommon  1.0.4.1
C++ Common Library
Public Types | Public Member Functions | Friends | List of all members
CppCommon::DirectoryIterator Class Reference

Filesystem directory iterator. More...

#include <directory_iterator.h>

Public Types

typedef std::ptrdiff_t difference_type
 
typedef Path value_type
 
typedef const Pathreference
 
typedef const Pathpointer
 
typedef std::forward_iterator_tag iterator_category
 

Public Member Functions

 DirectoryIterator ()
 
 DirectoryIterator (DirectoryIterator &it)
 
 DirectoryIterator (DirectoryIterator &&it) noexcept
 
 ~DirectoryIterator ()
 
DirectoryIteratoroperator= (DirectoryIterator &it)
 
DirectoryIteratoroperator= (DirectoryIterator &&it) noexcept
 
DirectoryIteratoroperator++ ()
 
DirectoryIterator operator++ (int)
 
const Pathoperator* () const noexcept
 
const Pathoperator-> () const noexcept
 
void swap (DirectoryIterator &it) noexcept
 Swap two instances. More...
 

Friends

class Directory
 
bool operator== (const DirectoryIterator &it1, const DirectoryIterator &it2) noexcept
 
bool operator!= (const DirectoryIterator &it1, const DirectoryIterator &it2) noexcept
 
void swap (DirectoryIterator &it1, DirectoryIterator &it2) noexcept
 

Detailed Description

Filesystem directory iterator.

Filesystem directory iterator is used to iterate through directory content (directories, files, symlinks).

No sort order is guarantied!

Not thread-safe.

Definition at line 27 of file directory_iterator.h.

Member Typedef Documentation

◆ difference_type

Definition at line 33 of file directory_iterator.h.

◆ iterator_category

typedef std::forward_iterator_tag CppCommon::DirectoryIterator::iterator_category

Definition at line 37 of file directory_iterator.h.

◆ pointer

Definition at line 36 of file directory_iterator.h.

◆ reference

Definition at line 35 of file directory_iterator.h.

◆ value_type

Definition at line 34 of file directory_iterator.h.

Constructor & Destructor Documentation

◆ DirectoryIterator() [1/3]

CppCommon::DirectoryIterator::DirectoryIterator ( )

Definition at line 211 of file directory_iterator.cpp.

◆ DirectoryIterator() [2/3]

CppCommon::DirectoryIterator::DirectoryIterator ( DirectoryIterator it)

Definition at line 224 of file directory_iterator.cpp.

◆ DirectoryIterator() [3/3]

CppCommon::DirectoryIterator::DirectoryIterator ( DirectoryIterator &&  it)
noexcept

Definition at line 228 of file directory_iterator.cpp.

◆ ~DirectoryIterator()

CppCommon::DirectoryIterator::~DirectoryIterator ( )

Definition at line 232 of file directory_iterator.cpp.

Member Function Documentation

◆ operator*()

const Path & CppCommon::DirectoryIterator::operator* ( ) const
inlinenoexcept

Definition at line 21 of file directory_iterator.inl.

◆ operator++() [1/2]

DirectoryIterator & CppCommon::DirectoryIterator::operator++ ( )

Definition at line 250 of file directory_iterator.cpp.

◆ operator++() [2/2]

DirectoryIterator CppCommon::DirectoryIterator::operator++ ( int  )

Definition at line 257 of file directory_iterator.cpp.

◆ operator->()

const Path * CppCommon::DirectoryIterator::operator-> ( ) const
inlinenoexcept

Definition at line 26 of file directory_iterator.inl.

◆ operator=() [1/2]

DirectoryIterator & CppCommon::DirectoryIterator::operator= ( DirectoryIterator &&  it)
noexcept

Definition at line 243 of file directory_iterator.cpp.

◆ operator=() [2/2]

DirectoryIterator & CppCommon::DirectoryIterator::operator= ( DirectoryIterator it)

Definition at line 236 of file directory_iterator.cpp.

◆ swap()

void CppCommon::DirectoryIterator::swap ( DirectoryIterator it)
inlinenoexcept

Swap two instances.

Definition at line 31 of file directory_iterator.inl.

Friends And Related Function Documentation

◆ Directory

friend class Directory
friend

Definition at line 29 of file directory_iterator.h.

◆ operator!=

bool operator!= ( const DirectoryIterator it1,
const DirectoryIterator it2 
)
friend

Definition at line 16 of file directory_iterator.inl.

◆ operator==

bool operator== ( const DirectoryIterator it1,
const DirectoryIterator it2 
)
friend

Definition at line 11 of file directory_iterator.inl.

◆ swap

void swap ( DirectoryIterator it1,
DirectoryIterator it2 
)
friend

Definition at line 37 of file directory_iterator.inl.


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