LeechCraft  0.6.70-18450-gabe19ee3b0
Modular cross-platform feature rich live environment.
urloperator.h
Go to the documentation of this file.
1 /**********************************************************************
2  * LeechCraft - modular cross-platform feature rich internet client.
3  * Copyright (C) 2006-2014 Georg Rudoy
4  *
5  * Distributed under the Boost Software License, Version 1.0.
6  * (See accompanying file LICENSE or copy at https://www.boost.org/LICENSE_1_0.txt)
7  **********************************************************************/
8 
9 #pragma once
10 
11 #include <QUrl>
12 #include <QUrlQuery>
13 #include "sllconfig.h"
14 
15 namespace LC
16 {
17 namespace Util
18 {
45  {
46  QUrl& Url_;
47 
48  QUrlQuery Query_;
49  public:
54  UrlOperator (QUrl& url);
55 
62  ~UrlOperator ();
63 
66  void Flush ();
67 
82  UrlOperator& operator() (const QString& key, const QString& value);
83 
95  UrlOperator& operator() (const QString& key, const QByteArray& value);
96 
110  UrlOperator& operator() (const QString& key, const char *value);
111 
123  UrlOperator& operator() (const QString& key, int value);
124 
125  template<typename Key, typename Value>
126  UrlOperator& operator() (bool condition, Key&& key, Value&& value)
127  {
128  if (condition)
129  (*this) (std::forward<Key> (key), std::forward<Value> (value));
130 
131  return *this;
132  }
133 
141  UrlOperator& operator-= (const QString& key);
142 
145  QUrl operator() ();
146  };
147 }
148 }
#define UTIL_SLL_API
Definition: sllconfig.h:16
Manipulates query part of an QUrl object.
Definition: urloperator.h:44