zypp::sat::AttrMatcher::Impl Struct Reference

AttrMatcher implementation. More...

List of all members.

Public Member Functions

 Impl ()
 Impl (const std::string &search_r, const Match &flags_r)
 ~Impl ()
void compile () const
 Compile the pattern.
bool isCompiled () const
 Whether the pattern is already compiled.
bool doMatch (const char *string_r) const
 Return whether string matches.
const std::string & searchstring () const
 The current searchstring.
void setSearchstring (const std::string &string_r)
 Set a new searchstring.
const Matchflags () const
 The current search flags.
void setFlags (const Match &flags_r)
 Set new search flags.

Private Member Functions

void invalidate ()
 Has to be called if _search or _flags change.
Implclone () const
 clone for RWCOW_pointer

Private Attributes

std::string _search
Match _flags
scoped_ptr< ::_Datamatcher > _matcher

Friends

ImplrwcowClone (const Impl *rhs)

Related Functions

(Note that these are not member functions.)

std::ostream & operator<< (std::ostream &str, const AttrMatcher::Impl &obj)


Detailed Description

AttrMatcher implementation.

Take care to release any allocated regex by calling datamatcher_free.

Definition at line 171 of file AttrMatcher.cc.


Constructor & Destructor Documentation

zypp::sat::AttrMatcher::Impl::Impl (  )  [inline]

Definition at line 173 of file AttrMatcher.cc.

Referenced by clone().

zypp::sat::AttrMatcher::Impl::Impl ( const std::string &  search_r,
const Match flags_r 
) [inline]

Definition at line 176 of file AttrMatcher.cc.

zypp::sat::AttrMatcher::Impl::~Impl (  )  [inline]

Definition at line 181 of file AttrMatcher.cc.

References invalidate().


Member Function Documentation

void zypp::sat::AttrMatcher::Impl::compile (  )  const [inline]

Compile the pattern.

Definition at line 185 of file AttrMatcher.cc.

References _flags, _matcher, _search, zypp::Match::get(), zypp::Match::mode(), zypp::Match::OTHER, and ZYPP_THROW.

Referenced by doMatch().

bool zypp::sat::AttrMatcher::Impl::isCompiled (  )  const [inline]

Whether the pattern is already compiled.

Definition at line 203 of file AttrMatcher.cc.

References _matcher.

bool zypp::sat::AttrMatcher::Impl::doMatch ( const char *  string_r  )  const [inline]

Return whether string matches.

Definition at line 207 of file AttrMatcher.cc.

References _matcher, and compile().

const std::string& zypp::sat::AttrMatcher::Impl::searchstring (  )  const [inline]

The current searchstring.

Definition at line 217 of file AttrMatcher.cc.

References _search.

Referenced by operator<<().

void zypp::sat::AttrMatcher::Impl::setSearchstring ( const std::string &  string_r  )  [inline]

Set a new searchstring.

Definition at line 221 of file AttrMatcher.cc.

References _search, and invalidate().

const Match& zypp::sat::AttrMatcher::Impl::flags (  )  const [inline]

The current search flags.

Definition at line 225 of file AttrMatcher.cc.

References _flags.

Referenced by operator<<().

void zypp::sat::AttrMatcher::Impl::setFlags ( const Match flags_r  )  [inline]

Set new search flags.

Definition at line 229 of file AttrMatcher.cc.

References _flags, and invalidate().

void zypp::sat::AttrMatcher::Impl::invalidate (  )  [inline, private]

Has to be called if _search or _flags change.

Definition at line 234 of file AttrMatcher.cc.

References _matcher.

Referenced by setFlags(), setSearchstring(), and ~Impl().

Impl* zypp::sat::AttrMatcher::Impl::clone (  )  const [inline, private]

clone for RWCOW_pointer

Definition at line 249 of file AttrMatcher.cc.

References _flags, _search, and Impl().


Friends And Related Function Documentation

Impl* rwcowClone ( const Impl rhs  )  [friend]

std::ostream & operator<< ( std::ostream &  str,
const AttrMatcher::Impl obj 
) [related]

Stream output

Definition at line 255 of file AttrMatcher.cc.

References flags(), and searchstring().


Member Data Documentation

Definition at line 242 of file AttrMatcher.cc.

Referenced by clone(), compile(), searchstring(), and setSearchstring().

Definition at line 243 of file AttrMatcher.cc.

Referenced by clone(), compile(), flags(), and setFlags().

scoped_ptr< ::_Datamatcher> zypp::sat::AttrMatcher::Impl::_matcher [mutable, private]

Definition at line 244 of file AttrMatcher.cc.

Referenced by compile(), doMatch(), invalidate(), and isCompiled().


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

doxygen