Lucene++ - a full-featured, c++ search engine
API Documentation


Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Data Fields
Lucene::SingleTokenAttributeSource Class Reference

#include <DocInverterPerThread.h>

+ Inheritance diagram for Lucene::SingleTokenAttributeSource:

Public Member Functions

 SingleTokenAttributeSource ()
 
virtual ~SingleTokenAttributeSource ()
 
virtual String getClassName ()
 
boost::shared_ptr< SingleTokenAttributeSourceshared_from_this ()
 
void reinit (const String &stringValue, int32_t startOffset, int32_t endOffset)
 
- Public Member Functions inherited from Lucene::AttributeSource
 AttributeSource ()
 An AttributeSource using the default attribute factory DefaultAttributeFactory.
 
 AttributeSource (const AttributeSourcePtr &input)
 An AttributeSource that uses the same attributes as the supplied one.
 
 AttributeSource (const AttributeFactoryPtr &factory)
 An AttributeSource using the supplied AttributeFactory for creating new Attribute instances.
 
virtual ~AttributeSource ()
 
boost::shared_ptr< AttributeSourceshared_from_this ()
 
AttributeFactoryPtr getAttributeFactory ()
 returns the used AttributeFactory.
 
template<class ATTR >
boost::shared_ptr< ATTR > addAttribute ()
 This method first checks if an instance of that class is already in this AttributeSource and returns it. Otherwise a new instance is created, added to this AttributeSource and returned.
 
void addAttribute (const String &className, const AttributePtr &attrImpl)
 Adds a custom Attribute instance.
 
bool hasAttributes ()
 Returns true if this AttributeSource has any attributes.
 
template<class ATTR >
bool hasAttribute ()
 Returns true, if this AttributeSource contains the passed-in Attribute.
 
template<class ATTR >
boost::shared_ptr< ATTR > getAttribute ()
 Returns the instance of the passed in Attribute contained in this AttributeSource.
 
void clearAttributes ()
 Resets all Attributes in this AttributeSource by calling AttributeImpl#clear() on each Attribute implementation.
 
AttributeSourceStatePtr captureState ()
 Captures the state of all Attributes. The return value can be passed to restoreState to restore the state of this or another AttributeSource.
 
void restoreState (const AttributeSourceStatePtr &state)
 Restores this state by copying the values of all attribute implementations that this state contains into the attributes implementations of the targetStream. The targetStream must contain a corresponding instance for each argument contained in this state (eg. it is not possible to restore the state of an AttributeSource containing a TermAttribute into a AttributeSource using a Token instance as implementation).
 
virtual int32_t hashCode ()
 Return hash code for this object.
 
virtual bool equals (const LuceneObjectPtr &other)
 Return whether two objects are equal.
 
virtual String toString ()
 Returns a string representation of the object.
 
AttributeSourcePtr cloneAttributes ()
 Performs a clone of all AttributeImpl instances returned in a new AttributeSource instance. This method can be used to eg. create another TokenStream with exactly the same attributes (using AttributeSource(AttributeSource))
 
Collection< AttributePtrgetAttributes ()
 Return a vector of attributes based on currentState.
 
- 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.
 
virtual LuceneObjectPtr clone (const LuceneObjectPtr &other=LuceneObjectPtr())
 Return clone of this object.
 
virtual int32_t compareTo (const LuceneObjectPtr &other)
 Compare two objects.
 
- Public Member Functions inherited from Lucene::LuceneSync
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 ()
 
- Static Public Member Functions inherited from Lucene::AttributeSource
static String _getClassName ()
 

Data Fields

TermAttributePtr termAttribute
 
OffsetAttributePtr offsetAttribute
 

Additional Inherited Members

- Protected Member Functions inherited from Lucene::AttributeSource
AttributePtr getAttribute (const String &className)
 The caller must pass in a className value. This method checks if an instance of that class is already in this AttributeSource and returns it.
 
bool hasAttribute (const String &className)
 Returns true, if this AttributeSource contains the passed-in Attribute.
 
void computeCurrentState ()
 
- Protected Member Functions inherited from Lucene::LuceneObject
 LuceneObject ()
 
- Protected Attributes inherited from Lucene::AttributeSource
AttributeFactoryPtr factory
 
MapStringAttribute attributes
 
AttributeSourceStatePtr currentState
 
- Protected Attributes inherited from Lucene::LuceneSync
SynchronizePtr objectLock
 
LuceneSignalPtr objectSignal
 

Constructor & Destructor Documentation

◆ SingleTokenAttributeSource()

Lucene::SingleTokenAttributeSource::SingleTokenAttributeSource ( )

◆ ~SingleTokenAttributeSource()

virtual Lucene::SingleTokenAttributeSource::~SingleTokenAttributeSource ( )
virtual

Member Function Documentation

◆ _getClassName()

static String Lucene::SingleTokenAttributeSource::_getClassName ( )
inlinestatic

◆ getClassName()

virtual String Lucene::SingleTokenAttributeSource::getClassName ( )
inlinevirtual

Reimplemented from Lucene::AttributeSource.

◆ reinit()

void Lucene::SingleTokenAttributeSource::reinit ( const String &  stringValue,
int32_t  startOffset,
int32_t  endOffset 
)

◆ shared_from_this()

boost::shared_ptr< SingleTokenAttributeSource > Lucene::SingleTokenAttributeSource::shared_from_this ( )
inline

Field Documentation

◆ offsetAttribute

OffsetAttributePtr Lucene::SingleTokenAttributeSource::offsetAttribute

◆ termAttribute

TermAttributePtr Lucene::SingleTokenAttributeSource::termAttribute

The documentation for this class was generated from the following file:

clucene.sourceforge.net