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


Attribute.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 ATTRIBUTE_H
8 #define ATTRIBUTE_H
9 
10 #include "LuceneObject.h"
11 
12 namespace Lucene {
13 
18 class LPPAPI Attribute : public LuceneObject {
19 public:
20  virtual ~Attribute();
22 
23 public:
26  virtual void clear() = 0;
27 
38  virtual int32_t hashCode() = 0;
39 
43  virtual bool equals(const LuceneObjectPtr& other) = 0;
44 
47  virtual void copyTo(const AttributePtr& target) = 0;
48 
51  virtual LuceneObjectPtr clone(const LuceneObjectPtr& other = LuceneObjectPtr()) = 0;
52 };
53 
54 }
55 
56 #endif
Lucene::Attribute::~Attribute
virtual ~Attribute()
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
Lucene::Attribute::hashCode
virtual int32_t hashCode()=0
Subclasses must implement this method and should compute a hashCode similar to this:
Lucene::LuceneObjectPtr
boost::shared_ptr< LuceneObject > LuceneObjectPtr
Definition: LuceneTypes.h:539
Lucene::Attribute
Base class for Attributes that can be added to a AttributeSource.
Definition: Attribute.h:18
Lucene::Attribute::equals
virtual bool equals(const LuceneObjectPtr &other)=0
All values used for computation of hashCode() should be checked here for equality.
Lucene::Attribute::copyTo
virtual void copyTo(const AttributePtr &target)=0
Copies the values from this Attribute into the passed-in target attribute. The target implementation ...
Lucene
Definition: AbstractAllTermDocs.h:12
Lucene::LuceneObject
Base class for all Lucene classes.
Definition: LuceneObject.h:31
Lucene::Attribute::clear
virtual void clear()=0
Clears the values in this Attribute and resets it to its default value. If this implementation implem...
Lucene::AttributePtr
boost::shared_ptr< Attribute > AttributePtr
Definition: LuceneTypes.h:518
Lucene::Attribute::clone
virtual LuceneObjectPtr clone(const LuceneObjectPtr &other=LuceneObjectPtr())=0
Shallow clone. Subclasses must override this if they need to clone any members deeply.
LuceneObject.h

clucene.sourceforge.net