WPILibC++  2019.3.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
wpi::sys::path::const_iterator Class Reference

Path iterator. More...

#include <Path.h>

Inheritance diagram for wpi::sys::path::const_iterator:
wpi::iterator_facade_base< const_iterator, std::input_iterator_tag, const StringRef >

Public Member Functions

reference operator* () const
 
const_iteratoroperator++ ()
 
bool operator== (const const_iterator &RHS) const
 
ptrdiff_t operator- (const const_iterator &RHS) const
 Difference in bytes between this and RHS.
 
- Public Member Functions inherited from wpi::iterator_facade_base< const_iterator, std::input_iterator_tag, const StringRef >
const_iterator operator+ (DifferenceTypeT n) const
 
const_iterator operator- (DifferenceTypeT n) const
 
const_iterator & operator++ ()
 
const_iterator operator++ (int)
 
const_iterator & operator-- ()
 
const_iterator operator-- (int)
 
bool operator!= (const const_iterator &RHS) const
 
bool operator> (const const_iterator &RHS) const
 
bool operator<= (const const_iterator &RHS) const
 
bool operator>= (const const_iterator &RHS) const
 
PointerT operator-> ()
 
PointerT operator-> () const
 
ReferenceProxy operator[] (DifferenceTypeT n)
 
ReferenceProxy operator[] (DifferenceTypeT n) const
 

Friends

const_iterator begin (StringRef path, Style style)
 Get begin iterator over path. More...
 
const_iterator end (StringRef path)
 Get end iterator over path. More...
 

Additional Inherited Members

- Protected Types inherited from wpi::iterator_facade_base< const_iterator, std::input_iterator_tag, const StringRef >
enum  
 

Detailed Description

Path iterator.

This is an input iterator that iterates over the individual components in path. The traversal order is as follows:

  • The root-name element, if present.
  • The root-directory element, if present.
  • Each successive filename element, if present.
  • Dot, if one or more trailing non-root slash characters are present. Traversing backwards is possible with reverse_iterator

Iteration examples. Each component is separated by ',':

/ => /
/foo => /,foo
foo/ => foo,.
/foo/bar => /,foo,bar
../ => ..,.
C:\foo\bar => C:,/,foo,bar

Friends And Related Function Documentation

const_iterator begin ( StringRef  path,
Style  style 
)
friend

Get begin iterator over path.

Parameters
pathInput path.
Returns
Iterator initialized with the first component of path.
const_iterator end ( StringRef  path)
friend

Get end iterator over path.

Parameters
pathInput path.
Returns
Iterator initialized to the end of path.

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