Changeset 187 for trunk/gsdl/src/recpt


Ignore:
Timestamp:
1999-03-05T10:19:15+13:00 (25 years ago)
Author:
rjmcnab
Message:

Added clear() functions to all the data types.

Location:
trunk/gsdl/src/recpt
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/recpt/comtypes.cpp

    r166 r187  
    1212/*
    1313   $Log$
     14   Revision 1.2  1999/03/04 21:19:15  rjmcnab
     15
     16   Added clear() functions to all the data types.
     17
    1418   Revision 1.1  1999/02/21 22:35:25  rjmcnab
    1519
     
    2226
    2327
    24 ColInfoResponse_t::ColInfoResponse_t () {
     28void ShortColInfo_t::clear() {
     29  name.clear();
     30  host.clear();
     31  port = 0;
     32}
     33
     34void ColInfoResponse_t::clear () {
     35  shortInfo.clear();
    2536  isPublic=false;
    2637  isBeta=false;
     
    3142}
    3243
     44void FilterOption_t::clear () {
     45  name.clear();
     46  type = booleant;
     47  repeatable = onePerQuery;
     48  defaultValue.clear();
     49  validValues.erase(validValues.begin(), validValues.end());
     50}
     51
     52void FilterDescript_t::clear () {
     53  filterName.clear();
     54  filterOptions.erase(filterOptions.begin(), filterOptions.end());
     55}
     56
     57void InfoFilterOptionsResponse_t::clear () {
     58  filterOptions.erase(filterOptions.begin(), filterOptions.end());
     59}
     60
     61void OptionValue_t::clear () {
     62  name.clear();
     63  value.clear();
     64}
     65
     66void 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
     73void TermInfo_t::clear () {
     74  term.clear();
     75  freq = 0;
     76  matchTerms.erase (matchTerms.begin(), matchTerms.end());
     77}
     78
     79void 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
     86void 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
     93void MetadataInfoResponse_t::clear () {
     94  supportedFields.erase (supportedFields.begin(), supportedFields.end());
     95  supportedLanguages.erase (supportedLanguages.begin(), supportedLanguages.end());
     96}
     97
     98void 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
     104void MetadataResponse_t::clear () {
     105  metadata.erase (metadata.begin(), metadata.end());
     106};
     107
  • trunk/gsdl/src/recpt/comtypes.h

    r184 r187  
    4141// }
    4242struct ShortColInfo_t {
    43   ShortColInfo_t () {port=0;}
     43  void clear ();
     44  ShortColInfo_t () {clear();}
    4445
    4546  text_t name;
     
    6061// }
    6162struct ColInfoResponse_t {
    62   ColInfoResponse_t ();
     63  void clear ();
     64  ColInfoResponse_t () {clear();}
    6365
    6466  ShortColInfo_t shortInfo;
     
    8789// }
    8890struct FilterOption_t {
    89   FilterOption_t () {type=booleant; repeatable=onePerQuery;}
     91  void clear ();
     92  FilterOption_t () {clear();}
    9093
    9194  text_t name;
     
    126129// }
    127130struct FilterDescript_t {
     131  void clear ();
     132
    128133  text_t filterName;
    129134  FilterOption_tset filterOptions;
     
    142147// }
    143148struct InfoFilterOptionsResponse_t {
     149  void clear ();
     150
    144151  FilterDescript_tset filterOptions;
    145152};
     
    152159// }
    153160struct OptionValue_t {
     161  void clear ();
     162
    154163  text_t name;
    155164  text_t value;
     
    179188
    180189struct FilterRequest_t {
    181   FilterRequest_t () {filterResultOptions=0;}
     190  void clear ();
     191  FilterRequest_t () {clear();}
    182192
    183193  text_t filterName;
     
    194204// }
    195205struct TermInfo_t {
    196   TermInfo_t () {freq=0;}
     206  void clear ();
     207  TermInfo_t () {clear();}
    197208
    198209  text_t term;
     
    210221// }
    211222struct ResultDocInfo_t {
    212   ResultDocInfo_t () {ranking=0.0;}
     223  void clear ();
     224  ResultDocInfo_t () {clear();}
    213225
    214226  text_t OID;
     
    231243// }
    232244struct FilterResponse_t {
    233   FilterResponse_t () {docsFound=0; isApprox=false;}
     245  void clear ();
     246  FilterResponse_t () {clear();}
    234247
    235248  int docsFound;
     
    246259// }
    247260struct MetadataInfoResponse_t {
     261  void clear ();
     262
    248263  text_tset supportedFields;
    249264  text_tset supportedLanguages;
     
    256271// }
    257272struct MetadataRequest_t {
     273  void clear ();
     274
    258275  text_tarray OIDs;
    259276  text_tarray fields;
     
    268285// }
    269286struct MetadataResponse_t {
     287  void clear ();
     288
    270289  text_tarray metadata;
    271290};
Note: See TracChangeset for help on using the changeset viewer.