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

- Main Page
- Related Pages
- Namespaces
- Data Structures
- Files

- File List
- Globals

All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
LuceneObject.h
Go to the documentation of this file.
1 // Copyright (c) 2009-2011 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 LUCENEOBJECT_H
8 #define LUCENEOBJECT_H
9
10 #include <boost/enable_shared_from_this.hpp>
11 #include "LuceneSync.h"
12
13 #ifdef LPP_USE_CYCLIC_CHECK
14 #define LUCENE_INTERFACE(Name) \
15 static String _getClassName() { return L###Name; } \
16 virtual String getClassName() { return L###Name; } \
17 CycleCheckT<Name> cycleCheck;
18 #else
19 #define LUCENE_INTERFACE(Name) \
20 static String _getClassName() { return L###Name; } \
21 virtual String getClassName() { return L###Name; }
22 #endif
23
24 #define LUCENE_CLASS(Name) \
25 LUCENE_INTERFACE(Name); \
26 boost::shared_ptr<Name> shared_from_this() { return boost::static_pointer_cast<Name>(LuceneObject::shared_from_this()); } \
27
28 namespace Lucene
29 {
31 class LPPAPI LuceneObject : public LuceneSync, public boost::enable_shared_from_this<LuceneObject>
32 {
33 public:
34 virtual ~LuceneObject();
35
36 protected:
37 LuceneObject();
38
39 public:
42 virtual void initialize();
43
46 virtual LuceneObjectPtr clone(LuceneObjectPtr other = LuceneObjectPtr());
47
49 virtual int32_t hashCode();
50
52 virtual bool equals(LuceneObjectPtr other);
53
55 virtual int32_t compareTo(LuceneObjectPtr other);
56
58 virtual String toString();
59 };
60 }
61
62 #endif

clucene.sourceforge.net