#include <inmemory_database.h>


Public Member Functions | |
| Xapian::termcount | get_approx_size () const |
| Return approximate size of this termlist. | |
| void | accumulate_stats (Xapian::Internal::ExpandStats &stats) const |
| Collate weighting information for the current term. | |
| string | get_termname () const |
| Return the termname at the current position. | |
| Xapian::termcount | get_wdf () const |
| Return the wdf for the term at the current position. | |
| Xapian::doccount | get_termfreq () const |
| Return the term frequency for the term at the current position. | |
| TermList * | next () |
| Advance the current position to the next term in the termlist. | |
| TermList * | skip_to (const std::string &term) |
| Skip forward to the specified term. | |
| bool | at_end () const |
| Return true if the current position is past the last term in this list. | |
| Xapian::termcount | positionlist_count () const |
| Return the length of the position list for the current position. | |
| Xapian::PositionIterator | positionlist_begin () const |
| Return a PositionIterator for the current position. | |
Private Member Functions | |
| InMemoryTermList (Xapian::Internal::RefCntPtr< const InMemoryDatabase > db, Xapian::docid did, const InMemoryDoc &doc, Xapian::termcount len) | |
Private Attributes | |
| vector< InMemoryTermEntry > ::const_iterator | pos |
| vector< InMemoryTermEntry > ::const_iterator | end |
| Xapian::termcount | terms |
| bool | started |
| Xapian::Internal::RefCntPtr < const InMemoryDatabase > | db |
| Xapian::docid | did |
| Xapian::termcount | document_length |
Friends | |
| class | InMemoryDatabase |
Definition at line 201 of file inmemory_database.h.
| InMemoryTermList::InMemoryTermList | ( | Xapian::Internal::RefCntPtr< const InMemoryDatabase > | db, | |
| Xapian::docid | did, | |||
| const InMemoryDoc & | doc, | |||
| Xapian::termcount | len | |||
| ) | [private] |
| void InMemoryTermList::accumulate_stats | ( | Xapian::Internal::ExpandStats & | stats | ) | const [virtual] |
Collate weighting information for the current term.
Reimplemented from Xapian::TermIterator::Internal.
Definition at line 223 of file inmemory_database.cc.
References Xapian::Internal::ExpandStats::accumulate(), Assert, at_end(), db, document_length, get_termfreq(), get_wdf(), and started.
| bool InMemoryTermList::at_end | ( | ) | const [virtual] |
Return true if the current position is past the last term in this list.
Implements Xapian::TermIterator::Internal.
Definition at line 270 of file inmemory_database.cc.
References Assert, db, end, pos, and started.
Referenced by accumulate_stats(), get_termfreq(), get_termname(), get_wdf(), and next().
| Xapian::termcount InMemoryTermList::get_approx_size | ( | ) | const [virtual] |
Return approximate size of this termlist.
Implements Xapian::TermIterator::Internal.
Definition at line 216 of file inmemory_database.cc.
| Xapian::doccount InMemoryTermList::get_termfreq | ( | ) | const [virtual] |
Return the term frequency for the term at the current position.
Implements Xapian::TermIterator::Internal.
Definition at line 206 of file inmemory_database.cc.
References Assert, at_end(), db, and started.
Referenced by accumulate_stats().
| string InMemoryTermList::get_termname | ( | ) | const [virtual] |
Return the termname at the current position.
Implements Xapian::TermIterator::Internal.
Definition at line 234 of file inmemory_database.cc.
| Xapian::termcount InMemoryTermList::get_wdf | ( | ) | const [virtual] |
Return the wdf for the term at the current position.
Implements Xapian::TermIterator::Internal.
Definition at line 197 of file inmemory_database.cc.
References Assert, at_end(), db, and started.
Referenced by accumulate_stats().
| TermList * InMemoryTermList::next | ( | ) | [virtual] |
Advance the current position to the next term in the termlist.
The list starts before the first term in the list, so next() must be called before any methods which need the context of the current position.
Implements Xapian::TermIterator::Internal.
Definition at line 243 of file inmemory_database.cc.
| Xapian::PositionIterator InMemoryTermList::positionlist_begin | ( | ) | const [virtual] |
Return a PositionIterator for the current position.
Implements Xapian::TermIterator::Internal.
Definition at line 285 of file inmemory_database.cc.
| Xapian::termcount InMemoryTermList::positionlist_count | ( | ) | const [virtual] |
Return the length of the position list for the current position.
Implements Xapian::TermIterator::Internal.
Definition at line 278 of file inmemory_database.cc.
| TermList * InMemoryTermList::skip_to | ( | const std::string & | term | ) | [virtual] |
Skip forward to the specified term.
If the specified term isn't in the list, position ourselves on the first term after tname (or at_end() if no terms after tname exist).
Implements Xapian::TermIterator::Internal.
Definition at line 256 of file inmemory_database.cc.
friend class InMemoryDatabase [friend] |
Definition at line 202 of file inmemory_database.h.
Xapian::Internal::RefCntPtr<const InMemoryDatabase> InMemoryTermList::db [private] |
Definition at line 209 of file inmemory_database.h.
Referenced by accumulate_stats(), at_end(), get_approx_size(), get_termfreq(), get_termname(), get_wdf(), next(), positionlist_begin(), positionlist_count(), and skip_to().
Xapian::docid InMemoryTermList::did [private] |
Definition at line 210 of file inmemory_database.h.
Referenced by positionlist_begin(), and positionlist_count().
vector<InMemoryTermEntry>::const_iterator InMemoryTermList::end [private] |
vector<InMemoryTermEntry>::const_iterator InMemoryTermList::pos [private] |
Definition at line 204 of file inmemory_database.h.
Referenced by at_end(), InMemoryTermList(), next(), and skip_to().
bool InMemoryTermList::started [private] |
Definition at line 207 of file inmemory_database.h.
Referenced by accumulate_stats(), at_end(), get_termfreq(), get_termname(), get_wdf(), next(), and skip_to().
Xapian::termcount InMemoryTermList::terms [private] |
Definition at line 206 of file inmemory_database.h.
Referenced by get_approx_size(), and InMemoryTermList().