Lucene++ - a full-featured, c++ search engine
API Documentation
Go to the documentation of this file.
36 Payload(ByteArray data, int32_t offset, int32_t length);
57 void setData(ByteArray data, int32_t offset, int32_t length);
77 void copyTo(ByteArray target, int32_t targetOffset);
Payload(ByteArray data)
Creates a new payload with the the given array as data. A reference to the passed-in array is held,...
void setData(ByteArray data, int32_t offset, int32_t length)
Sets this payloads data. A reference to the passed-in array is held, ie. no copy is made.
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
virtual int32_t hashCode()
Return hash code for this object.
virtual LuceneObjectPtr clone(const LuceneObjectPtr &other=LuceneObjectPtr())
Clones this payload by creating a copy of the underlying byte array.
boost::shared_ptr< LuceneObject > LuceneObjectPtr
Definition: LuceneTypes.h:539
ByteArray data
the byte array containing the payload data
Definition: Payload.h:40
ByteArray toByteArray()
Allocates a new byte array, copies the payload data into it and returns it.
uint8_t byteAt(int32_t index)
Returns the byte at the given index.
int32_t offset
the offset within the byte array
Definition: Payload.h:47
Definition: AbstractAllTermDocs.h:12
void setData(ByteArray data)
Sets this payloads data. A reference to the passed-in array is held, ie. no copy is made.
Base class for all Lucene classes.
Definition: LuceneObject.h:31
void copyTo(ByteArray target, int32_t targetOffset)
Copies the payload data to a byte array.
virtual bool equals(const LuceneObjectPtr &other)
Return whether two objects are equal.
int32_t _length
the length of the payload data
Definition: Payload.h:50
Payload(ByteArray data, int32_t offset, int32_t length)
Creates a new payload with the the given array as data. A reference to the passed-in array is held,...
A Payload is metadata that can be stored together with each occurrence of a term. This metadata is st...
Definition: Payload.h:21
ByteArray getData()
Returns a reference to the underlying byte array that holds this payloads data.
Payload()
Creates an empty payload and does not allocate a byte array.
int32_t length()
Returns the length of the payload data.
int32_t getOffset()
Returns the offset in the underlying byte array.
clucene.sourceforge.net