blob: 2d42a4412c63e0561cebd08a1e9fd486a4ae50ef (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
//
// SplitMatches.h
//
// SplitMatches: Constructed from a Configuration, see doc
// for format of config item "search_results_order".
// Used to contain a number of ResultMatches, putting them in separate
// lists depending on the URL with method Add.
// Iterator methods Get_First and Get_Next returns the sub-lists.
// Method Joined returns a new list with all the sub-lists
// concatenated.
//
// $Id: SplitMatches.h,v 1.4 2004/05/28 13:15:24 lha Exp $
//
// Part of the ht://Dig package <http://www.htdig.org/>
// Copyright (c) 2000-2004 The ht://Dig Group
// For copyright details, see the file COPYING in your distribution
// or the GNU Library General Public License (LGPL) version 2 or later
// <http://www.gnu.org/copyleft/lgpl.html>
//
#ifndef _splitmatches_h
#define _splitmatches_h
#include "Configuration.h"
#include "ResultMatch.h"
#include "List.h"
class SplitMatches
{
public:
SplitMatches(Configuration &);
~SplitMatches();
void Add(ResultMatch *, char *);
List *JoinedLists();
List *Get_First()
{ mySubAreas->Start_Get(); return Get_Next(); }
List *Get_Next();
private:
// These member functions are not supposed to be implemented.
SplitMatches();
SplitMatches(const SplitMatches &);
void operator= (const SplitMatches &);
// (Lists of) Matches for each sub-area regex.
List *mySubAreas;
// Matches for everything else.
List *myDefaultList;
};
#endif /* _splitmatches_h */
|