Last change
on this file since 357 was 354, checked in by rjmcnab, 25 years ago |
Added ability to print the result number
|
-
Property svn:executable
set to
*
-
Property svn:keywords
set to
Author Date Id Revision
|
File size:
1.2 KB
|
Line | |
---|
1 | /**********************************************************************
|
---|
2 | *
|
---|
3 | * formattools.h --
|
---|
4 | * Copyright (C) 1999 The New Zealand Digital Library Project
|
---|
5 | *
|
---|
6 | * PUT COPYRIGHT NOTICE HERE
|
---|
7 | *
|
---|
8 | * $Id: formattools.h 354 1999-07-08 20:48:33Z rjmcnab $
|
---|
9 | *
|
---|
10 | *********************************************************************/
|
---|
11 |
|
---|
12 |
|
---|
13 | #ifndef FORMATTOOLS_H
|
---|
14 | #define FORMATTOOLS_H
|
---|
15 |
|
---|
16 | #include "text_t.h"
|
---|
17 | #include "comtypes.h"
|
---|
18 |
|
---|
19 | enum command_t {comIf, comOr, comMeta, comText, comLink, comEndLink, comNum};
|
---|
20 | enum pcommand_t {pNone, pImmediate, pTop, pIndex, pAll};
|
---|
21 | enum dcommand_t {dMeta};
|
---|
22 |
|
---|
23 | struct metadata_t {
|
---|
24 | void clear();
|
---|
25 | metadata_t () {clear();}
|
---|
26 |
|
---|
27 | int metaindex;
|
---|
28 | pcommand_t parentcommand;
|
---|
29 | int parentindex;
|
---|
30 | text_t parentoptions;
|
---|
31 | };
|
---|
32 |
|
---|
33 | struct decision_t {
|
---|
34 | void clear();
|
---|
35 | decision_t () {clear();}
|
---|
36 |
|
---|
37 | dcommand_t command;
|
---|
38 | metadata_t meta;
|
---|
39 | };
|
---|
40 |
|
---|
41 | struct format_t {
|
---|
42 | void clear();
|
---|
43 | format_t () {clear();}
|
---|
44 |
|
---|
45 | command_t command;
|
---|
46 | decision_t decision;
|
---|
47 | text_t text;
|
---|
48 | metadata_t meta;
|
---|
49 | format_t *nextptr;
|
---|
50 | format_t *ifptr;
|
---|
51 | format_t *elseptr;
|
---|
52 | format_t *orptr;
|
---|
53 | };
|
---|
54 |
|
---|
55 |
|
---|
56 |
|
---|
57 | bool parse_formatstring (const text_t &formatstring, format_t *formatlistptr,
|
---|
58 | text_tarray &metadata, bool &getParents);
|
---|
59 |
|
---|
60 | text_t get_formatted_string (const ResultDocInfo_t &docinfo, format_t *formatlistptr);
|
---|
61 |
|
---|
62 |
|
---|
63 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.