Lucene++ - a full-featured, c++ search engine
API Documentation
Base class for Attributes that can be added to a AttributeSource. More...
#include <Attribute.h>
Inheritance diagram for Lucene::Attribute: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. More... | |
| virtual int32_t | hashCode ()=0 |
| Subclasses must implement this method and should compute a hashCode similar to this: More... | |
| virtual bool | equals (LuceneObjectPtr other)=0 |
| All values used for computation of hashCode() should be checked here for equality. More... | |
| virtual void | copyTo (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. More... | |
| virtual LuceneObjectPtr | clone (LuceneObjectPtr other=LuceneObjectPtr())=0 |
| Shallow clone. Subclasses must override this if they need to clone any members deeply. More... | |
Public Member Functions inherited from Lucene::LuceneObject | |
| virtual | ~LuceneObject () |
| virtual void | initialize () |
| Called directly after instantiation to create objects that depend on this object being fully constructed. More... | |
| virtual int32_t | compareTo (LuceneObjectPtr other) |
| Compare two objects. More... | |
| virtual String | toString () |
| Returns a string representation of the object. More... | |
Public Member Functions inherited from Lucene::LuceneSync | |
| virtual | ~LuceneSync () |
| virtual SynchronizePtr | getSync () |
| Return this object synchronize lock. More... | |
| virtual LuceneSignalPtr | getSignal () |
| Return this object signal. More... | |
| virtual void | lock (int32_t timeout=0) |
| Lock this object using an optional timeout. More... | |
| virtual void | unlock () |
| Unlock this object. More... | |
| virtual bool | holdsLock () |
| Returns true if this object is currently locked by current thread. More... | |
| virtual void | wait (int32_t timeout=0) |
| Wait for signal using an optional timeout. More... | |
| virtual void | notifyAll () |
| Notify all threads waiting for signal. More... | |
Static Public Member Functions | |
| static String | _getClassName () |
Additional Inherited Members | |
Protected Member Functions inherited from Lucene::LuceneObject | |
| LuceneObject () | |
Protected Attributes inherited from Lucene::LuceneSync | |
| 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::Token, Lucene::TermAttribute, Lucene::PositionIncrementAttribute, Lucene::OffsetAttribute, Lucene::PayloadAttribute, Lucene::FlagsAttribute, 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::Token, Lucene::TermAttribute, Lucene::PositionIncrementAttribute, Lucene::OffsetAttribute, Lucene::FlagsAttribute, Lucene::TypeAttribute, and Lucene::PayloadAttribute.
|
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::Token, Lucene::TermAttribute, Lucene::PositionIncrementAttribute, Lucene::OffsetAttribute, Lucene::PayloadAttribute, Lucene::FlagsAttribute, 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::Token, Lucene::TermAttribute, Lucene::PositionIncrementAttribute, Lucene::OffsetAttribute, Lucene::PayloadAttribute, Lucene::FlagsAttribute, 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::Token, Lucene::TermAttribute, Lucene::PositionIncrementAttribute, Lucene::OffsetAttribute, Lucene::PayloadAttribute, Lucene::FlagsAttribute, and Lucene::TypeAttribute.
|
inline |