Imported Upstream version 16.3.2
[platform/upstream/libzypp.git] / zypp / PoolQuery.h
index 7dd7215..aeb3b4b 100644 (file)
@@ -182,7 +182,8 @@ namespace zypp
      * This method can be used multiple times in which case the query strings
      * will be combined (together with strings added via addAttribute()) into
      * a regex. Searched attribute value will match this regex if <b>any</b>
-     * of these strings will match the value.
+     * of these strings will match the value. This can be changed by
+     * (not yet implemented) \ref setRequireAll() method.
      */
     void addString(const std::string & value);
 
@@ -194,6 +195,8 @@ namespace zypp
      * case the query strings will be combined (together with strings added
      * via addString()) into a regex. Searched attribute value will match
      * this regex if <b>any</b> of these strings will match the value.
+     * This can be changed by (not yet implemented) \ref setRequireAll()
+     * method.
      *
      * \note Though it is possible to use dependency attributes like
      * \ref Solv::Attr::provides here, note that the query string is
@@ -362,11 +365,20 @@ namespace zypp
     void setMatchGlob();
     /** Set to use the query strings as regexes */
     void setMatchRegex();
-    /** Set substring to match words */
+    /** Set to match words (uses regex) */
     void setMatchWord();
     //void setLocale(const Locale & locale);
     //@}
 
+    /**
+     * Require that all of the values set by addString or addAttribute
+     * match the values of respective attributes.
+     *
+     * \todo doesn't work yet, don't use this function
+     */
+    void setRequireAll( bool require_all = true );
+
+
     /** \name getters */
     //@{
 
@@ -409,6 +421,12 @@ namespace zypp
     Match::Mode matchMode() const
     { return flags().mode(); }
 
+    /**
+     * Whether all values added via addString() or addAttribute() are required
+     * to match the values of the respective attributes.
+     */
+    bool requireAll() const;
+
     StatusFilter statusFilterFlags() const;
     //@}
 
@@ -438,7 +456,6 @@ namespace zypp
     /** Return a human-readable description of the query */
     std::string asString() const;
 
-    bool operator<(const PoolQuery& b) const;
     bool operator==(const PoolQuery& b) const;
     bool operator!=(const PoolQuery& b) const { return !(*this == b ); }
 
@@ -461,12 +478,6 @@ namespace zypp
     void setFlags( const Match & flags );
 
   public:
-    /** \deprecated Attribute was defined but never implemented/used. Will be removed in future versions. */
-    void setRequireAll( bool require_all = true ) ZYPP_DEPRECATED;
-    /** \deprecated Attribute was defined but never implemented/used. Will be removed in future versions. */
-    bool requireAll() const ZYPP_DEPRECATED;
-
-  public:
     class Impl;
   private:
     /** Pointer to implementation */