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


TypeAttribute.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 TYPEATTRIBUTE_H
8 #define TYPEATTRIBUTE_H
9 
10 #include "Attribute.h"
11 
12 namespace Lucene {
13 
15 class LPPAPI TypeAttribute : public Attribute {
16 public:
17  TypeAttribute();
18  TypeAttribute(const String& type);
19  virtual ~TypeAttribute();
20 
22 
23 protected:
24  String _type;
25  static const String& DEFAULT_TYPE();
26 
27 public:
28  virtual String toString();
29 
31  String type();
32 
35  void setType(const String& type);
36 
37  virtual void clear();
38  virtual bool equals(const LuceneObjectPtr& other);
39  virtual int32_t hashCode();
40  virtual void copyTo(const AttributePtr& target);
41  virtual LuceneObjectPtr clone(const LuceneObjectPtr& other = LuceneObjectPtr());
42 };
43 
44 }
45 
46 #endif
Base class for Attributes that can be added to a AttributeSource.
Definition: Attribute.h:18
A Token's lexical type. The Default value is "word".
Definition: TypeAttribute.h:15
boost::shared_ptr< LuceneObject > LuceneObjectPtr
Definition: LuceneTypes.h:539
boost::shared_ptr< Attribute > AttributePtr
Definition: LuceneTypes.h:518
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
Definition: AbstractAllTermDocs.h:12

clucene.sourceforge.net