1 | /**********************************************************************
|
---|
2 | *
|
---|
3 | * comtypes.cpp --
|
---|
4 | * Copyright (C) 1999 The New Zealand Digital Library Project
|
---|
5 | *
|
---|
6 | * PUT COPYRIGHT NOTICE HERE
|
---|
7 | *
|
---|
8 | * $Id: comtypes.cpp 187 1999-03-04 21:19:15Z rjmcnab $
|
---|
9 | *
|
---|
10 | *********************************************************************/
|
---|
11 |
|
---|
12 | /*
|
---|
13 | $Log$
|
---|
14 | Revision 1.2 1999/03/04 21:19:15 rjmcnab
|
---|
15 |
|
---|
16 | Added clear() functions to all the data types.
|
---|
17 |
|
---|
18 | Revision 1.1 1999/02/21 22:35:25 rjmcnab
|
---|
19 |
|
---|
20 | Initial revision.
|
---|
21 |
|
---|
22 | */
|
---|
23 |
|
---|
24 |
|
---|
25 | #include "comtypes.h"
|
---|
26 |
|
---|
27 |
|
---|
28 | void ShortColInfo_t::clear() {
|
---|
29 | name.clear();
|
---|
30 | host.clear();
|
---|
31 | port = 0;
|
---|
32 | }
|
---|
33 |
|
---|
34 | void ColInfoResponse_t::clear () {
|
---|
35 | shortInfo.clear();
|
---|
36 | isPublic=false;
|
---|
37 | isBeta=false;
|
---|
38 | buildDate=0;
|
---|
39 | numDocs=0;
|
---|
40 | numWords=0;
|
---|
41 | numBytes=0;
|
---|
42 | }
|
---|
43 |
|
---|
44 | void FilterOption_t::clear () {
|
---|
45 | name.clear();
|
---|
46 | type = booleant;
|
---|
47 | repeatable = onePerQuery;
|
---|
48 | defaultValue.clear();
|
---|
49 | validValues.erase(validValues.begin(), validValues.end());
|
---|
50 | }
|
---|
51 |
|
---|
52 | void FilterDescript_t::clear () {
|
---|
53 | filterName.clear();
|
---|
54 | filterOptions.erase(filterOptions.begin(), filterOptions.end());
|
---|
55 | }
|
---|
56 |
|
---|
57 | void InfoFilterOptionsResponse_t::clear () {
|
---|
58 | filterOptions.erase(filterOptions.begin(), filterOptions.end());
|
---|
59 | }
|
---|
60 |
|
---|
61 | void OptionValue_t::clear () {
|
---|
62 | name.clear();
|
---|
63 | value.clear();
|
---|
64 | }
|
---|
65 |
|
---|
66 | void FilterRequest_t::clear () {
|
---|
67 | filterName.clear();
|
---|
68 | filterOptions.erase(filterOptions.begin(), filterOptions.end());
|
---|
69 | docSet.erase(docSet.begin(), docSet.end());
|
---|
70 | filterResultOptions = 0;
|
---|
71 | }
|
---|
72 |
|
---|
73 | void TermInfo_t::clear () {
|
---|
74 | term.clear();
|
---|
75 | freq = 0;
|
---|
76 | matchTerms.erase (matchTerms.begin(), matchTerms.end());
|
---|
77 | }
|
---|
78 |
|
---|
79 | void ResultDocInfo_t::clear () {
|
---|
80 | OID.clear ();
|
---|
81 | subCol.erase (subCol.begin(), subCol.end());
|
---|
82 | ranking = 0.0;
|
---|
83 | docFreq.erase(docFreq.begin(), docFreq.end());
|
---|
84 | }
|
---|
85 |
|
---|
86 | void FilterResponse_t::clear () {
|
---|
87 | docsFound = 0;
|
---|
88 | isApprox = false;
|
---|
89 | termInfo.erase (termInfo.begin(), termInfo.end());
|
---|
90 | docInfo.erase (docInfo.begin(), docInfo.end());
|
---|
91 | }
|
---|
92 |
|
---|
93 | void MetadataInfoResponse_t::clear () {
|
---|
94 | supportedFields.erase (supportedFields.begin(), supportedFields.end());
|
---|
95 | supportedLanguages.erase (supportedLanguages.begin(), supportedLanguages.end());
|
---|
96 | }
|
---|
97 |
|
---|
98 | void MetadataRequest_t::clear () {
|
---|
99 | OIDs.erase (OIDs.begin(), OIDs.end());
|
---|
100 | fields.erase (fields.begin(), fields.end());
|
---|
101 | languages.erase (languages.begin(), languages.end());
|
---|
102 | }
|
---|
103 |
|
---|
104 | void MetadataResponse_t::clear () {
|
---|
105 | metadata.erase (metadata.begin(), metadata.end());
|
---|
106 | };
|
---|
107 |
|
---|