• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

/tmp/buildd/soprano-2.5.0.e5.20110117.1215001/soprano/statement.h

Go to the documentation of this file.
00001 /* This file is part of Soprano Project.
00002  *
00003  * Copyright (C) 2006 Daniele Galdi <daniele.galdi@gmail.com>
00004  * Copyright (C) 2007-2009 Sebastian Trueg <trueg@kde.org>
00005  *
00006  * This library is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU Library General Public
00008  * License as published by the Free Software Foundation; either
00009  * version 2 of the License, or (at your option) any later version.
00010  *
00011  * This library is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  * Library General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Library General Public License
00017  * along with this library; see the file COPYING.LIB.  If not, write to
00018  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00019  * Boston, MA 02110-1301, USA.
00020  */
00021 
00022 #ifndef SOPRANO_STATEMENT_H
00023 #define SOPRANO_STATEMENT_H
00024 
00025 #include "node.h"
00026 #include "soprano_export.h"
00027 
00028 namespace Soprano
00029 {
00047     class SOPRANO_EXPORT Statement
00048     {
00049     public:
00051 
00054         Statement();
00055 
00067         Statement( const Node &subject, const Node &predicate, const Node &object, const Node &context = Node() );
00068 
00069         Statement( const Statement &other );
00070 
00071         virtual ~Statement();
00072 
00073         Statement& operator=( const Statement& other );
00075 
00077         bool operator==( const Statement& other ) const;
00078         bool operator!=( const Statement& other ) const;
00079 
00097         bool matches( const Statement& other ) const;
00099 
00101 
00108         bool isValid() const;
00110 
00112 
00115         Node subject() const;
00116 
00120         Node predicate() const;
00121 
00125         Node object() const;
00126 
00130         Node context() const;
00132 
00134 
00139         void setSubject( const Node &subject );
00140 
00146         void setPredicate( const Node &predicate );
00152         void setObject( const Node &object );
00153 
00159         void setContext( const Node &context );
00161 
00162     private:
00163         class Private;
00164         QSharedDataPointer<Private> d;
00165     };
00166     SOPRANO_EXPORT uint qHash( const Statement& s ); 
00167 }
00168 
00172 SOPRANO_EXPORT QDebug operator<<( QDebug s, const Soprano::Statement& );
00173 
00177 SOPRANO_EXPORT QTextStream& operator<<( QTextStream& s, const Soprano::Statement& );
00178 
00179 #endif // SOPRANO_STATEMENT_H
00180 

Generated on Mon Jan 31 2011 11:40:18 for Soprano by  doxygen 1.7.1