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

PositionIncrementAttribute.h
Go to the documentation of this file.
1 // Copyright (c) 2009-2014 Alan Wright. All rights reserved.
3 // Distributable under the terms of either the Apache License (Version 2.0)
4 // or the GNU Lesser General Public License.
6
7 #ifndef POSITIONINCREMENTATTRIBUTE_H
8 #define POSITIONINCREMENTATTRIBUTE_H
9
10 #include "Attribute.h"
11
12 namespace Lucene {
13
32 class LPPAPI PositionIncrementAttribute : public Attribute {
33 public:
34 PositionIncrementAttribute();
35 virtual ~PositionIncrementAttribute();
36
37 LUCENE_CLASS(PositionIncrementAttribute);
38
39 protected:
40 int32_t positionIncrement;
41
42 public:
43 virtual String toString();
44
47 virtual void setPositionIncrement(int32_t positionIncrement);
48
51 virtual int32_t getPositionIncrement();
52
53 virtual void clear();
54 virtual bool equals(const LuceneObjectPtr& other);
55 virtual int32_t hashCode();
56 virtual void copyTo(const AttributePtr& target);
57 virtual LuceneObjectPtr clone(const LuceneObjectPtr& other = LuceneObjectPtr());
58 };
59
60 }
61
62 #endif
Attribute.h
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
Lucene::Attribute
Base class for Attributes that can be added to a AttributeSource.
Definition: Attribute.h:18
Lucene::PositionIncrementAttribute
The positionIncrement determines the position of this token relative to the previous Token in a Token...
Definition: PositionIncrementAttribute.h:32
Lucene::PositionIncrementAttribute::~PositionIncrementAttribute
virtual ~PositionIncrementAttribute()
Lucene::PositionIncrementAttribute::equals
virtual bool equals(const LuceneObjectPtr &other)
All values used for computation of hashCode() should be checked here for equality.
Lucene::PositionIncrementAttribute::hashCode
virtual int32_t hashCode()
Subclasses must implement this method and should compute a hashCode similar to this:
Lucene::PositionIncrementAttribute::clone
virtual LuceneObjectPtr clone(const LuceneObjectPtr &other=LuceneObjectPtr())
Shallow clone. Subclasses must override this if they need to clone any members deeply.
Lucene::PositionIncrementAttribute::positionIncrement
int32_t positionIncrement
Definition: PositionIncrementAttribute.h:37
Lucene::PositionIncrementAttribute::clear
virtual void clear()
Clears the values in this Attribute and resets it to its default value. If this implementation implem...
Lucene::PositionIncrementAttribute::PositionIncrementAttribute
PositionIncrementAttribute()
Lucene::PositionIncrementAttribute::setPositionIncrement
virtual void setPositionIncrement(int32_t positionIncrement)
Set the position increment. The default value is one.
Lucene::PositionIncrementAttribute::copyTo
virtual void copyTo(const AttributePtr &target)
Copies the values from this Attribute into the passed-in target attribute. The target implementation ...
Lucene::PositionIncrementAttribute::toString
virtual String toString()
Returns a string representation of the object.
Lucene::PositionIncrementAttribute::getPositionIncrement
virtual int32_t getPositionIncrement()
Returns the position increment of this Token.
Lucene
Definition: AbstractAllTermDocs.h:12
Lucene::LuceneObjectPtr
boost::shared_ptr< LuceneObject > LuceneObjectPtr
Definition: LuceneTypes.h:539
Lucene::AttributePtr
boost::shared_ptr< Attribute > AttributePtr
Definition: LuceneTypes.h:518

clucene.sourceforge.net