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

InfoStream.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 INFOSTREAM_H
8 #define INFOSTREAM_H
9
10 #include "LuceneObject.h"
11 #include <boost/filesystem/fstream.hpp>
12
13 namespace Lucene {
14
16 class LPPAPI InfoStream : public LuceneObject {
17 protected:
18 InfoStream();
19
20 public:
21 virtual ~InfoStream();
22 LUCENE_CLASS(InfoStream);
23
24 public:
25 virtual InfoStream& operator<< (const String& t) = 0;
26 };
27
29 class LPPAPI InfoStreamFile : public InfoStream {
30 public:
31 InfoStreamFile(const String& path);
32 virtual ~InfoStreamFile();
33
34 LUCENE_CLASS(InfoStreamFile);
35
36 protected:
37 boost::filesystem::wofstream file;
38
39 public:
40 virtual InfoStreamFile& operator<< (const String& t);
41 };
42
44 class LPPAPI InfoStreamOut : public InfoStream {
45 public:
46 virtual ~InfoStreamOut();
47 LUCENE_CLASS(InfoStreamOut);
48
49 public:
50 virtual InfoStreamOut& operator<< (const String& t);
51 };
52
54 class LPPAPI InfoStreamNull : public InfoStream {
55 public:
56 virtual ~InfoStreamNull();
57 LUCENE_CLASS(InfoStreamNull);
58
59 public:
60 virtual InfoStreamNull& operator<< (const String& t);
61 };
62
63 }
64
65 #endif
LuceneObject.h
Lucene::LuceneObject
Base class for all Lucene classes.
Definition: LuceneObject.h:31
Lucene::InfoStreamNull
Null stream override to eat messages.
Definition: InfoStream.h:54
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
Lucene
Definition: AbstractAllTermDocs.h:12
Lucene::InfoStream
Utility class to support streaming info messages.
Definition: InfoStream.h:16
Lucene::InfoStreamOut
Stream override to write messages to a std::cout.
Definition: InfoStream.h:44
Lucene::InfoStreamFile
Stream override to write messages to a file.
Definition: InfoStream.h:29

clucene.sourceforge.net