Ignore:
Timestamp:
1999-10-15T12:02:34+13:00 (25 years ago)
Author:
sjboddie
Message:

fixed bug in new parent metadata stuff

File:
1 edited

Legend:

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

    r648 r671  
    2828/*
    2929   $Log$
     30   Revision 1.20  1999/10/14 23:02:34  sjboddie
     31   fixed bug in new parent metadata stuff
     32
    3033   Revision 1.19  1999/10/10 07:49:35  sjboddie
    3134   - metadata now returns map rather than array
     
    234237  isRef = false;
    235238  values.erase(values.begin(), values.end());
    236   parent = NULL;
    237 }
    238 
     239  if (parent != NULL) {
     240    delete parent;
     241    parent = NULL;
     242  }
     243}
     244
     245MetadataInfo_t::MetadataInfo_t () {parent=NULL;clear();}
     246
     247// copy constructor
     248MetadataInfo_t::MetadataInfo_t (const MetadataInfo_t &x) {
     249  params = x.params;
     250  isRef = x.isRef;
     251  values = x.values;
     252  if (x.parent == NULL) parent = NULL;
     253  else {
     254    parent = new MetadataInfo_t ();
     255    *parent = *(x.parent);
     256  }
     257}
     258
     259MetadataInfo_t::~MetadataInfo_t () {
     260  if (parent != NULL) {
     261    delete parent;
     262    parent = NULL;
     263  }
     264}
     265
     266MetadataInfo_t &MetadataInfo_t::operator=(const MetadataInfo_t &x) {
     267  if (&x != this) {
     268    params = x.params;
     269    isRef = x.isRef;
     270    values = x.values;
     271    if (x.parent == NULL) parent = NULL;
     272    else {
     273      parent = new MetadataInfo_t ();
     274      *parent = *(x.parent);
     275    }
     276  }
     277  return *this;
     278}
    239279
    240280void ResultDocInfo_t::clear () {
Note: See TracChangeset for help on using the changeset viewer.