Lucene++ - a full-featured, c++ search engine
API Documentation
Base class for Attributes that can be added to a AttributeSource
.
More...
#include <Attribute.h>
Public Member Functions | |
virtual | ~Attribute () |
virtual String | getClassName () |
boost::shared_ptr< Attribute > | shared_from_this () |
virtual void | clear ()=0 |
Clears the values in this Attribute and resets it to its default value. If this implementation implements more than one Attribute interface it clears all. | |
virtual int32_t | hashCode ()=0 |
Subclasses must implement this method and should compute a hashCode similar to this: | |
virtual bool | equals (const LuceneObjectPtr &other)=0 |
All values used for computation of hashCode() should be checked here for equality. | |
virtual void | copyTo (const AttributePtr &target)=0 |
Copies the values from this Attribute into the passed-in target attribute. The target implementation must support all the Attributes this implementation supports. | |
virtual LuceneObjectPtr | clone (const LuceneObjectPtr &other=LuceneObjectPtr())=0 |
Shallow clone. Subclasses must override this if they need to clone any members deeply. | |
![]() | |
virtual | ~LuceneObject () |
virtual void | initialize () |
Called directly after instantiation to create objects that depend on this object being fully constructed. | |
virtual int32_t | compareTo (const LuceneObjectPtr &other) |
Compare two objects. | |
virtual String | toString () |
Returns a string representation of the object. | |
![]() | |
virtual | ~LuceneSync () |
virtual SynchronizePtr | getSync () |
Return this object synchronize lock. | |
virtual LuceneSignalPtr | getSignal () |
Return this object signal. | |
virtual void | lock (int32_t timeout=0) |
Lock this object using an optional timeout. | |
virtual void | unlock () |
Unlock this object. | |
virtual bool | holdsLock () |
Returns true if this object is currently locked by current thread. | |
virtual void | wait (int32_t timeout=0) |
Wait for signal using an optional timeout. | |
virtual void | notifyAll () |
Notify all threads waiting for signal. | |
Static Public Member Functions | |
static String | _getClassName () |
Additional Inherited Members | |
![]() | |
LuceneObject () | |
![]() | |
SynchronizePtr | objectLock |
LuceneSignalPtr | objectSignal |
Base class for Attributes that can be added to a AttributeSource
.
Attributes are used to add data in a dynamic, yet type-safe way to a source of usually streamed objects, eg. a TokenStream
.
|
virtual |
|
inlinestatic |
|
pure virtual |
Clears the values in this Attribute and resets it to its default value. If this implementation implements more than one Attribute interface it clears all.
Implemented in Lucene::FlagsAttribute, Lucene::OffsetAttribute, Lucene::PayloadAttribute, Lucene::PositionIncrementAttribute, Lucene::TermAttribute, Lucene::Token, and Lucene::TypeAttribute.
|
pure virtual |
Shallow clone. Subclasses must override this if they need to clone any members deeply.
base | clone reference - null when called initially, then set in top virtual override. |
Reimplemented from Lucene::LuceneObject.
Implemented in Lucene::FlagsAttribute, Lucene::OffsetAttribute, Lucene::PayloadAttribute, Lucene::PositionIncrementAttribute, Lucene::TermAttribute, Lucene::Token, and Lucene::TypeAttribute.
|
pure virtual |
Copies the values from this Attribute into the passed-in target attribute. The target implementation must support all the Attributes this implementation supports.
Implemented in Lucene::FlagsAttribute, Lucene::OffsetAttribute, Lucene::PayloadAttribute, Lucene::PositionIncrementAttribute, Lucene::TermAttribute, Lucene::Token, and Lucene::TypeAttribute.
|
pure virtual |
All values used for computation of hashCode()
should be checked here for equality.
see also LuceneObject#equals(Object)
Reimplemented from Lucene::LuceneObject.
Implemented in Lucene::FlagsAttribute, Lucene::OffsetAttribute, Lucene::PayloadAttribute, Lucene::PositionIncrementAttribute, Lucene::TermAttribute, Lucene::Token, and Lucene::TypeAttribute.
|
inlinevirtual |
|
pure virtual |
Subclasses must implement this method and should compute a hashCode similar to this:
int32_t hashCode() { int32_t code = startOffset; code = code * 31 + endOffset; return code; }
see also equals(Object)
Reimplemented from Lucene::LuceneObject.
Implemented in Lucene::FlagsAttribute, Lucene::OffsetAttribute, Lucene::PayloadAttribute, Lucene::PositionIncrementAttribute, Lucene::TermAttribute, Lucene::Token, and Lucene::TypeAttribute.
|
inline |