00001 /**************************************************************************** 00002 ** This file is part of Cubi, a Sparql query builder for the Qt framework 00003 ** 00004 ** Copyright (c) 2010-2011 Nokia Corporation and/or its subsidiary(-ies). 00005 ** 00006 ** Contact: Nokia Corporation (info@qt.nokia.com) 00007 ** 00008 ** 00009 ** GNU Lesser General Public License Usage 00010 ** 00011 ** This file may be used under the terms of the GNU Lesser General Public 00012 ** License version 2.1 as published by the Free Software Foundation and 00013 ** appearing in the file LICENSE.LGPL included in the packaging of this file. 00014 ** Please review the following information to ensure the GNU Lesser General 00015 ** Public License version 2.1 requirements will be met: 00016 ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 00017 ** 00018 ** In addition, as a special exception, Nokia gives you certain additional 00019 ** rights. These rights are described in the Nokia Qt LGPL Exception 00020 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 00021 ** 00022 ** Other Usage 00023 ** 00024 ** Alternatively, this file may be used in accordance with the terms and 00025 ** conditions contained in a signed written agreement between you and Nokia. 00026 ** 00027 ** If you have questions regarding the use of this file, please contact 00028 ** Nokia at info@qt.nokia.com. 00029 ****************************************************************************/ 00030 00031 #ifndef CUBI_FILTER_GROUP_P_H 00032 #define CUBI_FILTER_GROUP_P_H 00033 00034 #include "value.h" 00035 00036 CUBI_BEGIN_NAMESPACE 00037 00038 class FilterData; 00039 00040 class Exists; 00041 class LiteralValue; 00042 class Function; 00043 class Select; 00044 00045 class Filter : public Value { 00046 00047 public: 00048 Filter(); 00049 CUBI_EXPLICIT Filter(const Exists &exists); 00050 CUBI_EXPLICIT Filter(const Function &function); 00051 CUBI_EXPLICIT Filter(const LiteralValue &literal); 00052 CUBI_EXPLICIT Filter(const Select &select); 00053 00054 enum Type { 00055 InvalidFilter, 00056 FunctionFilter, 00057 SelectFilter, 00058 ExistsFilter, 00059 LiteralFilter 00060 }; 00061 00062 Type filterType() const; 00063 00064 Exists exists() const; 00065 Function function() const; 00066 LiteralValue literalValue() const; 00067 Select select() const; 00068 00069 private: 00070 const FilterData * data() const; 00071 FilterData * data(); 00072 }; 00073 00074 CUBI_END_NAMESPACE 00075 00076 #endif