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


 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
TestPoint.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 TESTPOINT_H
8 #define TESTPOINT_H
9 
10 #include "Lucene.h"
11 
12 namespace Lucene
13 {
15  class TestPoint
16  {
17  public:
18  virtual ~TestPoint();
19 
20  protected:
21  static MapStringInt testMethods;
22  static bool enable;
23 
24  public:
25  static void enableTestPoints();
26  static void clear();
27  static void setTestPoint(const String& object, const String& method, bool point);
28  static bool getTestPoint(const String& object, const String& method);
29  static bool getTestPoint(const String& method);
30  };
31 
32  class TestScope
33  {
34  public:
35  TestScope(const String& object, const String& method);
36  virtual ~TestScope();
37 
38  protected:
39  String object;
40  String method;
41  };
42 }
43 
44 #endif

clucene.sourceforge.net