source: trunk/gsdl/src/mgpp/text/FIvfLevelInfo.h@ 879

Last change on this file since 879 was 855, checked in by sjboddie, 24 years ago

Rodgers new C++ mg

  • 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 * $Id: FIvfLevelInfo.h 855 2000-01-14 02:17:52Z sjboddie $
21 *
22 **************************************************************************/
23
24#ifndef FIVFLEVELINFO_H
25#define FIVFLEVELINFO_H
26
27#if defined(GSDL_USE_OBJECTSPACE)
28# include <ospace\std\map>
29#elif defined(GSDL_USE_STL_H)
30# include <map.h>
31#else
32# include <map>
33#endif
34
35#include <stdio.h>
36#include "UCArray.h"
37
38
39class IvfLevelInfo {
40public:
41 UCArray levelTag;
42 unsigned long numEntries; // N for level
43 unsigned long approxWeightsDiskPtr;
44 unsigned long exactWeightsDiskPtr;
45 bool workInLevel; // this is just a working variable,
46 // it is not saved or read from the file
47
48 IvfLevelInfo ();
49 void Clear ();
50
51 bool Read (FILE *f);
52 bool Write (FILE *f) const;
53};
54
55// stream output for debugging purposes
56ostream &operator<<(ostream &s, const IvfLevelInfo &l);
57
58
59typedef map<UCArray, IvfLevelInfo, LTUCArray> IvfLevelInfoMap;
60
61
62class FIvfLevel {
63public:
64 UCArray docTag;
65 UCArray indexLevel; // empty for word level index
66 IvfLevelInfoMap levelInfo;
67
68 FIvfLevel ();
69 void Clear ();
70
71 bool Read (FILE *f);
72 bool Write (FILE *f) const;
73};
74
75// stream output for debugging purposes
76ostream &operator<<(ostream &s, const FIvfLevel &l);
77
78
79#endif
Note: See TracBrowser for help on using the repository browser.