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

pd_RDFSupportRed.h

Go to the documentation of this file.
00001 /* -*- mode: C++; tab-width: 4; c-basic-offset: 4; -*- */
00002 
00003 /* AbiWord
00004  * Copyright (c) 2011 Ben Martin
00005  *
00006  * This program is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU General Public License
00008  * as published by the Free Software Foundation; either version 2
00009  * of the License, or (at your option) any later version.
00010  *
00011  * This program 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
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00019  * 02110-1301 USA.
00020  */
00021 
00022 #ifndef PD_RDFSUPPORTRED_H
00023 #define PD_RDFSUPPORTRED_H
00024 
00025 #include <redland.h>
00026 #include <rasqal.h>
00027 #include "pd_DocumentRDF.h"
00028 #include "pd_RDFSupport.h"
00029 
00030 librdf_world* getWorld();
00031 std::string tostr( librdf_node* n );
00032 librdf_statement* toRedland( const PD_RDFStatement& st );
00033 ABI_EXPORT std::string toString( librdf_uri *node );
00034 ABI_EXPORT std::string toString( librdf_node *node );
00035 
00036 struct RedStatementHolder
00037 {
00038     librdf_statement* m_st;
00039 public:
00040     RedStatementHolder( librdf_statement* stred )
00041         : m_st( stred )
00042     {
00043     }
00044 
00045     ~RedStatementHolder()
00046     {
00047         librdf_free_statement( m_st );
00048     }
00049 };
00050 
00051 
00062 class ABI_EXPORT RDFArguments
00063 {
00064 public:
00065     librdf_world*   world;
00066     librdf_storage* storage;
00067     librdf_model*   model;
00068     librdf_parser*  parser;
00069 
00070     RDFArguments();
00071     ~RDFArguments();
00072 private:
00073     // NoCopying!
00074     RDFArguments&  operator=(const RDFArguments& other);
00075     RDFArguments(const RDFArguments& other);
00076 };
00077 void dumpModelToTest( RDFArguments& args );
00078 
00079 
00080 
00081 #endif

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1