source: main/branches/64_bit_Greenstone/greenstone2/common-src/indexers/mgpp/text/FIvfLevelInfo.h@ 23508

Last change on this file since 23508 was 23508, checked in by sjm84, 13 years ago

Committing 64 bit changes into the branch

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 2.0 KB
Line 
1/**************************************************************************
2 *
3 * FIvfLevelInfo.h -- File functions for document levels
4 * Copyright (C) 1999 Rodger McNab
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 *
20 **************************************************************************/
21
22#ifndef FIVFLEVELINFO_H
23#define FIVFLEVELINFO_H
24
25#if defined(GSDL_USE_OBJECTSPACE)
26# include <ospace\std\map>
27#elif defined(GSDL_USE_STL_H)
28# include <map.h>
29#else
30# include <map>
31#endif
32
33#include "mglong.h"
34#include <stdio.h>
35#include "UCArray.h"
36
37
38class IvfLevelInfo {
39public:
40 UCArray levelTag;
41 mg_u_long numEntries; // N for level
42 mg_u_long approxWeightsDiskPtr;
43 mg_u_long exactWeightsDiskPtr;
44 bool workInLevel; // this is just a working variable,
45 // it is not saved or read from the file
46
47 IvfLevelInfo ();
48 void Clear ();
49
50 bool Read (FILE *f);
51 bool Write (FILE *f) const;
52};
53
54// stream output for debugging purposes
55ostream &operator<<(ostream &s, const IvfLevelInfo &l);
56
57
58typedef map<UCArray, IvfLevelInfo, LTUCArray> IvfLevelInfoMap;
59
60
61class FIvfLevel {
62public:
63 UCArray docTag;
64 UCArray indexLevel; // empty for word level index
65 IvfLevelInfoMap levelInfo;
66
67 FIvfLevel ();
68 void Clear ();
69
70 bool Read (FILE *f);
71 bool Write (FILE *f) const;
72};
73
74// stream output for debugging purposes
75ostream &operator<<(ostream &s, const FIvfLevel &l);
76
77
78#endif
Note: See TracBrowser for help on using the repository browser.