|
JASSv2
|
Container class representing a document through the indexing pipeline. More...
#include <document.h>

Public Member Functions | |
| document () | |
| Constructor using an allocator local to this object (useful when the object needs to contain its own memory) | |
| document (class allocator &memory_source) | |
| Constructor using an allocator specified (useful when the object needs to allocate memory in a specific location) | |
| bool | isempty (void) |
| Check to see whether this is an empty document. More... | |
| void | rewind (void) |
| Free up all resources assocuated with this object and make it ready for re-use. | |
Static Public Member Functions | |
| static void | unittest (void) |
| Unit test this class. | |
Public Attributes | |
| allocator & | primary_key_allocator |
| If memory is needed for the primary key then allocate from here. | |
| allocator & | contents_allocator |
| If memory is needed for the document contents then allocate from here. | |
| slice | primary_key |
| The external primary key (e.g. TREC DOCID, or filename) of the document (or empty if that is meaningless). | |
| slice | contents |
| The contents of the document (or likewise). | |
Protected Attributes | |
| allocator_pool | default_allocator |
| If a document is created without a specified allocator then use a pool allocator. | |
Static Private Attributes | |
| static const size_t | default_allocation_size = 8192 |
| The default size of the allocation unit within the document. | |
Container class representing a document through the indexing pipeline.
An example tying documents, instreams, and parsing to count the number of document and non-unique symbols is:
|
inline |
Check to see whether this is an empty document.
1.8.13