26#include <zypp-core/base/DefaultIntegral>
68 , boost::forward_traversal_tag
89 {
return( base() ? *base() : 0 ); }
215 template<
class TOutputIterator>
219 template<
class TOutputIterator>
223 template<
class TOutputIterator>
228 template<
class TOutputIterator>
232 template<
class TOutputIterator>
236 template<
class TOutputIterator>
240 if (
glob.lastGlobReturn() == 0 )
242 (*result_r)++ =
typename TOutputIterator::container_type::value_type(*
it);
243 return glob.lastGlobReturn();
Reference counted access to a Tp object calling a custom Dispose function when the last AutoDispose h...
Iterate NULL terminated char* array.
std::ostream & operator<<(std::ostream &str, const Glob::const_iterator &obj)
Stream output.
friend class boost::iterator_core_access
reference dereference() const
const_iterator(char **_idx)
Find pathnames matching a pattern.
static int collect(const std::string &pattern_r, Flags flags_r, TOutputIterator result_r)
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool empty() const
Whether matches were found.
scoped_ptr< ::glob_t > _result
void setDefaultFlags(Flags flags_r=Flags())
Set the default flags passed to ::glob().
int add(const std::string &pattern_r, Flags flags_r=Flags())
This is an overloaded member function, provided for convenience. It differs from the above function o...
Glob(Flags flags_r=Flags())
Default ctor optionally taking the default flags.
size_type size() const
The number of matches found so far.
static int collect(const std::string &pattern_r, TOutputIterator result_r)
This is an overloaded member function, provided for convenience. It differs from the above function o...
ZYPP_DECLARE_FLAGS(Flags, Bits)
type Flags: Type-safe OR-combination of Bits.
const_iterator begin() const
Iterator pointing to the first result.
int add(const Pathname &pattern_r, Flags flags_r=Flags())
Add pathnames matching pattern_r to the current result.
static int collect(const char *pattern_r, TOutputIterator result_r)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Bits
Individual bits to combine in Flags.
@ kOnlyDir
Match only directories.
@ kBrace
Expand "{a,b}" to "a" "b".
@ kPeriod
Leading ‘.’ can be matched by metachars.
@ kNoCheck
If nothing matches, return the pattern.
@ kNoEscape
Backslashes don't quote metacharacters.
@ kNoMagic
If no magic chars, return the pattern.
@ kTilde
Expand ~user and ~ to home directories.
@ kMark
Append a slash to each name.
@ kNoSort
Don't sort the names.
@ kErr
Return on read errors.
@ kAltDirFunc
Use gl_opendir et al functions.
@ kTildeCheck
Like GLOB_TILDE but return an error if the user name is not available.
DefaultIntegral< int, 0 > _lastGlobReturn
int lastGlobReturn() const
Returns the value returned by the last call to ::glob().
static int collect(const Pathname &pattern_r, Flags flags_r, TOutputIterator result_r)
void reset(Flags flags_r=Flags())
Clear all results and reset defaultFlags.
void clear()
Clear all results found so far.
const_iterator end() const
Iterator pointing behind the last result.
static int collect(const char *pattern_r, Flags flags_r, TOutputIterator result_r)
This is an overloaded member function, provided for convenience. It differs from the above function o...
static int collect(const Pathname &pattern_r, TOutputIterator result_r)
Write glob result to some OutputIterator.
Glob(const std::string &pattern_r, Flags flags_r=Flags())
This is an overloaded member function, provided for convenience. It differs from the above function o...
Glob(const Pathname &pattern_r, Flags flags_r=Flags())
Ctor adding pathnames matching pattern_r.
Flags defaultFlags() const
The default flags passed to ::glob().
Glob(const char *pattern_r, Flags flags_r=Flags())
This is an overloaded member function, provided for convenience. It differs from the above function o...
String related utilities and Regular expression matching.
boost::noncopyable NonCopyable
Ensure derived classes cannot be copied.
std::ostream & operator<<(std::ostream &str, const Glob &obj)
Easy-to use interface to the ZYPP dependency resolver.
#define for_(IT, BEG, END)
Convenient for-loops using iterator.
#define ZYPP_DECLARE_OPERATORS_FOR_FLAGS(Name)