LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Friends | List of all members
llvm::sys::path::const_iterator Class Reference

Path iterator. More...

#include <Path.h>

Public Types

typedef const StringRef value_type
 
typedef ptrdiff_t difference_type
 
typedef value_typereference
 
typedef value_typepointer
 
typedef
std::bidirectional_iterator_tag 
iterator_category
 

Public Member Functions

reference operator* () const
 
pointer operator-> () const
 
const_iteratoroperator++ ()
 
const_iteratoroperator++ (int)
 
const_iteratoroperator-- ()
 
const_iteratoroperator-- (int)
 
bool operator== (const const_iterator &RHS) const
 
bool operator!= (const const_iterator &RHS) const
 
ptrdiff_t operator- (const const_iterator &RHS) const
 Difference in bytes between this and RHS. More...
 

Friends

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

Detailed Description

Path iterator.

This is a bidirectional iterator that iterates over the individual components in path. The forward traversal order is as follows:

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

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

Definition at line 50 of file Path.h.

Member Typedef Documentation

Definition at line 61 of file Path.h.

typedef std::bidirectional_iterator_tag llvm::sys::path::const_iterator::iterator_category

Definition at line 64 of file Path.h.

Definition at line 63 of file Path.h.

Definition at line 62 of file Path.h.

Definition at line 60 of file Path.h.

Member Function Documentation

bool llvm::sys::path::const_iterator::operator!= ( const const_iterator RHS) const

Definition at line 276 of file Path.cpp.

reference llvm::sys::path::const_iterator::operator* ( ) const
inline

Definition at line 66 of file Path.h.

const_iterator & llvm::sys::path::const_iterator::operator++ ( )
const_iterator& llvm::sys::path::const_iterator::operator++ ( int  )
ptrdiff_t llvm::sys::path::const_iterator::operator- ( const const_iterator RHS) const

Difference in bytes between this and RHS.

Definition at line 280 of file Path.cpp.

const_iterator & llvm::sys::path::const_iterator::operator-- ( )
const_iterator& llvm::sys::path::const_iterator::operator-- ( int  )
pointer llvm::sys::path::const_iterator::operator-> ( ) const
inline

Definition at line 67 of file Path.h.

bool llvm::sys::path::const_iterator::operator== ( const const_iterator RHS) const

Definition at line 271 of file Path.cpp.

References llvm::StringRef::begin().

Friends And Related Function Documentation

const_iterator begin ( StringRef  path)
friend

Get begin iterator over path.

Parameters
pathInput path.
Returns
Iterator initialized with the first component of path.

Definition at line 173 of file Path.cpp.

const_iterator end ( StringRef  path)
friend

Get end iterator over path.

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

Definition at line 181 of file Path.cpp.

Referenced by llvm::DWARFDebugLine::LineTable::dump(), llvm::MipsRegisterInfo::getReservedRegs(), and llvm::opt::OptTable::PrintHelp().


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