Lucene++ - a full-featured, c++ search engine
API Documentation
Go to the documentation of this file.
7 #ifndef TERMATTRIBUTE_H
8 #define TERMATTRIBUTE_H
43 virtual void setTermBuffer(
const wchar_t* buffer, int32_t offset, int32_t length);
virtual CharArray termBuffer()
Returns the internal termBuffer character array which you can then directly alter....
virtual wchar_t * termBufferArray()
Optimized implementation of termBuffer.
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
virtual void setTermBuffer(const String &buffer)
Copies the contents of buffer into the termBuffer array.
virtual void setTermLength(int32_t length)
Set number of valid characters (length of the term) in the termBuffer array. Use this to truncate the...
boost::shared_ptr< LuceneObject > LuceneObjectPtr
Definition: LuceneTypes.h:539
Base class for Attributes that can be added to a AttributeSource.
Definition: Attribute.h:18
The term text of a Token.
Definition: TermAttribute.h:15
virtual void clear()
Clears the values in this Attribute and resets it to its default value. If this implementation implem...
virtual String term()
Returns the Token's term text.
Definition: AbstractAllTermDocs.h:12
virtual String toString()
Returns a string representation of the object.
int32_t _termLength
Definition: TermAttribute.h:26
CharArray _termBuffer
Definition: TermAttribute.h:25
boost::shared_ptr< Attribute > AttributePtr
Definition: LuceneTypes.h:518
virtual CharArray resizeTermBuffer(int32_t newSize)
Grows the termBuffer to at least size newSize, preserving the existing content. Note: If the next ope...
virtual LuceneObjectPtr clone(const LuceneObjectPtr &other=LuceneObjectPtr())
Shallow clone. Subclasses must override this if they need to clone any members deeply.
virtual int32_t termLength()
Return number of valid characters (length of the term) in the termBuffer array.
virtual int32_t hashCode()
Subclasses must implement this method and should compute a hashCode similar to this:
virtual bool equals(const LuceneObjectPtr &other)
All values used for computation of hashCode() should be checked here for equality.
void growTermBuffer(int32_t newSize)
Allocates a buffer char[] of at least newSize, without preserving the existing content....
virtual void setTermBuffer(const wchar_t *buffer, int32_t offset, int32_t length)
Copies the contents of buffer, starting at offset for length characters, into the termBuffer array.
virtual void copyTo(const AttributePtr &target)
Copies the values from this Attribute into the passed-in target attribute. The target implementation ...
static const int32_t MIN_BUFFER_SIZE
Definition: TermAttribute.h:20
clucene.sourceforge.net