LCOV - code coverage report
Current view: top level - include - xapian.h (source / functions) Hit Total Coverage
Test: Test Coverage for xapian-core fcfb185a9dd5 Lines: 8 8 100.0 %
Date: 2019-04-18 16:33:14 Functions: 4 4 100.0 %
Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : /** @file xapian.h
       2                 :            :  *  @brief Public interfaces for the Xapian library.
       3                 :            :  */
       4                 :            : // Copyright (C) 2003,2004,2005,2007,2008,2009,2010,2012,2013,2015,2016 Olly Betts
       5                 :            : //
       6                 :            : // This program is free software; you can redistribute it and/or modify
       7                 :            : // it under the terms of the GNU General Public License as published by
       8                 :            : // the Free Software Foundation; either version 2 of the License, or
       9                 :            : // (at your option) any later version.
      10                 :            : //
      11                 :            : // This program is distributed in the hope that it will be useful,
      12                 :            : // but WITHOUT ANY WARRANTY; without even the implied warranty of
      13                 :            : // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      14                 :            : // GNU General Public License for more details.
      15                 :            : //
      16                 :            : // You should have received a copy of the GNU General Public License
      17                 :            : // along with this program; if not, write to the Free Software
      18                 :            : // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
      19                 :            : 
      20                 :            : #ifndef XAPIAN_INCLUDED_XAPIAN_H
      21                 :            : #define XAPIAN_INCLUDED_XAPIAN_H
      22                 :            : 
      23                 :            : #ifdef slots
      24                 :            : # ifdef Q_OBJECT
      25                 :            : // Qt headers '#define slots' by default, which clashes with us using it as a
      26                 :            : // class member name.  Including <xapian.h> first is a simple workaround, or
      27                 :            : // you can use 'no_keywords' to stop Qt polluting the global macro namespace,
      28                 :            : // as described here:
      29                 :            : //
      30                 :            : // http://qt-project.org/doc/qt-5.0/signalsandslots.html#using-qt-with-3rd-party-signals-and-slots
      31                 :            : #  error "Include <xapian.h> before Qt headers, or put 'CONFIG += no_keywords' in your .pro file and use Q_SLOTS instead of slots, etc"
      32                 :            : # endif
      33                 :            : # ifdef WT_API
      34                 :            : // Argh, copycat polluters!
      35                 :            : #  error "Include <xapian.h> before Wt headers, or define WT_NO_SLOT_MACROS to stop Wt from defining the macros 'slots' and 'SLOT()'"
      36                 :            : # endif
      37                 :            : #endif
      38                 :            : 
      39                 :            : // Define so that deprecation warnings are given to API users, but not
      40                 :            : // while building the library.
      41                 :            : #define XAPIAN_IN_XAPIAN_H
      42                 :            : 
      43                 :            : // Set defines for library version and check C++ ABI versions match.
      44                 :            : #include <xapian/version.h>
      45                 :            : 
      46                 :            : // Types
      47                 :            : #include <xapian/types.h>
      48                 :            : 
      49                 :            : // Function attributes
      50                 :            : #include <xapian/attributes.h>
      51                 :            : 
      52                 :            : // Constants
      53                 :            : #include <xapian/constants.h>
      54                 :            : 
      55                 :            : // Exceptions
      56                 :            : #include <xapian/error.h>
      57                 :            : 
      58                 :            : // Access to databases, documents, etc.
      59                 :            : #include <xapian/database.h>
      60                 :            : #include <xapian/dbfactory.h>
      61                 :            : #include <xapian/document.h>
      62                 :            : #include <xapian/positioniterator.h>
      63                 :            : #include <xapian/postingiterator.h>
      64                 :            : #include <xapian/termiterator.h>
      65                 :            : #include <xapian/valueiterator.h>
      66                 :            : 
      67                 :            : // Indexing
      68                 :            : #include <xapian/termgenerator.h>
      69                 :            : 
      70                 :            : // Searching
      71                 :            : #include <xapian/enquire.h>
      72                 :            : #include <xapian/eset.h>
      73                 :            : #include <xapian/mset.h>
      74                 :            : #include <xapian/expanddecider.h>
      75                 :            : #include <xapian/keymaker.h>
      76                 :            : #include <xapian/matchdecider.h>
      77                 :            : #include <xapian/matchspy.h>
      78                 :            : #include <xapian/postingsource.h>
      79                 :            : #include <xapian/query.h>
      80                 :            : #include <xapian/queryparser.h>
      81                 :            : #include <xapian/rset.h>
      82                 :            : #include <xapian/valuesetmatchdecider.h>
      83                 :            : #include <xapian/weight.h>
      84                 :            : 
      85                 :            : // Clustering
      86                 :            : #include <xapian/cluster.h>
      87                 :            : 
      88                 :            : // Stemming
      89                 :            : #include <xapian/stem.h>
      90                 :            : 
      91                 :            : // Diversification
      92                 :            : #include <xapian/diversify.h>
      93                 :            : 
      94                 :            : // Subclass registry
      95                 :            : #include <xapian/registry.h>
      96                 :            : 
      97                 :            : // Unicode support
      98                 :            : #include <xapian/unicode.h>
      99                 :            : 
     100                 :            : // Geospatial
     101                 :            : #include <xapian/geospatial.h>
     102                 :            : 
     103                 :            : // Database compaction and merging
     104                 :            : #include <xapian/compactor.h>
     105                 :            : 
     106                 :            : // ELF visibility annotations for GCC.
     107                 :            : #include <xapian/visibility.h>
     108                 :            : 
     109                 :            : // Mechanism for accessing a struct of constant information
     110                 :            : #include <xapian/constinfo.h>
     111                 :            : 
     112                 :            : /// The Xapian namespace contains public interfaces for the Xapian library.
     113                 :            : namespace Xapian {
     114                 :            : 
     115                 :            : // Functions returning library version:
     116                 :            : 
     117                 :            : /** Report the version string of the library which the program is linked with.
     118                 :            :  *
     119                 :            :  * This may be different to the version compiled against (given by
     120                 :            :  * XAPIAN_VERSION) if shared libraries are being used.
     121                 :            :  */
     122                 :          1 : inline const char * version_string() {
     123                 :          1 :     return Internal::get_constinfo_()->str;
     124                 :            : }
     125                 :            : 
     126                 :            : /** Report the major version of the library which the program is linked with.
     127                 :            :  *
     128                 :            :  * This may be different to the version compiled against (given by
     129                 :            :  * XAPIAN_MAJOR_VERSION) if shared libraries are being used.
     130                 :            :  */
     131                 :          1 : inline int major_version() {
     132                 :          1 :     return Internal::get_constinfo_()->major;
     133                 :            : }
     134                 :            : 
     135                 :            : /** Report the minor version of the library which the program is linked with.
     136                 :            :  *
     137                 :            :  * This may be different to the version compiled against (given by
     138                 :            :  * XAPIAN_MINOR_VERSION) if shared libraries are being used.
     139                 :            :  */
     140                 :          1 : inline int minor_version() {
     141                 :          1 :     return Internal::get_constinfo_()->minor;
     142                 :            : }
     143                 :            : 
     144                 :            : /** Report the revision of the library which the program is linked with.
     145                 :            :  *
     146                 :            :  * This may be different to the version compiled against (given by
     147                 :            :  * XAPIAN_REVISION) if shared libraries are being used.
     148                 :            :  */
     149                 :          1 : inline int revision() {
     150                 :          1 :     return Internal::get_constinfo_()->revision;
     151                 :            : }
     152                 :            : 
     153                 :            : }
     154                 :            : 
     155                 :            : #undef XAPIAN_IN_XAPIAN_H
     156                 :            : 
     157                 :            : #endif /* XAPIAN_INCLUDED_XAPIAN_H */

Generated by: LCOV version 1.11