Lucene++ - a full-featured, c++ search engine
API Documentation
Toggle main menu visibility
Loading...
Searching...
No Matches
include
lucene++
PayloadAttribute.h
Go to the documentation of this file.
1
2
// 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 PAYLOADATTRIBUTE_H
8
#define PAYLOADATTRIBUTE_H
9
10
#include "
Attribute.h
"
11
12
namespace
Lucene
{
13
15
class
LPPAPI
PayloadAttribute
:
public
Attribute
{
16
public
:
18
PayloadAttribute
();
19
21
PayloadAttribute
(
const
PayloadPtr
&
payload
);
22
23
virtual
~PayloadAttribute
();
24
25
LUCENE_CLASS
(
PayloadAttribute
);
26
27
protected
:
28
PayloadPtr
payload
;
29
30
public
:
31
virtual
String
toString
();
32
34
virtual
PayloadPtr
getPayload
();
35
37
virtual
void
setPayload
(
const
PayloadPtr
&
payload
);
38
39
virtual
void
clear
();
40
virtual
LuceneObjectPtr
clone
(
const
LuceneObjectPtr
& other =
LuceneObjectPtr
());
41
virtual
bool
equals
(
const
LuceneObjectPtr
& other);
42
virtual
int32_t
hashCode
();
43
virtual
void
copyTo
(
const
AttributePtr
& target);
44
};
45
46
}
47
48
#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::PayloadAttribute::clear
virtual void clear()
Clears the values in this Attribute and resets it to its default value. If this implementation implem...
Lucene::PayloadAttribute::payload
PayloadPtr payload
Definition
PayloadAttribute.h:28
Lucene::PayloadAttribute::clone
virtual LuceneObjectPtr clone(const LuceneObjectPtr &other=LuceneObjectPtr())
Shallow clone. Subclasses must override this if they need to clone any members deeply.
Lucene::PayloadAttribute::toString
virtual String toString()
Returns a string representation of the object.
Lucene::PayloadAttribute::copyTo
virtual void copyTo(const AttributePtr &target)
Copies the values from this Attribute into the passed-in target attribute. The target implementation ...
Lucene::PayloadAttribute::PayloadAttribute
PayloadAttribute(const PayloadPtr &payload)
Initialize this attribute with the given payload.
Lucene::PayloadAttribute::~PayloadAttribute
virtual ~PayloadAttribute()
Lucene::PayloadAttribute::getPayload
virtual PayloadPtr getPayload()
Returns this Token's payload.
Lucene::PayloadAttribute::hashCode
virtual int32_t hashCode()
Subclasses must implement this method and should compute a hashCode similar to this:
Lucene::PayloadAttribute::equals
virtual bool equals(const LuceneObjectPtr &other)
All values used for computation of hashCode() should be checked here for equality.
Lucene::PayloadAttribute::setPayload
virtual void setPayload(const PayloadPtr &payload)
Sets this Token's payload.
Lucene::PayloadAttribute::PayloadAttribute
PayloadAttribute()
Initialize this attribute with no payload.
Lucene
Definition
AbstractAllTermDocs.h:12
Lucene::PayloadPtr
boost::shared_ptr< Payload > PayloadPtr
Definition
LuceneTypes.h:198
Lucene::AttributePtr
boost::shared_ptr< Attribute > AttributePtr
Definition
LuceneTypes.h:518
Lucene::LuceneObjectPtr
boost::shared_ptr< LuceneObject > LuceneObjectPtr
Definition
LuceneTypes.h:539
clucene.sourceforge.net