| database.h | | database.h | |
| | | | |
| skipping to change at line 110 | | skipping to change at line 110 | |
| | | | |
| /** Destroy this handle on the database. | | /** Destroy this handle on the database. | |
| * | | * | |
| * If there are no copies of this object remaining, the database(s) | | * If there are no copies of this object remaining, the database(s) | |
| * will be closed. | | * will be closed. | |
| */ | | */ | |
| virtual ~Database(); | | virtual ~Database(); | |
| | | | |
| /** Copying is allowed. The internals are reference counted, so | | /** Copying is allowed. The internals are reference counted, so | |
| * copying is cheap. | | * copying is cheap. | |
|
| | | * | |
| | | * @param other The object to copy. | |
| */ | | */ | |
| Database(const Database &other); | | Database(const Database &other); | |
| | | | |
| /** Assignment is allowed. The internals are reference counted, | | /** Assignment is allowed. The internals are reference counted, | |
| * so assignment is cheap. | | * so assignment is cheap. | |
|
| | | * | |
| | | * @param other The object to copy. | |
| */ | | */ | |
| void operator=(const Database &other); | | void operator=(const Database &other); | |
| | | | |
| /** Re-open the database. | | /** Re-open the database. | |
| * | | * | |
| * This re-opens the database(s) to the latest available version(s)
. | | * This re-opens the database(s) to the latest available version(s)
. | |
| * It can be used either to make sure the latest results are return
ed, | | * It can be used either to make sure the latest results are return
ed, | |
| * or to recover from a Xapian::DatabaseModifiedError. | | * or to recover from a Xapian::DatabaseModifiedError. | |
| * | | * | |
| * Calling reopen() on a database which has been closed (with @a | | * Calling reopen() on a database which has been closed (with @a | |
| | | | |
| skipping to change at line 166 | | skipping to change at line 170 | |
| * to just behave correctly. | | * to just behave correctly. | |
| */ | | */ | |
| virtual void close(); | | virtual void close(); | |
| | | | |
| /// Return a string describing this object. | | /// Return a string describing this object. | |
| virtual std::string get_description() const; | | virtual std::string get_description() const; | |
| | | | |
| /** An iterator pointing to the start of the postlist | | /** An iterator pointing to the start of the postlist | |
| * for a given term. | | * for a given term. | |
| * | | * | |
|
| * If the term name is the empty string, the iterator returned | | * @param tname The termname to iterate postings for. If th | |
| * will list all the documents in the database. Such an iterator | | e | |
| * will always return a WDF value of 1, since there is no obvious | | * term name is the empty string, the iterator | |
| * meaning for this quantity in this case. | | * returned will list all the documents in the | |
| | | * database. Such an iterator will always retu | |
| | | rn | |
| | | * a WDF value of 1, since there is no obvious | |
| | | * meaning for this quantity in this case. | |
| */ | | */ | |
| PostingIterator postlist_begin(const std::string &tname) const; | | PostingIterator postlist_begin(const std::string &tname) const; | |
| | | | |
| /** Corresponding end iterator to postlist_begin(). | | /** Corresponding end iterator to postlist_begin(). | |
| */ | | */ | |
| PostingIterator postlist_end(const std::string &) const { | | PostingIterator postlist_end(const std::string &) const { | |
| return PostingIterator(); | | return PostingIterator(); | |
| } | | } | |
| | | | |
| /** An iterator pointing to the start of the termlist | | /** An iterator pointing to the start of the termlist | |
| * for a given document. | | * for a given document. | |
|
| | | * | |
| | | * @param did The document id of the document to iterate terms for | |
| | | . | |
| */ | | */ | |
| TermIterator termlist_begin(Xapian::docid did) const; | | TermIterator termlist_begin(Xapian::docid did) const; | |
| | | | |
| /** Corresponding end iterator to termlist_begin(). | | /** Corresponding end iterator to termlist_begin(). | |
| */ | | */ | |
| TermIterator termlist_end(Xapian::docid) const { | | TermIterator termlist_end(Xapian::docid) const { | |
| return TermIterator(); | | return TermIterator(); | |
| } | | } | |
| | | | |
| /** Does this database have any positional information? */ | | /** Does this database have any positional information? */ | |
| | | | |
| skipping to change at line 247 | | skipping to change at line 255 | |
| Xapian::docid get_lastdocid() const; | | Xapian::docid get_lastdocid() const; | |
| | | | |
| /// Get the average length of the documents in the database. | | /// Get the average length of the documents in the database. | |
| Xapian::doclength get_avlength() const; | | Xapian::doclength get_avlength() const; | |
| | | | |
| /// Get the number of documents in the database indexed by a given t
erm. | | /// Get the number of documents in the database indexed by a given t
erm. | |
| Xapian::doccount get_termfreq(const std::string & tname) const; | | Xapian::doccount get_termfreq(const std::string & tname) const; | |
| | | | |
| /** Check if a given term exists in the database. | | /** Check if a given term exists in the database. | |
| * | | * | |
|
| * Return true if and only if the term exists in the database. | | * @param tname The term to test the existence of. | |
| * This is the same as (get_termfreq(tname) != 0), but will often b | | * | |
| e | | * @return true if and only if the term exists in the database. | |
| * more efficient. | | * This is the same as (get_termfreq(tname) != 0), but | |
| | | * will often be more efficient. | |
| */ | | */ | |
| bool term_exists(const std::string & tname) const; | | bool term_exists(const std::string & tname) const; | |
| | | | |
| /** Return the total number of occurrences of the given term. | | /** Return the total number of occurrences of the given term. | |
| * | | * | |
| * This is the sum of the number of occurrences of the term in each | | * This is the sum of the number of occurrences of the term in each | |
| * document it indexes: i.e., the sum of the within document | | * document it indexes: i.e., the sum of the within document | |
| * frequencies of the term. | | * frequencies of the term. | |
| * | | * | |
| * @param tname The term whose collection frequency is being | | * @param tname The term whose collection frequency is being | |
| | | | |
| skipping to change at line 508 | | skipping to change at line 518 | |
| * couldn't be acquired on the database. | | * couldn't be acquired on the database. | |
| */ | | */ | |
| WritableDatabase(const std::string &path, int action); | | WritableDatabase(const std::string &path, int action); | |
| | | | |
| /** @private @internal Create an WritableDatabase given its internal
s. | | /** @private @internal Create an WritableDatabase given its internal
s. | |
| */ | | */ | |
| explicit WritableDatabase(Database::Internal *internal); | | explicit WritableDatabase(Database::Internal *internal); | |
| | | | |
| /** Copying is allowed. The internals are reference counted, so | | /** Copying is allowed. The internals are reference counted, so | |
| * copying is cheap. | | * copying is cheap. | |
|
| | | * | |
| | | * @param other The object to copy. | |
| */ | | */ | |
| WritableDatabase(const WritableDatabase &other); | | WritableDatabase(const WritableDatabase &other); | |
| | | | |
| /** Assignment is allowed. The internals are reference counted, | | /** Assignment is allowed. The internals are reference counted, | |
| * so assignment is cheap. | | * so assignment is cheap. | |
| * | | * | |
| * Note that only an WritableDatabase may be assigned to an | | * Note that only an WritableDatabase may be assigned to an | |
| * WritableDatabase: an attempt to assign a Database is caught | | * WritableDatabase: an attempt to assign a Database is caught | |
| * at compile-time. | | * at compile-time. | |
|
| | | * | |
| | | * @param other The object to copy. | |
| */ | | */ | |
| void operator=(const WritableDatabase &other); | | void operator=(const WritableDatabase &other); | |
| | | | |
| /** Commit any pending modifications made to the database. | | /** Commit any pending modifications made to the database. | |
| * | | * | |
| * For efficiency reasons, when performing multiple updates to a | | * For efficiency reasons, when performing multiple updates to a | |
| * database it is best (indeed, almost essential) to make as many | | * database it is best (indeed, almost essential) to make as many | |
| * modifications as memory will permit in a single pass through | | * modifications as memory will permit in a single pass through | |
| * the database. To ensure this, Xapian batches up modifications. | | * the database. To ensure this, Xapian batches up modifications. | |
| * | | * | |
| | | | |
| skipping to change at line 549 | | skipping to change at line 563 | |
| * take much longer. | | * take much longer. | |
| * | | * | |
| * Note that commit() need not be called explicitly: it will be cal
led | | * Note that commit() need not be called explicitly: it will be cal
led | |
| * automatically when the database is closed, or when a sufficient | | * automatically when the database is closed, or when a sufficient | |
| * number of modifications have been made. By default, this is eve
ry | | * number of modifications have been made. By default, this is eve
ry | |
| * 10000 documents added, deleted, or modified. This value is rath
er | | * 10000 documents added, deleted, or modified. This value is rath
er | |
| * conservative, and if you have a machine with plenty of memory, | | * conservative, and if you have a machine with plenty of memory, | |
| * you can improve indexing throughput dramatically by setting | | * you can improve indexing throughput dramatically by setting | |
| * XAPIAN_FLUSH_THRESHOLD in the environment to a larger value. | | * XAPIAN_FLUSH_THRESHOLD in the environment to a larger value. | |
| * | | * | |
|
| | | * This method was new in Xapian 1.1.0 - in earlier versions it was | |
| | | * called flush(). | |
| | | * | |
| * @exception Xapian::DatabaseError will be thrown if a problem occ
urs | | * @exception Xapian::DatabaseError will be thrown if a problem occ
urs | |
| * while modifying the database. | | * while modifying the database. | |
| * | | * | |
| * @exception Xapian::DatabaseCorruptError will be thrown if the | | * @exception Xapian::DatabaseCorruptError will be thrown if the | |
| * database is in a corrupt state. | | * database is in a corrupt state. | |
| */ | | */ | |
| void commit(); | | void commit(); | |
| | | | |
| /** Pre-1.1.0 name for commit(). | | /** Pre-1.1.0 name for commit(). | |
| * | | * | |
| | | | |
| skipping to change at line 595 | | skipping to change at line 612 | |
| * ensure that each group is either applied or not applied, then | | * ensure that each group is either applied or not applied, then | |
| * you can prevent the automatic commit() before and after the | | * you can prevent the automatic commit() before and after the | |
| * transaction by starting the transaction with | | * transaction by starting the transaction with | |
| * begin_transaction(false). However, if cancel_transaction is | | * begin_transaction(false). However, if cancel_transaction is | |
| * called (or if commit_transaction isn't called before the | | * called (or if commit_transaction isn't called before the | |
| * WritableDatabase object is destroyed) then any changes which | | * WritableDatabase object is destroyed) then any changes which | |
| * were pending before the transaction began will also be discarded
. | | * were pending before the transaction began will also be discarded
. | |
| * | | * | |
| * Transactions aren't currently supported by the InMemory backend. | | * Transactions aren't currently supported by the InMemory backend. | |
| * | | * | |
|
| | | * @param flushed Is this a flushed transaction? By default | |
| | | * transactions are "flushed", which means that | |
| | | * committing a transaction will ensure those | |
| | | * changes are permanently written to the | |
| | | * database. By contrast, unflushed transactio | |
| | | ns | |
| | | * only ensure that changes within the transact | |
| | | ion | |
| | | * are either all applied or all aren't. | |
| | | * | |
| * @exception Xapian::UnimplementedError will be thrown if transact
ions | | * @exception Xapian::UnimplementedError will be thrown if transact
ions | |
| * are not available for this database type. | | * are not available for this database type. | |
| * | | * | |
| * @exception Xapian::InvalidOperationError will be thrown if this
is | | * @exception Xapian::InvalidOperationError will be thrown if this
is | |
| * called at an invalid time, such as when a transaction | | * called at an invalid time, such as when a transaction | |
| * is already in progress. | | * is already in progress. | |
| */ | | */ | |
| void begin_transaction(bool flushed=true); | | void begin_transaction(bool flushed=true); | |
| | | | |
| /** Complete the transaction currently in progress. | | /** Complete the transaction currently in progress. | |
| | | | |
| skipping to change at line 772 | | skipping to change at line 797 | |
| * with the specified document. If any documents are indexed by th
e | | * with the specified document. If any documents are indexed by th
e | |
| * term, the lowest document ID will be used for the document, | | * term, the lowest document ID will be used for the document, | |
| * otherwise a new document ID will be generated as for add_documen
t. | | * otherwise a new document ID will be generated as for add_documen
t. | |
| * | | * | |
| * One common use is to allow UIDs from another system to easily be | | * One common use is to allow UIDs from another system to easily be | |
| * mapped to terms in Xapian. Note that this method doesn't | | * mapped to terms in Xapian. Note that this method doesn't | |
| * automatically add unique_term as a term, so you'll need to call | | * automatically add unique_term as a term, so you'll need to call | |
| * document.add_term(unique_term) first when using replace_document
() | | * document.add_term(unique_term) first when using replace_document
() | |
| * in this way. | | * in this way. | |
| * | | * | |
|
| * Another possible use is to allow groups of documents to be marke | | | |
| d for | | | |
| * later deletion - for example, you could add a "deletion date" te | | | |
| rm | | | |
| * to documents at index time and use this method to easily and eff | | | |
| iciently | | | |
| * delete all documents due for deletion on a particular date. | | | |
| * | | | |
| * Note that changes to the database won't be immediately committed
to | | * Note that changes to the database won't be immediately committed
to | |
| * disk; see commit() for more details. | | * disk; see commit() for more details. | |
| * | | * | |
| * As with all database modification operations, the effect is | | * As with all database modification operations, the effect is | |
| * atomic: the document(s) will either be fully replaced, or the | | * atomic: the document(s) will either be fully replaced, or the | |
| * document(s) fail to be replaced and an exception is thrown | | * document(s) fail to be replaced and an exception is thrown | |
| * (possibly at a | | * (possibly at a | |
| * later time when commit() is called or the database is closed). | | * later time when commit() is called or the database is closed). | |
| * | | * | |
| * @param unique_term The "unique" term. | | * @param unique_term The "unique" term. | |
| | | | |
| skipping to change at line 823 | | skipping to change at line 843 | |
| * then the word is removed completely. | | * then the word is removed completely. | |
| * | | * | |
| * @param word The word to remove. | | * @param word The word to remove. | |
| * @param freqdec How much to decrease its frequency by (default 1
). | | * @param freqdec How much to decrease its frequency by (default 1
). | |
| */ | | */ | |
| void remove_spelling(const std::string & word, | | void remove_spelling(const std::string & word, | |
| Xapian::termcount freqdec = 1) const; | | Xapian::termcount freqdec = 1) const; | |
| | | | |
| /** Add a synonym for a term. | | /** Add a synonym for a term. | |
| * | | * | |
|
| * If @a synonym is already a synonym for @a term, then no action i | | * @param term The term to add a synonym for. | |
| s | | * @param synonym The synonym to add. If this is already a | |
| * taken. | | * synonym for @a term, then no action is taken | |
| | | . | |
| */ | | */ | |
| void add_synonym(const std::string & term, | | void add_synonym(const std::string & term, | |
| const std::string & synonym) const; | | const std::string & synonym) const; | |
| | | | |
| /** Remove a synonym for a term. | | /** Remove a synonym for a term. | |
| * | | * | |
|
| * If @a synonym isn't a synonym for @a term, then no action is tak | | * @param term The term to remove a synonym for. | |
| en. | | * @param synonym The synonym to remove. If this isn't curren | |
| | | tly | |
| | | * a synonym for @a term, then no action is tak | |
| | | en. | |
| */ | | */ | |
| void remove_synonym(const std::string & term, | | void remove_synonym(const std::string & term, | |
| const std::string & synonym) const; | | const std::string & synonym) const; | |
| | | | |
| /** Remove all synonyms for a term. | | /** Remove all synonyms for a term. | |
| * | | * | |
|
| * If @a term has no synonyms, no action is taken. | | * @param term The term to remove all synonyms for. If the | |
| | | * term has no synonyms, no action is taken. | |
| */ | | */ | |
| void clear_synonyms(const std::string & term) const; | | void clear_synonyms(const std::string & term) const; | |
| | | | |
| /** Set the user-specified metadata associated with a given key. | | /** Set the user-specified metadata associated with a given key. | |
| * | | * | |
| * This method sets the metadata value associated with a given key. | | * This method sets the metadata value associated with a given key. | |
| * If there is already a metadata value stored in the database with | | * If there is already a metadata value stored in the database with | |
| * the same key, the old value is replaced. If you want to delete
an | | * the same key, the old value is replaced. If you want to delete
an | |
| * existing item of metadata, just set its value to the empty strin
g. | | * existing item of metadata, just set its value to the empty strin
g. | |
| * | | * | |
| | | | |
End of changes. 13 change blocks. |
| 22 lines changed or deleted | | 48 lines changed or added | |
|
| error.h | | error.h | |
| /** @file error.h | | /** @file error.h | |
| * @brief Hierarchy of classes which Xapian can throw as exceptions. | | * @brief Hierarchy of classes which Xapian can throw as exceptions. | |
| */ | | */ | |
|
| /* Warning: This file is generated by /data/home/olly/tmp/xapian-svn-snapsh
ot/tags/1.2.7/xapian/xapian-core/generate-exceptions - do not modify direct
ly! */ | | /* Warning: This file is generated by /data/home/olly/tmp/xapian-svn-snapsh
ot/tags/1.2.8/xapian/xapian-core/generate-exceptions - do not modify direct
ly! */ | |
| /* Copyright (C) 2003,2004,2006,2007,2009 Olly Betts | | /* Copyright (C) 2003,2004,2006,2007,2009 Olly Betts | |
| * | | * | |
| * This program is free software; you can redistribute it and/or | | * This program is free software; you can redistribute it and/or | |
| * modify it under the terms of the GNU General Public License as | | * modify it under the terms of the GNU General Public License as | |
| * published by the Free Software Foundation; either version 2 of the | | * published by the Free Software Foundation; either version 2 of the | |
| * License, or (at your option) any later version. | | * License, or (at your option) any later version. | |
| * | | * | |
| * This program is distributed in the hope that it will be useful, | | * This program is distributed in the hope that it will be useful, | |
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| | | | |
| skipping to change at line 185 | | skipping to change at line 185 | |
| */ | | */ | |
| class XAPIAN_VISIBILITY_DEFAULT AssertionError : public LogicError { | | class XAPIAN_VISIBILITY_DEFAULT AssertionError : public LogicError { | |
| public: | | public: | |
| /** @private @internal | | /** @private @internal | |
| * @brief Private constructor for use by remote backend. | | * @brief Private constructor for use by remote backend. | |
| * | | * | |
| * @param error_string_ Optional string describing error. May be NU
LL. | | * @param error_string_ Optional string describing error. May be NU
LL. | |
| */ | | */ | |
| AssertionError(const std::string &msg_, const std::string &context_, co
nst char * error_string_) | | AssertionError(const std::string &msg_, const std::string &context_, co
nst char * error_string_) | |
| : LogicError(msg_, context_, "AssertionError", error_string_) {} | | : LogicError(msg_, context_, "AssertionError", error_string_) {} | |
|
| /** General purpose constructor which allows setting errno. */ | | /** General purpose constructor. | |
| | | * | |
| | | * @param msg_ Message giving details of the error, intende | |
| | | d | |
| | | * for human consumption. | |
| | | * @param context_ Optional context information for this error. | |
| | | * @param errno_ Optional errno value associated with this er | |
| | | ror. | |
| | | */ | |
| explicit AssertionError(const std::string &msg_, const std::string &con
text_ = std::string(), int errno_ = 0) | | explicit AssertionError(const std::string &msg_, const std::string &con
text_ = std::string(), int errno_ = 0) | |
| : LogicError(msg_, context_, "AssertionError", errno_) {} | | : LogicError(msg_, context_, "AssertionError", errno_) {} | |
|
| /** Construct from message and errno value. */ | | /** Construct from message and errno value. | |
| | | * | |
| | | * @param msg_ Message giving details of the error, intende | |
| | | d | |
| | | * for human consumption. | |
| | | * @param errno_ Optional errno value associated with this er | |
| | | ror. | |
| | | */ | |
| AssertionError(const std::string &msg_, int errno_) | | AssertionError(const std::string &msg_, int errno_) | |
| : LogicError(msg_, std::string(), "AssertionError", errno_) {} | | : LogicError(msg_, std::string(), "AssertionError", errno_) {} | |
| protected: | | protected: | |
| /** @private @internal | | /** @private @internal | |
| * @brief Constructor for use by constructors of derived classes. | | * @brief Constructor for use by constructors of derived classes. | |
| */ | | */ | |
| AssertionError(const std::string &msg_, const std::string &context_, co
nst char * type_, const char * error_string_) | | AssertionError(const std::string &msg_, const std::string &context_, co
nst char * type_, const char * error_string_) | |
| : LogicError(msg_, context_, type_, error_string_) {} | | : LogicError(msg_, context_, type_, error_string_) {} | |
| | | | |
| /** @private @internal | | /** @private @internal | |
| | | | |
| skipping to change at line 216 | | skipping to change at line 227 | |
| */ | | */ | |
| class XAPIAN_VISIBILITY_DEFAULT InvalidArgumentError : public LogicError { | | class XAPIAN_VISIBILITY_DEFAULT InvalidArgumentError : public LogicError { | |
| public: | | public: | |
| /** @private @internal | | /** @private @internal | |
| * @brief Private constructor for use by remote backend. | | * @brief Private constructor for use by remote backend. | |
| * | | * | |
| * @param error_string_ Optional string describing error. May be NU
LL. | | * @param error_string_ Optional string describing error. May be NU
LL. | |
| */ | | */ | |
| InvalidArgumentError(const std::string &msg_, const std::string &contex
t_, const char * error_string_) | | InvalidArgumentError(const std::string &msg_, const std::string &contex
t_, const char * error_string_) | |
| : LogicError(msg_, context_, "InvalidArgumentError", error_string_)
{} | | : LogicError(msg_, context_, "InvalidArgumentError", error_string_)
{} | |
|
| /** General purpose constructor which allows setting errno. */ | | /** General purpose constructor. | |
| | | * | |
| | | * @param msg_ Message giving details of the error, intende | |
| | | d | |
| | | * for human consumption. | |
| | | * @param context_ Optional context information for this error. | |
| | | * @param errno_ Optional errno value associated with this er | |
| | | ror. | |
| | | */ | |
| explicit InvalidArgumentError(const std::string &msg_, const std::strin
g &context_ = std::string(), int errno_ = 0) | | explicit InvalidArgumentError(const std::string &msg_, const std::strin
g &context_ = std::string(), int errno_ = 0) | |
| : LogicError(msg_, context_, "InvalidArgumentError", errno_) {} | | : LogicError(msg_, context_, "InvalidArgumentError", errno_) {} | |
|
| /** Construct from message and errno value. */ | | /** Construct from message and errno value. | |
| | | * | |
| | | * @param msg_ Message giving details of the error, intende | |
| | | d | |
| | | * for human consumption. | |
| | | * @param errno_ Optional errno value associated with this er | |
| | | ror. | |
| | | */ | |
| InvalidArgumentError(const std::string &msg_, int errno_) | | InvalidArgumentError(const std::string &msg_, int errno_) | |
| : LogicError(msg_, std::string(), "InvalidArgumentError", errno_) {} | | : LogicError(msg_, std::string(), "InvalidArgumentError", errno_) {} | |
| protected: | | protected: | |
| /** @private @internal | | /** @private @internal | |
| * @brief Constructor for use by constructors of derived classes. | | * @brief Constructor for use by constructors of derived classes. | |
| */ | | */ | |
| InvalidArgumentError(const std::string &msg_, const std::string &contex
t_, const char * type_, const char * error_string_) | | InvalidArgumentError(const std::string &msg_, const std::string &contex
t_, const char * type_, const char * error_string_) | |
| : LogicError(msg_, context_, type_, error_string_) {} | | : LogicError(msg_, context_, type_, error_string_) {} | |
| | | | |
| /** @private @internal | | /** @private @internal | |
| | | | |
| skipping to change at line 247 | | skipping to change at line 269 | |
| */ | | */ | |
| class XAPIAN_VISIBILITY_DEFAULT InvalidOperationError : public LogicError { | | class XAPIAN_VISIBILITY_DEFAULT InvalidOperationError : public LogicError { | |
| public: | | public: | |
| /** @private @internal | | /** @private @internal | |
| * @brief Private constructor for use by remote backend. | | * @brief Private constructor for use by remote backend. | |
| * | | * | |
| * @param error_string_ Optional string describing error. May be NU
LL. | | * @param error_string_ Optional string describing error. May be NU
LL. | |
| */ | | */ | |
| InvalidOperationError(const std::string &msg_, const std::string &conte
xt_, const char * error_string_) | | InvalidOperationError(const std::string &msg_, const std::string &conte
xt_, const char * error_string_) | |
| : LogicError(msg_, context_, "InvalidOperationError", error_string_)
{} | | : LogicError(msg_, context_, "InvalidOperationError", error_string_)
{} | |
|
| /** General purpose constructor which allows setting errno. */ | | /** General purpose constructor. | |
| | | * | |
| | | * @param msg_ Message giving details of the error, intende | |
| | | d | |
| | | * for human consumption. | |
| | | * @param context_ Optional context information for this error. | |
| | | * @param errno_ Optional errno value associated with this er | |
| | | ror. | |
| | | */ | |
| explicit InvalidOperationError(const std::string &msg_, const std::stri
ng &context_ = std::string(), int errno_ = 0) | | explicit InvalidOperationError(const std::string &msg_, const std::stri
ng &context_ = std::string(), int errno_ = 0) | |
| : LogicError(msg_, context_, "InvalidOperationError", errno_) {} | | : LogicError(msg_, context_, "InvalidOperationError", errno_) {} | |
|
| /** Construct from message and errno value. */ | | /** Construct from message and errno value. | |
| | | * | |
| | | * @param msg_ Message giving details of the error, intende | |
| | | d | |
| | | * for human consumption. | |
| | | * @param errno_ Optional errno value associated with this er | |
| | | ror. | |
| | | */ | |
| InvalidOperationError(const std::string &msg_, int errno_) | | InvalidOperationError(const std::string &msg_, int errno_) | |
| : LogicError(msg_, std::string(), "InvalidOperationError", errno_) {
} | | : LogicError(msg_, std::string(), "InvalidOperationError", errno_) {
} | |
| protected: | | protected: | |
| /** @private @internal | | /** @private @internal | |
| * @brief Constructor for use by constructors of derived classes. | | * @brief Constructor for use by constructors of derived classes. | |
| */ | | */ | |
| InvalidOperationError(const std::string &msg_, const std::string &conte
xt_, const char * type_, const char * error_string_) | | InvalidOperationError(const std::string &msg_, const std::string &conte
xt_, const char * type_, const char * error_string_) | |
| : LogicError(msg_, context_, type_, error_string_) {} | | : LogicError(msg_, context_, type_, error_string_) {} | |
| | | | |
| /** @private @internal | | /** @private @internal | |
| | | | |
| skipping to change at line 277 | | skipping to change at line 310 | |
| /** UnimplementedError indicates an attempt to use an unimplemented feature
. */ | | /** UnimplementedError indicates an attempt to use an unimplemented feature
. */ | |
| class XAPIAN_VISIBILITY_DEFAULT UnimplementedError : public LogicError { | | class XAPIAN_VISIBILITY_DEFAULT UnimplementedError : public LogicError { | |
| public: | | public: | |
| /** @private @internal | | /** @private @internal | |
| * @brief Private constructor for use by remote backend. | | * @brief Private constructor for use by remote backend. | |
| * | | * | |
| * @param error_string_ Optional string describing error. May be NU
LL. | | * @param error_string_ Optional string describing error. May be NU
LL. | |
| */ | | */ | |
| UnimplementedError(const std::string &msg_, const std::string &context_
, const char * error_string_) | | UnimplementedError(const std::string &msg_, const std::string &context_
, const char * error_string_) | |
| : LogicError(msg_, context_, "UnimplementedError", error_string_) {} | | : LogicError(msg_, context_, "UnimplementedError", error_string_) {} | |
|
| /** General purpose constructor which allows setting errno. */ | | /** General purpose constructor. | |
| | | * | |
| | | * @param msg_ Message giving details of the error, intende | |
| | | d | |
| | | * for human consumption. | |
| | | * @param context_ Optional context information for this error. | |
| | | * @param errno_ Optional errno value associated with this er | |
| | | ror. | |
| | | */ | |
| explicit UnimplementedError(const std::string &msg_, const std::string
&context_ = std::string(), int errno_ = 0) | | explicit UnimplementedError(const std::string &msg_, const std::string
&context_ = std::string(), int errno_ = 0) | |
| : LogicError(msg_, context_, "UnimplementedError", errno_) {} | | : LogicError(msg_, context_, "UnimplementedError", errno_) {} | |
|
| /** Construct from message and errno value. */ | | /** Construct from message and errno value. | |
| | | * | |
| | | * @param msg_ Message giving details of the error, intende | |
| | | d | |
| | | * for human consumption. | |
| | | * @param errno_ Optional errno value associated with this er | |
| | | ror. | |
| | | */ | |
| UnimplementedError(const std::string &msg_, int errno_) | | UnimplementedError(const std::string &msg_, int errno_) | |
| : LogicError(msg_, std::string(), "UnimplementedError", errno_) {} | | : LogicError(msg_, std::string(), "UnimplementedError", errno_) {} | |
| protected: | | protected: | |
| /** @private @internal | | /** @private @internal | |
| * @brief Constructor for use by constructors of derived classes. | | * @brief Constructor for use by constructors of derived classes. | |
| */ | | */ | |
| UnimplementedError(const std::string &msg_, const std::string &context_
, const char * type_, const char * error_string_) | | UnimplementedError(const std::string &msg_, const std::string &context_
, const char * type_, const char * error_string_) | |
| : LogicError(msg_, context_, type_, error_string_) {} | | : LogicError(msg_, context_, type_, error_string_) {} | |
| | | | |
| /** @private @internal | | /** @private @internal | |
| | | | |
| skipping to change at line 307 | | skipping to change at line 351 | |
| /** DatabaseError indicates some sort of database related error. */ | | /** DatabaseError indicates some sort of database related error. */ | |
| class XAPIAN_VISIBILITY_DEFAULT DatabaseError : public RuntimeError { | | class XAPIAN_VISIBILITY_DEFAULT DatabaseError : public RuntimeError { | |
| public: | | public: | |
| /** @private @internal | | /** @private @internal | |
| * @brief Private constructor for use by remote backend. | | * @brief Private constructor for use by remote backend. | |
| * | | * | |
| * @param error_string_ Optional string describing error. May be NU
LL. | | * @param error_string_ Optional string describing error. May be NU
LL. | |
| */ | | */ | |
| DatabaseError(const std::string &msg_, const std::string &context_, con
st char * error_string_) | | DatabaseError(const std::string &msg_, const std::string &context_, con
st char * error_string_) | |
| : RuntimeError(msg_, context_, "DatabaseError", error_string_) {} | | : RuntimeError(msg_, context_, "DatabaseError", error_string_) {} | |
|
| /** General purpose constructor which allows setting errno. */ | | /** General purpose constructor. | |
| | | * | |
| | | * @param msg_ Message giving details of the error, intende | |
| | | d | |
| | | * for human consumption. | |
| | | * @param context_ Optional context information for this error. | |
| | | * @param errno_ Optional errno value associated with this er | |
| | | ror. | |
| | | */ | |
| explicit DatabaseError(const std::string &msg_, const std::string &cont
ext_ = std::string(), int errno_ = 0) | | explicit DatabaseError(const std::string &msg_, const std::string &cont
ext_ = std::string(), int errno_ = 0) | |
| : RuntimeError(msg_, context_, "DatabaseError", errno_) {} | | : RuntimeError(msg_, context_, "DatabaseError", errno_) {} | |
|
| /** Construct from message and errno value. */ | | /** Construct from message and errno value. | |
| | | * | |
| | | * @param msg_ Message giving details of the error, intende | |
| | | d | |
| | | * for human consumption. | |
| | | * @param errno_ Optional errno value associated with this er | |
| | | ror. | |
| | | */ | |
| DatabaseError(const std::string &msg_, int errno_) | | DatabaseError(const std::string &msg_, int errno_) | |
| : RuntimeError(msg_, std::string(), "DatabaseError", errno_) {} | | : RuntimeError(msg_, std::string(), "DatabaseError", errno_) {} | |
| protected: | | protected: | |
| /** @private @internal | | /** @private @internal | |
| * @brief Constructor for use by constructors of derived classes. | | * @brief Constructor for use by constructors of derived classes. | |
| */ | | */ | |
| DatabaseError(const std::string &msg_, const std::string &context_, con
st char * type_, const char * error_string_) | | DatabaseError(const std::string &msg_, const std::string &context_, con
st char * type_, const char * error_string_) | |
| : RuntimeError(msg_, context_, type_, error_string_) {} | | : RuntimeError(msg_, context_, type_, error_string_) {} | |
| | | | |
| /** @private @internal | | /** @private @internal | |
| | | | |
| skipping to change at line 337 | | skipping to change at line 392 | |
| /** DatabaseCorruptError indicates database corruption was detected. */ | | /** DatabaseCorruptError indicates database corruption was detected. */ | |
| class XAPIAN_VISIBILITY_DEFAULT DatabaseCorruptError : public DatabaseError
{ | | class XAPIAN_VISIBILITY_DEFAULT DatabaseCorruptError : public DatabaseError
{ | |
| public: | | public: | |
| /** @private @internal | | /** @private @internal | |
| * @brief Private constructor for use by remote backend. | | * @brief Private constructor for use by remote backend. | |
| * | | * | |
| * @param error_string_ Optional string describing error. May be NU
LL. | | * @param error_string_ Optional string describing error. May be NU
LL. | |
| */ | | */ | |
| DatabaseCorruptError(const std::string &msg_, const std::string &contex
t_, const char * error_string_) | | DatabaseCorruptError(const std::string &msg_, const std::string &contex
t_, const char * error_string_) | |
| : DatabaseError(msg_, context_, "DatabaseCorruptError", error_string
_) {} | | : DatabaseError(msg_, context_, "DatabaseCorruptError", error_string
_) {} | |
|
| /** General purpose constructor which allows setting errno. */ | | /** General purpose constructor. | |
| | | * | |
| | | * @param msg_ Message giving details of the error, intende | |
| | | d | |
| | | * for human consumption. | |
| | | * @param context_ Optional context information for this error. | |
| | | * @param errno_ Optional errno value associated with this er | |
| | | ror. | |
| | | */ | |
| explicit DatabaseCorruptError(const std::string &msg_, const std::strin
g &context_ = std::string(), int errno_ = 0) | | explicit DatabaseCorruptError(const std::string &msg_, const std::strin
g &context_ = std::string(), int errno_ = 0) | |
| : DatabaseError(msg_, context_, "DatabaseCorruptError", errno_) {} | | : DatabaseError(msg_, context_, "DatabaseCorruptError", errno_) {} | |
|
| /** Construct from message and errno value. */ | | /** Construct from message and errno value. | |
| | | * | |
| | | * @param msg_ Message giving details of the error, intende | |
| | | d | |
| | | * for human consumption. | |
| | | * @param errno_ Optional errno value associated with this er | |
| | | ror. | |
| | | */ | |
| DatabaseCorruptError(const std::string &msg_, int errno_) | | DatabaseCorruptError(const std::string &msg_, int errno_) | |
| : DatabaseError(msg_, std::string(), "DatabaseCorruptError", errno_)
{} | | : DatabaseError(msg_, std::string(), "DatabaseCorruptError", errno_)
{} | |
| protected: | | protected: | |
| /** @private @internal | | /** @private @internal | |
| * @brief Constructor for use by constructors of derived classes. | | * @brief Constructor for use by constructors of derived classes. | |
| */ | | */ | |
| DatabaseCorruptError(const std::string &msg_, const std::string &contex
t_, const char * type_, const char * error_string_) | | DatabaseCorruptError(const std::string &msg_, const std::string &contex
t_, const char * type_, const char * error_string_) | |
| : DatabaseError(msg_, context_, type_, error_string_) {} | | : DatabaseError(msg_, context_, type_, error_string_) {} | |
| | | | |
| /** @private @internal | | /** @private @internal | |
| | | | |
| skipping to change at line 367 | | skipping to change at line 433 | |
| /** DatabaseCreateError indicates a failure to create a database. */ | | /** DatabaseCreateError indicates a failure to create a database. */ | |
| class XAPIAN_VISIBILITY_DEFAULT DatabaseCreateError : public DatabaseError
{ | | class XAPIAN_VISIBILITY_DEFAULT DatabaseCreateError : public DatabaseError
{ | |
| public: | | public: | |
| /** @private @internal | | /** @private @internal | |
| * @brief Private constructor for use by remote backend. | | * @brief Private constructor for use by remote backend. | |
| * | | * | |
| * @param error_string_ Optional string describing error. May be NU
LL. | | * @param error_string_ Optional string describing error. May be NU
LL. | |
| */ | | */ | |
| DatabaseCreateError(const std::string &msg_, const std::string &context
_, const char * error_string_) | | DatabaseCreateError(const std::string &msg_, const std::string &context
_, const char * error_string_) | |
| : DatabaseError(msg_, context_, "DatabaseCreateError", error_string_
) {} | | : DatabaseError(msg_, context_, "DatabaseCreateError", error_string_
) {} | |
|
| /** General purpose constructor which allows setting errno. */ | | /** General purpose constructor. | |
| | | * | |
| | | * @param msg_ Message giving details of the error, intende | |
| | | d | |
| | | * for human consumption. | |
| | | * @param context_ Optional context information for this error. | |
| | | * @param errno_ Optional errno value associated with this er | |
| | | ror. | |
| | | */ | |
| explicit DatabaseCreateError(const std::string &msg_, const std::string
&context_ = std::string(), int errno_ = 0) | | explicit DatabaseCreateError(const std::string &msg_, const std::string
&context_ = std::string(), int errno_ = 0) | |
| : DatabaseError(msg_, context_, "DatabaseCreateError", errno_) {} | | : DatabaseError(msg_, context_, "DatabaseCreateError", errno_) {} | |
|
| /** Construct from message and errno value. */ | | /** Construct from message and errno value. | |
| | | * | |
| | | * @param msg_ Message giving details of the error, intende | |
| | | d | |
| | | * for human consumption. | |
| | | * @param errno_ Optional errno value associated with this er | |
| | | ror. | |
| | | */ | |
| DatabaseCreateError(const std::string &msg_, int errno_) | | DatabaseCreateError(const std::string &msg_, int errno_) | |
| : DatabaseError(msg_, std::string(), "DatabaseCreateError", errno_)
{} | | : DatabaseError(msg_, std::string(), "DatabaseCreateError", errno_)
{} | |
| protected: | | protected: | |
| /** @private @internal | | /** @private @internal | |
| * @brief Constructor for use by constructors of derived classes. | | * @brief Constructor for use by constructors of derived classes. | |
| */ | | */ | |
| DatabaseCreateError(const std::string &msg_, const std::string &context
_, const char * type_, const char * error_string_) | | DatabaseCreateError(const std::string &msg_, const std::string &context
_, const char * type_, const char * error_string_) | |
| : DatabaseError(msg_, context_, type_, error_string_) {} | | : DatabaseError(msg_, context_, type_, error_string_) {} | |
| | | | |
| /** @private @internal | | /** @private @internal | |
| | | | |
| skipping to change at line 397 | | skipping to change at line 474 | |
| /** DatabaseLockError indicates failure to lock a database. */ | | /** DatabaseLockError indicates failure to lock a database. */ | |
| class XAPIAN_VISIBILITY_DEFAULT DatabaseLockError : public DatabaseError { | | class XAPIAN_VISIBILITY_DEFAULT DatabaseLockError : public DatabaseError { | |
| public: | | public: | |
| /** @private @internal | | /** @private @internal | |
| * @brief Private constructor for use by remote backend. | | * @brief Private constructor for use by remote backend. | |
| * | | * | |
| * @param error_string_ Optional string describing error. May be NU
LL. | | * @param error_string_ Optional string describing error. May be NU
LL. | |
| */ | | */ | |
| DatabaseLockError(const std::string &msg_, const std::string &context_,
const char * error_string_) | | DatabaseLockError(const std::string &msg_, const std::string &context_,
const char * error_string_) | |
| : DatabaseError(msg_, context_, "DatabaseLockError", error_string_)
{} | | : DatabaseError(msg_, context_, "DatabaseLockError", error_string_)
{} | |
|
| /** General purpose constructor which allows setting errno. */ | | /** General purpose constructor. | |
| | | * | |
| | | * @param msg_ Message giving details of the error, intende | |
| | | d | |
| | | * for human consumption. | |
| | | * @param context_ Optional context information for this error. | |
| | | * @param errno_ Optional errno value associated with this er | |
| | | ror. | |
| | | */ | |
| explicit DatabaseLockError(const std::string &msg_, const std::string &
context_ = std::string(), int errno_ = 0) | | explicit DatabaseLockError(const std::string &msg_, const std::string &
context_ = std::string(), int errno_ = 0) | |
| : DatabaseError(msg_, context_, "DatabaseLockError", errno_) {} | | : DatabaseError(msg_, context_, "DatabaseLockError", errno_) {} | |
|
| /** Construct from message and errno value. */ | | /** Construct from message and errno value. | |
| | | * | |
| | | * @param msg_ Message giving details of the error, intende | |
| | | d | |
| | | * for human consumption. | |
| | | * @param errno_ Optional errno value associated with this er | |
| | | ror. | |
| | | */ | |
| DatabaseLockError(const std::string &msg_, int errno_) | | DatabaseLockError(const std::string &msg_, int errno_) | |
| : DatabaseError(msg_, std::string(), "DatabaseLockError", errno_) {} | | : DatabaseError(msg_, std::string(), "DatabaseLockError", errno_) {} | |
| protected: | | protected: | |
| /** @private @internal | | /** @private @internal | |
| * @brief Constructor for use by constructors of derived classes. | | * @brief Constructor for use by constructors of derived classes. | |
| */ | | */ | |
| DatabaseLockError(const std::string &msg_, const std::string &context_,
const char * type_, const char * error_string_) | | DatabaseLockError(const std::string &msg_, const std::string &context_,
const char * type_, const char * error_string_) | |
| : DatabaseError(msg_, context_, type_, error_string_) {} | | : DatabaseError(msg_, context_, type_, error_string_) {} | |
| | | | |
| /** @private @internal | | /** @private @internal | |
| | | | |
| skipping to change at line 432 | | skipping to change at line 520 | |
| */ | | */ | |
| class XAPIAN_VISIBILITY_DEFAULT DatabaseModifiedError : public DatabaseErro
r { | | class XAPIAN_VISIBILITY_DEFAULT DatabaseModifiedError : public DatabaseErro
r { | |
| public: | | public: | |
| /** @private @internal | | /** @private @internal | |
| * @brief Private constructor for use by remote backend. | | * @brief Private constructor for use by remote backend. | |
| * | | * | |
| * @param error_string_ Optional string describing error. May be NU
LL. | | * @param error_string_ Optional string describing error. May be NU
LL. | |
| */ | | */ | |
| DatabaseModifiedError(const std::string &msg_, const std::string &conte
xt_, const char * error_string_) | | DatabaseModifiedError(const std::string &msg_, const std::string &conte
xt_, const char * error_string_) | |
| : DatabaseError(msg_, context_, "DatabaseModifiedError", error_strin
g_) {} | | : DatabaseError(msg_, context_, "DatabaseModifiedError", error_strin
g_) {} | |
|
| /** General purpose constructor which allows setting errno. */ | | /** General purpose constructor. | |
| | | * | |
| | | * @param msg_ Message giving details of the error, intende | |
| | | d | |
| | | * for human consumption. | |
| | | * @param context_ Optional context information for this error. | |
| | | * @param errno_ Optional errno value associated with this er | |
| | | ror. | |
| | | */ | |
| explicit DatabaseModifiedError(const std::string &msg_, const std::stri
ng &context_ = std::string(), int errno_ = 0) | | explicit DatabaseModifiedError(const std::string &msg_, const std::stri
ng &context_ = std::string(), int errno_ = 0) | |
| : DatabaseError(msg_, context_, "DatabaseModifiedError", errno_) {} | | : DatabaseError(msg_, context_, "DatabaseModifiedError", errno_) {} | |
|
| /** Construct from message and errno value. */ | | /** Construct from message and errno value. | |
| | | * | |
| | | * @param msg_ Message giving details of the error, intende | |
| | | d | |
| | | * for human consumption. | |
| | | * @param errno_ Optional errno value associated with this er | |
| | | ror. | |
| | | */ | |
| DatabaseModifiedError(const std::string &msg_, int errno_) | | DatabaseModifiedError(const std::string &msg_, int errno_) | |
| : DatabaseError(msg_, std::string(), "DatabaseModifiedError", errno_
) {} | | : DatabaseError(msg_, std::string(), "DatabaseModifiedError", errno_
) {} | |
| protected: | | protected: | |
| /** @private @internal | | /** @private @internal | |
| * @brief Constructor for use by constructors of derived classes. | | * @brief Constructor for use by constructors of derived classes. | |
| */ | | */ | |
| DatabaseModifiedError(const std::string &msg_, const std::string &conte
xt_, const char * type_, const char * error_string_) | | DatabaseModifiedError(const std::string &msg_, const std::string &conte
xt_, const char * type_, const char * error_string_) | |
| : DatabaseError(msg_, context_, type_, error_string_) {} | | : DatabaseError(msg_, context_, type_, error_string_) {} | |
| | | | |
| /** @private @internal | | /** @private @internal | |
| | | | |
| skipping to change at line 462 | | skipping to change at line 561 | |
| /** DatabaseOpeningError indicates failure to open a database. */ | | /** DatabaseOpeningError indicates failure to open a database. */ | |
| class XAPIAN_VISIBILITY_DEFAULT DatabaseOpeningError : public DatabaseError
{ | | class XAPIAN_VISIBILITY_DEFAULT DatabaseOpeningError : public DatabaseError
{ | |
| public: | | public: | |
| /** @private @internal | | /** @private @internal | |
| * @brief Private constructor for use by remote backend. | | * @brief Private constructor for use by remote backend. | |
| * | | * | |
| * @param error_string_ Optional string describing error. May be NU
LL. | | * @param error_string_ Optional string describing error. May be NU
LL. | |
| */ | | */ | |
| DatabaseOpeningError(const std::string &msg_, const std::string &contex
t_, const char * error_string_) | | DatabaseOpeningError(const std::string &msg_, const std::string &contex
t_, const char * error_string_) | |
| : DatabaseError(msg_, context_, "DatabaseOpeningError", error_string
_) {} | | : DatabaseError(msg_, context_, "DatabaseOpeningError", error_string
_) {} | |
|
| /** General purpose constructor which allows setting errno. */ | | /** General purpose constructor. | |
| | | * | |
| | | * @param msg_ Message giving details of the error, intende | |
| | | d | |
| | | * for human consumption. | |
| | | * @param context_ Optional context information for this error. | |
| | | * @param errno_ Optional errno value associated with this er | |
| | | ror. | |
| | | */ | |
| explicit DatabaseOpeningError(const std::string &msg_, const std::strin
g &context_ = std::string(), int errno_ = 0) | | explicit DatabaseOpeningError(const std::string &msg_, const std::strin
g &context_ = std::string(), int errno_ = 0) | |
| : DatabaseError(msg_, context_, "DatabaseOpeningError", errno_) {} | | : DatabaseError(msg_, context_, "DatabaseOpeningError", errno_) {} | |
|
| /** Construct from message and errno value. */ | | /** Construct from message and errno value. | |
| | | * | |
| | | * @param msg_ Message giving details of the error, intende | |
| | | d | |
| | | * for human consumption. | |
| | | * @param errno_ Optional errno value associated with this er | |
| | | ror. | |
| | | */ | |
| DatabaseOpeningError(const std::string &msg_, int errno_) | | DatabaseOpeningError(const std::string &msg_, int errno_) | |
| : DatabaseError(msg_, std::string(), "DatabaseOpeningError", errno_)
{} | | : DatabaseError(msg_, std::string(), "DatabaseOpeningError", errno_)
{} | |
| protected: | | protected: | |
| /** @private @internal | | /** @private @internal | |
| * @brief Constructor for use by constructors of derived classes. | | * @brief Constructor for use by constructors of derived classes. | |
| */ | | */ | |
| DatabaseOpeningError(const std::string &msg_, const std::string &contex
t_, const char * type_, const char * error_string_) | | DatabaseOpeningError(const std::string &msg_, const std::string &contex
t_, const char * type_, const char * error_string_) | |
| : DatabaseError(msg_, context_, type_, error_string_) {} | | : DatabaseError(msg_, context_, type_, error_string_) {} | |
| | | | |
| /** @private @internal | | /** @private @internal | |
| | | | |
| skipping to change at line 502 | | skipping to change at line 612 | |
| */ | | */ | |
| class XAPIAN_VISIBILITY_DEFAULT DatabaseVersionError : public DatabaseOpeni
ngError { | | class XAPIAN_VISIBILITY_DEFAULT DatabaseVersionError : public DatabaseOpeni
ngError { | |
| public: | | public: | |
| /** @private @internal | | /** @private @internal | |
| * @brief Private constructor for use by remote backend. | | * @brief Private constructor for use by remote backend. | |
| * | | * | |
| * @param error_string_ Optional string describing error. May be NU
LL. | | * @param error_string_ Optional string describing error. May be NU
LL. | |
| */ | | */ | |
| DatabaseVersionError(const std::string &msg_, const std::string &contex
t_, const char * error_string_) | | DatabaseVersionError(const std::string &msg_, const std::string &contex
t_, const char * error_string_) | |
| : DatabaseOpeningError(msg_, context_, "DatabaseVersionError", error
_string_) {} | | : DatabaseOpeningError(msg_, context_, "DatabaseVersionError", error
_string_) {} | |
|
| /** General purpose constructor which allows setting errno. */ | | /** General purpose constructor. | |
| | | * | |
| | | * @param msg_ Message giving details of the error, intende | |
| | | d | |
| | | * for human consumption. | |
| | | * @param context_ Optional context information for this error. | |
| | | * @param errno_ Optional errno value associated with this er | |
| | | ror. | |
| | | */ | |
| explicit DatabaseVersionError(const std::string &msg_, const std::strin
g &context_ = std::string(), int errno_ = 0) | | explicit DatabaseVersionError(const std::string &msg_, const std::strin
g &context_ = std::string(), int errno_ = 0) | |
| : DatabaseOpeningError(msg_, context_, "DatabaseVersionError", errno
_) {} | | : DatabaseOpeningError(msg_, context_, "DatabaseVersionError", errno
_) {} | |
|
| /** Construct from message and errno value. */ | | /** Construct from message and errno value. | |
| | | * | |
| | | * @param msg_ Message giving details of the error, intende | |
| | | d | |
| | | * for human consumption. | |
| | | * @param errno_ Optional errno value associated with this er | |
| | | ror. | |
| | | */ | |
| DatabaseVersionError(const std::string &msg_, int errno_) | | DatabaseVersionError(const std::string &msg_, int errno_) | |
| : DatabaseOpeningError(msg_, std::string(), "DatabaseVersionError",
errno_) {} | | : DatabaseOpeningError(msg_, std::string(), "DatabaseVersionError",
errno_) {} | |
| protected: | | protected: | |
| /** @private @internal | | /** @private @internal | |
| * @brief Constructor for use by constructors of derived classes. | | * @brief Constructor for use by constructors of derived classes. | |
| */ | | */ | |
| DatabaseVersionError(const std::string &msg_, const std::string &contex
t_, const char * type_, const char * error_string_) | | DatabaseVersionError(const std::string &msg_, const std::string &contex
t_, const char * type_, const char * error_string_) | |
| : DatabaseOpeningError(msg_, context_, type_, error_string_) {} | | : DatabaseOpeningError(msg_, context_, type_, error_string_) {} | |
| | | | |
| /** @private @internal | | /** @private @internal | |
| | | | |
| skipping to change at line 532 | | skipping to change at line 653 | |
| /** Indicates an attempt to access a document not present in the database.
*/ | | /** Indicates an attempt to access a document not present in the database.
*/ | |
| class XAPIAN_VISIBILITY_DEFAULT DocNotFoundError : public RuntimeError { | | class XAPIAN_VISIBILITY_DEFAULT DocNotFoundError : public RuntimeError { | |
| public: | | public: | |
| /** @private @internal | | /** @private @internal | |
| * @brief Private constructor for use by remote backend. | | * @brief Private constructor for use by remote backend. | |
| * | | * | |
| * @param error_string_ Optional string describing error. May be NU
LL. | | * @param error_string_ Optional string describing error. May be NU
LL. | |
| */ | | */ | |
| DocNotFoundError(const std::string &msg_, const std::string &context_,
const char * error_string_) | | DocNotFoundError(const std::string &msg_, const std::string &context_,
const char * error_string_) | |
| : RuntimeError(msg_, context_, "DocNotFoundError", error_string_) {} | | : RuntimeError(msg_, context_, "DocNotFoundError", error_string_) {} | |
|
| /** General purpose constructor which allows setting errno. */ | | /** General purpose constructor. | |
| | | * | |
| | | * @param msg_ Message giving details of the error, intende | |
| | | d | |
| | | * for human consumption. | |
| | | * @param context_ Optional context information for this error. | |
| | | * @param errno_ Optional errno value associated with this er | |
| | | ror. | |
| | | */ | |
| explicit DocNotFoundError(const std::string &msg_, const std::string &c
ontext_ = std::string(), int errno_ = 0) | | explicit DocNotFoundError(const std::string &msg_, const std::string &c
ontext_ = std::string(), int errno_ = 0) | |
| : RuntimeError(msg_, context_, "DocNotFoundError", errno_) {} | | : RuntimeError(msg_, context_, "DocNotFoundError", errno_) {} | |
|
| /** Construct from message and errno value. */ | | /** Construct from message and errno value. | |
| | | * | |
| | | * @param msg_ Message giving details of the error, intende | |
| | | d | |
| | | * for human consumption. | |
| | | * @param errno_ Optional errno value associated with this er | |
| | | ror. | |
| | | */ | |
| DocNotFoundError(const std::string &msg_, int errno_) | | DocNotFoundError(const std::string &msg_, int errno_) | |
| : RuntimeError(msg_, std::string(), "DocNotFoundError", errno_) {} | | : RuntimeError(msg_, std::string(), "DocNotFoundError", errno_) {} | |
| protected: | | protected: | |
| /** @private @internal | | /** @private @internal | |
| * @brief Constructor for use by constructors of derived classes. | | * @brief Constructor for use by constructors of derived classes. | |
| */ | | */ | |
| DocNotFoundError(const std::string &msg_, const std::string &context_,
const char * type_, const char * error_string_) | | DocNotFoundError(const std::string &msg_, const std::string &context_,
const char * type_, const char * error_string_) | |
| : RuntimeError(msg_, context_, type_, error_string_) {} | | : RuntimeError(msg_, context_, type_, error_string_) {} | |
| | | | |
| /** @private @internal | | /** @private @internal | |
| | | | |
| skipping to change at line 566 | | skipping to change at line 698 | |
| */ | | */ | |
| class XAPIAN_VISIBILITY_DEFAULT FeatureUnavailableError : public RuntimeErr
or { | | class XAPIAN_VISIBILITY_DEFAULT FeatureUnavailableError : public RuntimeErr
or { | |
| public: | | public: | |
| /** @private @internal | | /** @private @internal | |
| * @brief Private constructor for use by remote backend. | | * @brief Private constructor for use by remote backend. | |
| * | | * | |
| * @param error_string_ Optional string describing error. May be NU
LL. | | * @param error_string_ Optional string describing error. May be NU
LL. | |
| */ | | */ | |
| FeatureUnavailableError(const std::string &msg_, const std::string &con
text_, const char * error_string_) | | FeatureUnavailableError(const std::string &msg_, const std::string &con
text_, const char * error_string_) | |
| : RuntimeError(msg_, context_, "FeatureUnavailableError", error_stri
ng_) {} | | : RuntimeError(msg_, context_, "FeatureUnavailableError", error_stri
ng_) {} | |
|
| /** General purpose constructor which allows setting errno. */ | | /** General purpose constructor. | |
| | | * | |
| | | * @param msg_ Message giving details of the error, intende | |
| | | d | |
| | | * for human consumption. | |
| | | * @param context_ Optional context information for this error. | |
| | | * @param errno_ Optional errno value associated with this er | |
| | | ror. | |
| | | */ | |
| explicit FeatureUnavailableError(const std::string &msg_, const std::st
ring &context_ = std::string(), int errno_ = 0) | | explicit FeatureUnavailableError(const std::string &msg_, const std::st
ring &context_ = std::string(), int errno_ = 0) | |
| : RuntimeError(msg_, context_, "FeatureUnavailableError", errno_) {} | | : RuntimeError(msg_, context_, "FeatureUnavailableError", errno_) {} | |
|
| /** Construct from message and errno value. */ | | /** Construct from message and errno value. | |
| | | * | |
| | | * @param msg_ Message giving details of the error, intende | |
| | | d | |
| | | * for human consumption. | |
| | | * @param errno_ Optional errno value associated with this er | |
| | | ror. | |
| | | */ | |
| FeatureUnavailableError(const std::string &msg_, int errno_) | | FeatureUnavailableError(const std::string &msg_, int errno_) | |
| : RuntimeError(msg_, std::string(), "FeatureUnavailableError", errno
_) {} | | : RuntimeError(msg_, std::string(), "FeatureUnavailableError", errno
_) {} | |
| protected: | | protected: | |
| /** @private @internal | | /** @private @internal | |
| * @brief Constructor for use by constructors of derived classes. | | * @brief Constructor for use by constructors of derived classes. | |
| */ | | */ | |
| FeatureUnavailableError(const std::string &msg_, const std::string &con
text_, const char * type_, const char * error_string_) | | FeatureUnavailableError(const std::string &msg_, const std::string &con
text_, const char * type_, const char * error_string_) | |
| : RuntimeError(msg_, context_, type_, error_string_) {} | | : RuntimeError(msg_, context_, type_, error_string_) {} | |
| | | | |
| /** @private @internal | | /** @private @internal | |
| | | | |
| skipping to change at line 596 | | skipping to change at line 739 | |
| /** InternalError indicates a runtime problem of some sort. */ | | /** InternalError indicates a runtime problem of some sort. */ | |
| class XAPIAN_VISIBILITY_DEFAULT InternalError : public RuntimeError { | | class XAPIAN_VISIBILITY_DEFAULT InternalError : public RuntimeError { | |
| public: | | public: | |
| /** @private @internal | | /** @private @internal | |
| * @brief Private constructor for use by remote backend. | | * @brief Private constructor for use by remote backend. | |
| * | | * | |
| * @param error_string_ Optional string describing error. May be NU
LL. | | * @param error_string_ Optional string describing error. May be NU
LL. | |
| */ | | */ | |
| InternalError(const std::string &msg_, const std::string &context_, con
st char * error_string_) | | InternalError(const std::string &msg_, const std::string &context_, con
st char * error_string_) | |
| : RuntimeError(msg_, context_, "InternalError", error_string_) {} | | : RuntimeError(msg_, context_, "InternalError", error_string_) {} | |
|
| /** General purpose constructor which allows setting errno. */ | | /** General purpose constructor. | |
| | | * | |
| | | * @param msg_ Message giving details of the error, intende | |
| | | d | |
| | | * for human consumption. | |
| | | * @param context_ Optional context information for this error. | |
| | | * @param errno_ Optional errno value associated with this er | |
| | | ror. | |
| | | */ | |
| explicit InternalError(const std::string &msg_, const std::string &cont
ext_ = std::string(), int errno_ = 0) | | explicit InternalError(const std::string &msg_, const std::string &cont
ext_ = std::string(), int errno_ = 0) | |
| : RuntimeError(msg_, context_, "InternalError", errno_) {} | | : RuntimeError(msg_, context_, "InternalError", errno_) {} | |
|
| /** Construct from message and errno value. */ | | /** Construct from message and errno value. | |
| | | * | |
| | | * @param msg_ Message giving details of the error, intende | |
| | | d | |
| | | * for human consumption. | |
| | | * @param errno_ Optional errno value associated with this er | |
| | | ror. | |
| | | */ | |
| InternalError(const std::string &msg_, int errno_) | | InternalError(const std::string &msg_, int errno_) | |
| : RuntimeError(msg_, std::string(), "InternalError", errno_) {} | | : RuntimeError(msg_, std::string(), "InternalError", errno_) {} | |
| protected: | | protected: | |
| /** @private @internal | | /** @private @internal | |
| * @brief Constructor for use by constructors of derived classes. | | * @brief Constructor for use by constructors of derived classes. | |
| */ | | */ | |
| InternalError(const std::string &msg_, const std::string &context_, con
st char * type_, const char * error_string_) | | InternalError(const std::string &msg_, const std::string &context_, con
st char * type_, const char * error_string_) | |
| : RuntimeError(msg_, context_, type_, error_string_) {} | | : RuntimeError(msg_, context_, type_, error_string_) {} | |
| | | | |
| /** @private @internal | | /** @private @internal | |
| | | | |
| skipping to change at line 626 | | skipping to change at line 780 | |
| /** Indicates a problem communicating with a remote database. */ | | /** Indicates a problem communicating with a remote database. */ | |
| class XAPIAN_VISIBILITY_DEFAULT NetworkError : public RuntimeError { | | class XAPIAN_VISIBILITY_DEFAULT NetworkError : public RuntimeError { | |
| public: | | public: | |
| /** @private @internal | | /** @private @internal | |
| * @brief Private constructor for use by remote backend. | | * @brief Private constructor for use by remote backend. | |
| * | | * | |
| * @param error_string_ Optional string describing error. May be NU
LL. | | * @param error_string_ Optional string describing error. May be NU
LL. | |
| */ | | */ | |
| NetworkError(const std::string &msg_, const std::string &context_, cons
t char * error_string_) | | NetworkError(const std::string &msg_, const std::string &context_, cons
t char * error_string_) | |
| : RuntimeError(msg_, context_, "NetworkError", error_string_) {} | | : RuntimeError(msg_, context_, "NetworkError", error_string_) {} | |
|
| /** General purpose constructor which allows setting errno. */ | | /** General purpose constructor. | |
| | | * | |
| | | * @param msg_ Message giving details of the error, intende | |
| | | d | |
| | | * for human consumption. | |
| | | * @param context_ Optional context information for this error. | |
| | | * @param errno_ Optional errno value associated with this er | |
| | | ror. | |
| | | */ | |
| explicit NetworkError(const std::string &msg_, const std::string &conte
xt_ = std::string(), int errno_ = 0) | | explicit NetworkError(const std::string &msg_, const std::string &conte
xt_ = std::string(), int errno_ = 0) | |
| : RuntimeError(msg_, context_, "NetworkError", errno_) {} | | : RuntimeError(msg_, context_, "NetworkError", errno_) {} | |
|
| /** Construct from message and errno value. */ | | /** Construct from message and errno value. | |
| | | * | |
| | | * @param msg_ Message giving details of the error, intende | |
| | | d | |
| | | * for human consumption. | |
| | | * @param errno_ Optional errno value associated with this er | |
| | | ror. | |
| | | */ | |
| NetworkError(const std::string &msg_, int errno_) | | NetworkError(const std::string &msg_, int errno_) | |
| : RuntimeError(msg_, std::string(), "NetworkError", errno_) {} | | : RuntimeError(msg_, std::string(), "NetworkError", errno_) {} | |
| protected: | | protected: | |
| /** @private @internal | | /** @private @internal | |
| * @brief Constructor for use by constructors of derived classes. | | * @brief Constructor for use by constructors of derived classes. | |
| */ | | */ | |
| NetworkError(const std::string &msg_, const std::string &context_, cons
t char * type_, const char * error_string_) | | NetworkError(const std::string &msg_, const std::string &context_, cons
t char * type_, const char * error_string_) | |
| : RuntimeError(msg_, context_, type_, error_string_) {} | | : RuntimeError(msg_, context_, type_, error_string_) {} | |
| | | | |
| /** @private @internal | | /** @private @internal | |
| | | | |
| skipping to change at line 656 | | skipping to change at line 821 | |
| /** Indicates a timeout expired while communicating with a remote database.
*/ | | /** Indicates a timeout expired while communicating with a remote database.
*/ | |
| class XAPIAN_VISIBILITY_DEFAULT NetworkTimeoutError : public NetworkError { | | class XAPIAN_VISIBILITY_DEFAULT NetworkTimeoutError : public NetworkError { | |
| public: | | public: | |
| /** @private @internal | | /** @private @internal | |
| * @brief Private constructor for use by remote backend. | | * @brief Private constructor for use by remote backend. | |
| * | | * | |
| * @param error_string_ Optional string describing error. May be NU
LL. | | * @param error_string_ Optional string describing error. May be NU
LL. | |
| */ | | */ | |
| NetworkTimeoutError(const std::string &msg_, const std::string &context
_, const char * error_string_) | | NetworkTimeoutError(const std::string &msg_, const std::string &context
_, const char * error_string_) | |
| : NetworkError(msg_, context_, "NetworkTimeoutError", error_string_)
{} | | : NetworkError(msg_, context_, "NetworkTimeoutError", error_string_)
{} | |
|
| /** General purpose constructor which allows setting errno. */ | | /** General purpose constructor. | |
| | | * | |
| | | * @param msg_ Message giving details of the error, intende | |
| | | d | |
| | | * for human consumption. | |
| | | * @param context_ Optional context information for this error. | |
| | | * @param errno_ Optional errno value associated with this er | |
| | | ror. | |
| | | */ | |
| explicit NetworkTimeoutError(const std::string &msg_, const std::string
&context_ = std::string(), int errno_ = 0) | | explicit NetworkTimeoutError(const std::string &msg_, const std::string
&context_ = std::string(), int errno_ = 0) | |
| : NetworkError(msg_, context_, "NetworkTimeoutError", errno_) {} | | : NetworkError(msg_, context_, "NetworkTimeoutError", errno_) {} | |
|
| /** Construct from message and errno value. */ | | /** Construct from message and errno value. | |
| | | * | |
| | | * @param msg_ Message giving details of the error, intende | |
| | | d | |
| | | * for human consumption. | |
| | | * @param errno_ Optional errno value associated with this er | |
| | | ror. | |
| | | */ | |
| NetworkTimeoutError(const std::string &msg_, int errno_) | | NetworkTimeoutError(const std::string &msg_, int errno_) | |
| : NetworkError(msg_, std::string(), "NetworkTimeoutError", errno_) {
} | | : NetworkError(msg_, std::string(), "NetworkTimeoutError", errno_) {
} | |
| protected: | | protected: | |
| /** @private @internal | | /** @private @internal | |
| * @brief Constructor for use by constructors of derived classes. | | * @brief Constructor for use by constructors of derived classes. | |
| */ | | */ | |
| NetworkTimeoutError(const std::string &msg_, const std::string &context
_, const char * type_, const char * error_string_) | | NetworkTimeoutError(const std::string &msg_, const std::string &context
_, const char * type_, const char * error_string_) | |
| : NetworkError(msg_, context_, type_, error_string_) {} | | : NetworkError(msg_, context_, type_, error_string_) {} | |
| | | | |
| /** @private @internal | | /** @private @internal | |
| | | | |
| skipping to change at line 686 | | skipping to change at line 862 | |
| /** Indicates a query string can't be parsed. */ | | /** Indicates a query string can't be parsed. */ | |
| class XAPIAN_VISIBILITY_DEFAULT QueryParserError : public RuntimeError { | | class XAPIAN_VISIBILITY_DEFAULT QueryParserError : public RuntimeError { | |
| public: | | public: | |
| /** @private @internal | | /** @private @internal | |
| * @brief Private constructor for use by remote backend. | | * @brief Private constructor for use by remote backend. | |
| * | | * | |
| * @param error_string_ Optional string describing error. May be NU
LL. | | * @param error_string_ Optional string describing error. May be NU
LL. | |
| */ | | */ | |
| QueryParserError(const std::string &msg_, const std::string &context_,
const char * error_string_) | | QueryParserError(const std::string &msg_, const std::string &context_,
const char * error_string_) | |
| : RuntimeError(msg_, context_, "QueryParserError", error_string_) {} | | : RuntimeError(msg_, context_, "QueryParserError", error_string_) {} | |
|
| /** General purpose constructor which allows setting errno. */ | | /** General purpose constructor. | |
| | | * | |
| | | * @param msg_ Message giving details of the error, intende | |
| | | d | |
| | | * for human consumption. | |
| | | * @param context_ Optional context information for this error. | |
| | | * @param errno_ Optional errno value associated with this er | |
| | | ror. | |
| | | */ | |
| explicit QueryParserError(const std::string &msg_, const std::string &c
ontext_ = std::string(), int errno_ = 0) | | explicit QueryParserError(const std::string &msg_, const std::string &c
ontext_ = std::string(), int errno_ = 0) | |
| : RuntimeError(msg_, context_, "QueryParserError", errno_) {} | | : RuntimeError(msg_, context_, "QueryParserError", errno_) {} | |
|
| /** Construct from message and errno value. */ | | /** Construct from message and errno value. | |
| | | * | |
| | | * @param msg_ Message giving details of the error, intende | |
| | | d | |
| | | * for human consumption. | |
| | | * @param errno_ Optional errno value associated with this er | |
| | | ror. | |
| | | */ | |
| QueryParserError(const std::string &msg_, int errno_) | | QueryParserError(const std::string &msg_, int errno_) | |
| : RuntimeError(msg_, std::string(), "QueryParserError", errno_) {} | | : RuntimeError(msg_, std::string(), "QueryParserError", errno_) {} | |
| protected: | | protected: | |
| /** @private @internal | | /** @private @internal | |
| * @brief Constructor for use by constructors of derived classes. | | * @brief Constructor for use by constructors of derived classes. | |
| */ | | */ | |
| QueryParserError(const std::string &msg_, const std::string &context_,
const char * type_, const char * error_string_) | | QueryParserError(const std::string &msg_, const std::string &context_,
const char * type_, const char * error_string_) | |
| : RuntimeError(msg_, context_, type_, error_string_) {} | | : RuntimeError(msg_, context_, type_, error_string_) {} | |
| | | | |
| /** @private @internal | | /** @private @internal | |
| | | | |
| skipping to change at line 716 | | skipping to change at line 903 | |
| /** Indicates an error in the std::string serialisation of an object. */ | | /** Indicates an error in the std::string serialisation of an object. */ | |
| class XAPIAN_VISIBILITY_DEFAULT SerialisationError : public RuntimeError { | | class XAPIAN_VISIBILITY_DEFAULT SerialisationError : public RuntimeError { | |
| public: | | public: | |
| /** @private @internal | | /** @private @internal | |
| * @brief Private constructor for use by remote backend. | | * @brief Private constructor for use by remote backend. | |
| * | | * | |
| * @param error_string_ Optional string describing error. May be NU
LL. | | * @param error_string_ Optional string describing error. May be NU
LL. | |
| */ | | */ | |
| SerialisationError(const std::string &msg_, const std::string &context_
, const char * error_string_) | | SerialisationError(const std::string &msg_, const std::string &context_
, const char * error_string_) | |
| : RuntimeError(msg_, context_, "SerialisationError", error_string_)
{} | | : RuntimeError(msg_, context_, "SerialisationError", error_string_)
{} | |
|
| /** General purpose constructor which allows setting errno. */ | | /** General purpose constructor. | |
| | | * | |
| | | * @param msg_ Message giving details of the error, intende | |
| | | d | |
| | | * for human consumption. | |
| | | * @param context_ Optional context information for this error. | |
| | | * @param errno_ Optional errno value associated with this er | |
| | | ror. | |
| | | */ | |
| explicit SerialisationError(const std::string &msg_, const std::string
&context_ = std::string(), int errno_ = 0) | | explicit SerialisationError(const std::string &msg_, const std::string
&context_ = std::string(), int errno_ = 0) | |
| : RuntimeError(msg_, context_, "SerialisationError", errno_) {} | | : RuntimeError(msg_, context_, "SerialisationError", errno_) {} | |
|
| /** Construct from message and errno value. */ | | /** Construct from message and errno value. | |
| | | * | |
| | | * @param msg_ Message giving details of the error, intende | |
| | | d | |
| | | * for human consumption. | |
| | | * @param errno_ Optional errno value associated with this er | |
| | | ror. | |
| | | */ | |
| SerialisationError(const std::string &msg_, int errno_) | | SerialisationError(const std::string &msg_, int errno_) | |
| : RuntimeError(msg_, std::string(), "SerialisationError", errno_) {} | | : RuntimeError(msg_, std::string(), "SerialisationError", errno_) {} | |
| protected: | | protected: | |
| /** @private @internal | | /** @private @internal | |
| * @brief Constructor for use by constructors of derived classes. | | * @brief Constructor for use by constructors of derived classes. | |
| */ | | */ | |
| SerialisationError(const std::string &msg_, const std::string &context_
, const char * type_, const char * error_string_) | | SerialisationError(const std::string &msg_, const std::string &context_
, const char * type_, const char * error_string_) | |
| : RuntimeError(msg_, context_, type_, error_string_) {} | | : RuntimeError(msg_, context_, type_, error_string_) {} | |
| | | | |
| /** @private @internal | | /** @private @internal | |
| | | | |
| skipping to change at line 747 | | skipping to change at line 945 | |
| */ | | */ | |
| class XAPIAN_VISIBILITY_DEFAULT RangeError : public RuntimeError { | | class XAPIAN_VISIBILITY_DEFAULT RangeError : public RuntimeError { | |
| public: | | public: | |
| /** @private @internal | | /** @private @internal | |
| * @brief Private constructor for use by remote backend. | | * @brief Private constructor for use by remote backend. | |
| * | | * | |
| * @param error_string_ Optional string describing error. May be NU
LL. | | * @param error_string_ Optional string describing error. May be NU
LL. | |
| */ | | */ | |
| RangeError(const std::string &msg_, const std::string &context_, const
char * error_string_) | | RangeError(const std::string &msg_, const std::string &context_, const
char * error_string_) | |
| : RuntimeError(msg_, context_, "RangeError", error_string_) {} | | : RuntimeError(msg_, context_, "RangeError", error_string_) {} | |
|
| /** General purpose constructor which allows setting errno. */ | | /** General purpose constructor. | |
| | | * | |
| | | * @param msg_ Message giving details of the error, intende | |
| | | d | |
| | | * for human consumption. | |
| | | * @param context_ Optional context information for this error. | |
| | | * @param errno_ Optional errno value associated with this er | |
| | | ror. | |
| | | */ | |
| explicit RangeError(const std::string &msg_, const std::string &context
_ = std::string(), int errno_ = 0) | | explicit RangeError(const std::string &msg_, const std::string &context
_ = std::string(), int errno_ = 0) | |
| : RuntimeError(msg_, context_, "RangeError", errno_) {} | | : RuntimeError(msg_, context_, "RangeError", errno_) {} | |
|
| /** Construct from message and errno value. */ | | /** Construct from message and errno value. | |
| | | * | |
| | | * @param msg_ Message giving details of the error, intende | |
| | | d | |
| | | * for human consumption. | |
| | | * @param errno_ Optional errno value associated with this er | |
| | | ror. | |
| | | */ | |
| RangeError(const std::string &msg_, int errno_) | | RangeError(const std::string &msg_, int errno_) | |
| : RuntimeError(msg_, std::string(), "RangeError", errno_) {} | | : RuntimeError(msg_, std::string(), "RangeError", errno_) {} | |
| protected: | | protected: | |
| /** @private @internal | | /** @private @internal | |
| * @brief Constructor for use by constructors of derived classes. | | * @brief Constructor for use by constructors of derived classes. | |
| */ | | */ | |
| RangeError(const std::string &msg_, const std::string &context_, const
char * type_, const char * error_string_) | | RangeError(const std::string &msg_, const std::string &context_, const
char * type_, const char * error_string_) | |
| : RuntimeError(msg_, context_, type_, error_string_) {} | | : RuntimeError(msg_, context_, type_, error_string_) {} | |
| | | | |
| /** @private @internal | | /** @private @internal | |
| | | | |
End of changes. 39 change blocks. |
| 39 lines changed or deleted | | 324 lines changed or added | |
|
| queryparser.h | | queryparser.h | |
| | | | |
| skipping to change at line 42 | | skipping to change at line 42 | |
| #include <string> | | #include <string> | |
| | | | |
| namespace Xapian { | | namespace Xapian { | |
| | | | |
| class Database; | | class Database; | |
| class Stem; | | class Stem; | |
| | | | |
| /// Base class for stop-word decision functor. | | /// Base class for stop-word decision functor. | |
| class XAPIAN_VISIBILITY_DEFAULT Stopper { | | class XAPIAN_VISIBILITY_DEFAULT Stopper { | |
| public: | | public: | |
|
| /// Is term a stop-word? | | /** Is term a stop-word? | |
| | | * | |
| | | * @param term The term to test. | |
| | | */ | |
| virtual bool operator()(const std::string & term) const = 0; | | virtual bool operator()(const std::string & term) const = 0; | |
| | | | |
| /// Class has virtual methods, so provide a virtual destructor. | | /// Class has virtual methods, so provide a virtual destructor. | |
| virtual ~Stopper() { } | | virtual ~Stopper() { } | |
| | | | |
| /// Return a string describing this object. | | /// Return a string describing this object. | |
| virtual std::string get_description() const; | | virtual std::string get_description() const; | |
| }; | | }; | |
| | | | |
| /// Simple implementation of Stopper class - this will suit most users. | | /// Simple implementation of Stopper class - this will suit most users. | |
| | | | |
| skipping to change at line 76 | | skipping to change at line 79 | |
| // pointing to const char *. | | // pointing to const char *. | |
| template <class Iterator> | | template <class Iterator> | |
| SimpleStopper(Iterator begin, Iterator end) { | | SimpleStopper(Iterator begin, Iterator end) { | |
| while (begin != end) stop_words.insert(*begin++); | | while (begin != end) stop_words.insert(*begin++); | |
| } | | } | |
| #endif | | #endif | |
| | | | |
| /// Add a single stop word. | | /// Add a single stop word. | |
| void add(const std::string & word) { stop_words.insert(word); } | | void add(const std::string & word) { stop_words.insert(word); } | |
| | | | |
|
| /// Is term a stop-word? | | | |
| virtual bool operator()(const std::string & term) const { | | virtual bool operator()(const std::string & term) const { | |
| return stop_words.find(term) != stop_words.end(); | | return stop_words.find(term) != stop_words.end(); | |
| } | | } | |
| | | | |
|
| /// Return a string describing this object. | | | |
| virtual std::string get_description() const; | | virtual std::string get_description() const; | |
| }; | | }; | |
| | | | |
| /// Base class for value range processors. | | /// Base class for value range processors. | |
| struct XAPIAN_VISIBILITY_DEFAULT ValueRangeProcessor { | | struct XAPIAN_VISIBILITY_DEFAULT ValueRangeProcessor { | |
| /// Destructor. | | /// Destructor. | |
| virtual ~ValueRangeProcessor(); | | virtual ~ValueRangeProcessor(); | |
| | | | |
| /** Check for a valid range of this type. | | /** Check for a valid range of this type. | |
| * | | * | |
|
| * If this ValueRangeProcessor recognises BEGIN..END it returns the | | * @param[in,out] begin The start of the range as specified in the q | |
| * value number to range filter on. Otherwise it returns | | uery | |
| * Xapian::BAD_VALUENO. | | * string by the user. This parameter is a | |
| | | * non-const reference so the ValueRangeProcess | |
| | | or | |
| | | * can modify it to return the value to start t | |
| | | he | |
| | | * range with. | |
| | | * @param[in,out] end The end of the range. This is also a non-co | |
| | | nst | |
| | | * reference so it can be modified. | |
| | | * | |
| | | * @return If this ValueRangeProcessor recognises the range BEG | |
| | | IN..END it | |
| | | * returns the value slot number to range filter on. Otherwise | |
| | | it | |
| | | * returns Xapian::BAD_VALUENO. | |
| */ | | */ | |
| virtual Xapian::valueno operator()(std::string &begin, std::string &end
) = 0; | | virtual Xapian::valueno operator()(std::string &begin, std::string &end
) = 0; | |
| }; | | }; | |
| | | | |
| /** Handle a string range. | | /** Handle a string range. | |
| * | | * | |
| * The end points can be any strings. | | * The end points can be any strings. | |
| */ | | */ | |
| class XAPIAN_VISIBILITY_DEFAULT StringValueRangeProcessor : public ValueRan
geProcessor { | | class XAPIAN_VISIBILITY_DEFAULT StringValueRangeProcessor : public ValueRan
geProcessor { | |
| protected: | | protected: | |
| | | | |
| skipping to change at line 131 | | skipping to change at line 140 | |
| * @param slot_ The value number to return from operator(). | | * @param slot_ The value number to return from operator(). | |
| * @param str_ A string to look for to recognise values as belongi
ng | | * @param str_ A string to look for to recognise values as belongi
ng | |
| * to this range. | | * to this range. | |
| * @param prefix_ Flag specifying whether to check for str_ as a prefi
x | | * @param prefix_ Flag specifying whether to check for str_ as a prefi
x | |
| * or a suffix. | | * or a suffix. | |
| */ | | */ | |
| StringValueRangeProcessor(Xapian::valueno slot_, const std::string &str
_, | | StringValueRangeProcessor(Xapian::valueno slot_, const std::string &str
_, | |
| bool prefix_ = true) | | bool prefix_ = true) | |
| : valno(slot_), prefix(prefix_), str(str_) { } | | : valno(slot_), prefix(prefix_), str(str_) { } | |
| | | | |
|
| /** Check for a valid range of this type. | | /** Check for a valid string range. | |
| * | | * | |
|
| * If no prefix or suffix is specified, then this always returns the | | * @param[in,out] begin The start of the range as specified in the | |
| * value slot specified at construction time. | | * query string by the user. This parameter is | |
| | | a | |
| | | * non-const reference so the ValueRangeProcess | |
| | | or | |
| | | * can modify it to return the value to start t | |
| | | he | |
| | | * range with. | |
| | | * @param[in,out] end The end of the range. This is also a non-co | |
| | | nst | |
| | | * reference so it can be modified. | |
| * | | * | |
|
| * If a prefix or suffix is specified, this is checked for first, and | | * @return A StringValueRangeProcessor always accepts a range i | |
| * it it doesn't match, this method returns Xapian::BAD_VALUENO. | | t is | |
| | | * offered, and returns the value of slot_ passed at constructi | |
| | | on | |
| | | * time. It doesn't modify @a begin or @a end. | |
| */ | | */ | |
|
| Xapian::valueno operator()(std::string &, std::string &); | | Xapian::valueno operator()(std::string &begin, std::string &end); | |
| }; | | }; | |
| | | | |
| /** Handle a date range. | | /** Handle a date range. | |
| * | | * | |
| * Begin and end must be dates in a recognised format. | | * Begin and end must be dates in a recognised format. | |
| */ | | */ | |
| class XAPIAN_VISIBILITY_DEFAULT DateValueRangeProcessor : public StringValu
eRangeProcessor { | | class XAPIAN_VISIBILITY_DEFAULT DateValueRangeProcessor : public StringValu
eRangeProcessor { | |
| bool prefer_mdy; | | bool prefer_mdy; | |
| int epoch_year; | | int epoch_year; | |
| | | | |
| | | | |
| skipping to change at line 209 | | skipping to change at line 224 | |
| * For example, if str_ is "created:" and prefix_ is true, and the ran
ge | | * For example, if str_ is "created:" and prefix_ is true, and the ran
ge | |
| * processor has been added to the queryparser, the queryparser will | | * processor has been added to the queryparser, the queryparser will | |
| * accept "created:1/1/2000..31/12/2001". | | * accept "created:1/1/2000..31/12/2001". | |
| */ | | */ | |
| DateValueRangeProcessor(Xapian::valueno slot_, const std::string &str_, | | DateValueRangeProcessor(Xapian::valueno slot_, const std::string &str_, | |
| bool prefix_ = true, | | bool prefix_ = true, | |
| bool prefer_mdy_ = false, int epoch_year_ = 1970
) | | bool prefer_mdy_ = false, int epoch_year_ = 1970
) | |
| : StringValueRangeProcessor(slot_, str_, prefix_), | | : StringValueRangeProcessor(slot_, str_, prefix_), | |
| prefer_mdy(prefer_mdy_), epoch_year(epoch_year_) { } | | prefer_mdy(prefer_mdy_), epoch_year(epoch_year_) { } | |
| | | | |
|
| /** Check for a valid range of this type. | | /** Check for a valid date range. | |
| * | | * | |
|
| * If BEGIN..END is a sensible date range, this method returns the | | * @param[in,out] begin The start of the range as specified in the | |
| * value number of range filter on. Otherwise it returns | | * query string by the user. This parameter is | |
| * Xapian::BAD_VALUENO. | | a | |
| | | * non-const reference so the ValueRangeProcess | |
| | | or | |
| | | * can modify it to return the value to start t | |
| | | he | |
| | | * range with. | |
| | | * @param[in,out] end The end of the range. This is also a non-co | |
| | | nst | |
| | | * reference so it can be modified. | |
| | | * | |
| | | * @return If BEGIN..END is a sensible date range, this method | |
| | | modifies | |
| | | * them into the format YYYYMMDD and returns the value of slot_ | |
| | | * passed at construction time. Otherwise it returns | |
| | | * Xapian::BAD_VALUENO. | |
| */ | | */ | |
| Xapian::valueno operator()(std::string &begin, std::string &end); | | Xapian::valueno operator()(std::string &begin, std::string &end); | |
| }; | | }; | |
| | | | |
| /** Handle a number range. | | /** Handle a number range. | |
| * | | * | |
| * This class must be used on values which have been encoded using | | * This class must be used on values which have been encoded using | |
| * Xapian::sortable_serialise() which turns numbers into strings which | | * Xapian::sortable_serialise() which turns numbers into strings which | |
| * will sort in the same order as the numbers (the same values can be | | * will sort in the same order as the numbers (the same values can be | |
| * used to implement a numeric sort). | | * used to implement a numeric sort). | |
| | | | |
| skipping to change at line 270 | | skipping to change at line 294 | |
| * processor has been added to the queryparser, the queryparser will | | * processor has been added to the queryparser, the queryparser will | |
| * accept "$10..50" or "$10..$50", but not "10..50" or "10..$50" as va
lid | | * accept "$10..50" or "$10..$50", but not "10..50" or "10..$50" as va
lid | |
| * ranges. If str_ is "kg" and prefix_ is false, the queryparser will | | * ranges. If str_ is "kg" and prefix_ is false, the queryparser will | |
| * accept "10..50kg" or "10kg..50kg", but not "10..50" or "10kg..50" a
s | | * accept "10..50kg" or "10kg..50kg", but not "10..50" or "10kg..50" a
s | |
| * valid ranges. | | * valid ranges. | |
| */ | | */ | |
| NumberValueRangeProcessor(Xapian::valueno slot_, const std::string &str
_, | | NumberValueRangeProcessor(Xapian::valueno slot_, const std::string &str
_, | |
| bool prefix_ = true) | | bool prefix_ = true) | |
| : StringValueRangeProcessor(slot_, str_, prefix_) { } | | : StringValueRangeProcessor(slot_, str_, prefix_) { } | |
| | | | |
|
| /** Check for a valid range of this type. | | /** Check for a valid numeric range. | |
| * | | * | |
|
| * If BEGIN..END is a valid numeric value range, and has the | | * @param[in,out] begin The start of the range as specified in the | |
| * appropriate prefix or suffix (if specified) required for this | | * query string by the user. This parameter is | |
| * NumberValueRangeProcessor, this method returns the value number of | | a | |
| * range filter on, and sets begin and end to the appropriate serialis | | * non-const reference so the ValueRangeProcess | |
| ed | | or | |
| * values needed to delimit the range. Otherwise it returns | | * can modify it to return the value to start t | |
| * Xapian::BAD_VALUENO. | | he | |
| | | * range with. | |
| | | * @param[in,out] end The end of the range. This is also a non-co | |
| | | nst | |
| | | * reference so it can be modified. | |
| | | * | |
| | | * @return If BEGIN..END is a valid numeric range with the spec | |
| | | ified | |
| | | * prefix/suffix (if one was specified), this method modifies | |
| | | * them by removing the prefix/suffix, converting to a number, | |
| | | * and encoding with Xapian::sortable_serialise(), and returns | |
| | | the | |
| | | * value of slot_ passed at construction time. Otherwise it | |
| | | * returns Xapian::BAD_VALUENO. | |
| */ | | */ | |
| Xapian::valueno operator()(std::string &begin, std::string &end); | | Xapian::valueno operator()(std::string &begin, std::string &end); | |
| }; | | }; | |
| | | | |
| /// Build a Xapian::Query object from a user query string. | | /// Build a Xapian::Query object from a user query string. | |
| class XAPIAN_VISIBILITY_DEFAULT QueryParser { | | class XAPIAN_VISIBILITY_DEFAULT QueryParser { | |
| public: | | public: | |
| /// Class representing the queryparser internals. | | /// Class representing the queryparser internals. | |
| class Internal; | | class Internal; | |
| /// @private @internal Reference counted internals. | | /// @private @internal Reference counted internals. | |
| | | | |
| skipping to change at line 373 | | skipping to change at line 405 | |
| /** Enable automatic use of synonyms for single terms and groups of | | /** Enable automatic use of synonyms for single terms and groups of | |
| * terms. | | * terms. | |
| * | | * | |
| * NB: You must also call set_database() for this to work. | | * NB: You must also call set_database() for this to work. | |
| */ | | */ | |
| FLAG_AUTO_MULTIWORD_SYNONYMS = 1024 | FLAG_AUTO_SYNONYMS, | | FLAG_AUTO_MULTIWORD_SYNONYMS = 1024 | FLAG_AUTO_SYNONYMS, | |
| | | | |
| /** The default flags. | | /** The default flags. | |
| * | | * | |
| * Used if you don't explicitly pass any to @a parse_query(). | | * Used if you don't explicitly pass any to @a parse_query(). | |
|
| | | * The default flags are FLAG_PHRASE|FLAG_BOOLEAN|FLAG_LOVEHATE. | |
| * | | * | |
| * Added in Xapian 1.0.11. | | * Added in Xapian 1.0.11. | |
| */ | | */ | |
| FLAG_DEFAULT = FLAG_PHRASE|FLAG_BOOLEAN|FLAG_LOVEHATE | | FLAG_DEFAULT = FLAG_PHRASE|FLAG_BOOLEAN|FLAG_LOVEHATE | |
| } feature_flag; | | } feature_flag; | |
| | | | |
| typedef enum { STEM_NONE, STEM_SOME, STEM_ALL } stem_strategy; | | typedef enum { STEM_NONE, STEM_SOME, STEM_ALL } stem_strategy; | |
| | | | |
| /// Copy constructor. | | /// Copy constructor. | |
| QueryParser(const QueryParser & o); | | QueryParser(const QueryParser & o); | |
| | | | |
| skipping to change at line 400 | | skipping to change at line 433 | |
| /// Destructor. | | /// Destructor. | |
| ~QueryParser(); | | ~QueryParser(); | |
| | | | |
| /** Set the stemmer. | | /** Set the stemmer. | |
| * | | * | |
| * This sets the stemming algorithm which will be used by the query | | * This sets the stemming algorithm which will be used by the query | |
| * parser. Note that the stemming algorithm will only be used accordi
ng | | * parser. Note that the stemming algorithm will only be used accordi
ng | |
| * to the stemming strategy set by set_stemming_strategy(), which defa
ults | | * to the stemming strategy set by set_stemming_strategy(), which defa
ults | |
| * to STEM_NONE. Therefore, to use a stemming algorithm, you will als
o | | * to STEM_NONE. Therefore, to use a stemming algorithm, you will als
o | |
| * need to call set_stemming_strategy() with a value other than STEM_N
ONE. | | * need to call set_stemming_strategy() with a value other than STEM_N
ONE. | |
|
| | | * | |
| | | * @param stemmer The Xapian::Stem object to set. | |
| */ | | */ | |
| void set_stemmer(const Xapian::Stem & stemmer); | | void set_stemmer(const Xapian::Stem & stemmer); | |
| | | | |
| /** Set the stemming strategy. | | /** Set the stemming strategy. | |
| * | | * | |
| * This controls how the query parser will apply the stemming algorith
m. | | * This controls how the query parser will apply the stemming algorith
m. | |
|
| * The default value is STEM_NONE. The possible values are: | | * Note that the stemming algorithm is only applied to words in | |
| | | * probabilistic fields - boolean filter terms are never stemmed. | |
| * | | * | |
|
| * - STEM_NONE: Don't perform any stemming. | | * @param strategy The strategy to use - possible values are: | |
| | | * - STEM_NONE: Don't perform any stemming (the default). | |
| * - STEM_SOME: Search for stemmed forms of terms except for those wh
ich | | * - STEM_SOME: Search for stemmed forms of terms except for those wh
ich | |
| * start with a capital letter, or are followed by certai
n | | * start with a capital letter, or are followed by certai
n | |
| * characters (currently: (/\@<>=*[{" ), or are used with | | * characters (currently: (/\@<>=*[{" ), or are used with | |
| * operators which need positional information. Stemmed | | * operators which need positional information. Stemmed | |
| * terms are prefixed with 'Z'. | | * terms are prefixed with 'Z'. | |
| * - STEM_ALL: Search for stemmed forms of all words (note: no 'Z' | | * - STEM_ALL: Search for stemmed forms of all words (note: no 'Z' | |
| * prefix is added). | | * prefix is added). | |
|
| * | | | |
| * Note that the stemming algorithm is only applied to words in | | | |
| * probabilistic fields - boolean filter terms are never stemmed. | | | |
| */ | | */ | |
| void set_stemming_strategy(stem_strategy strategy); | | void set_stemming_strategy(stem_strategy strategy); | |
| | | | |
|
| /// Set the stopper. | | /** Set the stopper. | |
| | | * | |
| | | * @param stop The Stopper object to set (default NULL, which means | |
| | | no | |
| | | * stopwords). | |
| | | */ | |
| void set_stopper(const Stopper *stop = NULL); | | void set_stopper(const Stopper *stop = NULL); | |
| | | | |
| /** Set the default operator. | | /** Set the default operator. | |
| * | | * | |
|
| * This operator is used to combine non-filter query items when no | | * @param default_op The operator to use to combine non-filter | |
| * explicit operator is used. | | * query items when no explicit operator is use | |
| | | d. | |
| * | | * | |
|
| * The most useful values for this are OP_OR (the default) and OP_AND. | | * The most useful values for this are OP_OR (t | |
| * OP_NEAR and OP_PHRASE can also be useful. | | he | |
| | | * default) and OP_AND. OP_NEAR and OP_PHRASE | |
| | | can | |
| | | * also be useful. | |
| * | | * | |
|
| * So for example, 'weather forecast' is parsed as if it were 'weather | | * So for example, 'weather forecast' is parsed | |
| OR | | as | |
| * forecast' by default. | | * if it were 'weather OR forecast' by default. | |
| */ | | */ | |
| void set_default_op(Query::op default_op); | | void set_default_op(Query::op default_op); | |
| | | | |
| /** Get the current default operator. */ | | /** Get the current default operator. */ | |
| Query::op get_default_op() const; | | Query::op get_default_op() const; | |
| | | | |
| /** Specify the database being searched. | | /** Specify the database being searched. | |
| * | | * | |
|
| * The database is used for wildcard expansion (FLAG_WILDCARD and | | * @param db The database to use for wildcard expansion | |
| * FLAG_PARTIAL), spelling correction (FLAG_SPELLING_CORRECTION), and | | * (FLAG_WILDCARD and FLAG_PARTIAL), spelling correctio | |
| * synonyms (FLAG_SYNONYM, FLAG_AUTO_SYNONYMS, and | | n | |
| * FLAG_AUTO_MULTIWORD_SYNONYMS). | | * (FLAG_SPELLING_CORRECTION), and synonyms (FLAG_SYNON | |
| | | YM, | |
| | | * FLAG_AUTO_SYNONYMS, and FLAG_AUTO_MULTIWORD_SYNONYMS | |
| | | ). | |
| */ | | */ | |
| void set_database(const Database &db); | | void set_database(const Database &db); | |
| | | | |
| /** Specify the maximum expansion of a wildcard term. | | /** Specify the maximum expansion of a wildcard term. | |
| * | | * | |
| * Note: you must also set FLAG_WILDCARD for wildcard expansion to hap
pen. | | * Note: you must also set FLAG_WILDCARD for wildcard expansion to hap
pen. | |
| * | | * | |
| * @param limit The maximum number of terms each wildcard in the que
ry | | * @param limit The maximum number of terms each wildcard in the que
ry | |
| * can expand to, or 0 for no limit (which is the defau
lt). | | * can expand to, or 0 for no limit (which is the defau
lt). | |
| */ | | */ | |
| | | | |
| skipping to change at line 476 | | skipping to change at line 515 | |
| * For example, you can pass "A" when parsing an "Author" field
. | | * For example, you can pass "A" when parsing an "Author" field
. | |
| * | | * | |
| * @exception If the query string can't be parsed, then | | * @exception If the query string can't be parsed, then | |
| * Xapian::QueryParserError is thrown. You can get an Engli
sh | | * Xapian::QueryParserError is thrown. You can get an Engli
sh | |
| * error message to report to the user by catching it and | | * error message to report to the user by catching it and | |
| * calling get_msg() on the caught exception. The current | | * calling get_msg() on the caught exception. The current | |
| * possible values (in case you want to translate them) are: | | * possible values (in case you want to translate them) are: | |
| * | | * | |
| * @li Unknown range operation | | * @li Unknown range operation | |
| * @li parse error | | * @li parse error | |
|
| * @li Syntax: <expression> AND <expression> | | * @li Syntax: <expression> AND <expression> | |
| * @li Syntax: <expression> AND NOT <expression> | | ; | |
| * @li Syntax: <expression> NOT <expression> | | * @li Syntax: <expression> AND NOT <expressio | |
| * @li Syntax: <expression> OR <expression> | | n> | |
| * @li Syntax: <expression> XOR <expression> | | * @li Syntax: <expression> NOT <expression> | |
| | | ; | |
| | | * @li Syntax: <expression> OR <expression> | |
| | | * @li Syntax: <expression> XOR <expression> | |
| | | ; | |
| */ | | */ | |
| Query parse_query(const std::string &query_string, | | Query parse_query(const std::string &query_string, | |
| unsigned flags = FLAG_DEFAULT, | | unsigned flags = FLAG_DEFAULT, | |
| const std::string &default_prefix = std::string()); | | const std::string &default_prefix = std::string()); | |
| | | | |
| /** Add a probabilistic term prefix. | | /** Add a probabilistic term prefix. | |
| * | | * | |
| * For example: | | * For example: | |
| * | | * | |
| * @code | | * @code | |
| | | | |
| skipping to change at line 637 | | skipping to change at line 676 | |
| * specified by IEEE_754, this will be the case: if the representation of | | * specified by IEEE_754, this will be the case: if the representation of | |
| * doubles is more precise, it is possible that two very close doubles | | * doubles is more precise, it is possible that two very close doubles | |
| * will be mapped to the same string, so will compare equal. | | * will be mapped to the same string, so will compare equal. | |
| * | | * | |
| * Note also that both zero and -zero will be converted to the same | | * Note also that both zero and -zero will be converted to the same | |
| * representation: since these compare equal, this satisfies the | | * representation: since these compare equal, this satisfies the | |
| * comparison constraint, but it's worth knowing this if you wish to use | | * comparison constraint, but it's worth knowing this if you wish to use | |
| * the encoding in some situation where this distinction matters. | | * the encoding in some situation where this distinction matters. | |
| * | | * | |
| * Handling of NaN isn't (currently) guaranteed to be sensible. | | * Handling of NaN isn't (currently) guaranteed to be sensible. | |
|
| | | * | |
| | | * @param value The number to serialise. | |
| */ | | */ | |
| XAPIAN_VISIBILITY_DEFAULT | | XAPIAN_VISIBILITY_DEFAULT | |
| std::string sortable_serialise(double value); | | std::string sortable_serialise(double value); | |
| | | | |
| /** Convert a string encoded using @a sortable_serialise back to a floating | | /** Convert a string encoded using @a sortable_serialise back to a floating | |
| * point number. | | * point number. | |
| * | | * | |
| * This expects the input to be a string produced by @a sortable_serialise
(). | | * This expects the input to be a string produced by @a sortable_serialise
(). | |
| * If the input is not such a string, the value returned is undefined (but | | * If the input is not such a string, the value returned is undefined (but | |
| * no error will be thrown). | | * no error will be thrown). | |
| * | | * | |
| * The result of the conversion will be exactly the value which was | | * The result of the conversion will be exactly the value which was | |
| * supplied to @a sortable_serialise() when making the string on platforms | | * supplied to @a sortable_serialise() when making the string on platforms | |
| * which represent doubles with the precisions specified by IEEE_754, but | | * which represent doubles with the precisions specified by IEEE_754, but | |
| * may be a different (nearby) value on other platforms. | | * may be a different (nearby) value on other platforms. | |
|
| | | * | |
| | | * @param value The serialised string to decode. | |
| */ | | */ | |
| XAPIAN_VISIBILITY_DEFAULT | | XAPIAN_VISIBILITY_DEFAULT | |
| double sortable_unserialise(const std::string & value); | | double sortable_unserialise(const std::string & value); | |
| | | | |
| } | | } | |
| | | | |
| #endif // XAPIAN_INCLUDED_QUERYPARSER_H | | #endif // XAPIAN_INCLUDED_QUERYPARSER_H | |
| | | | |
End of changes. 25 change blocks. |
| 46 lines changed or deleted | | 122 lines changed or added | |
|