| 1 | 
  | 
#include "GenericData.hpp" | 
| 2 | 
< | 
 | 
| 2 | 
> | 
//////////////////////////////////////////////////////////////////////////////// | 
| 3 | 
> | 
//Implementation of GenericData | 
| 4 | 
> | 
//////////////////////////////////////////////////////////////////////////////// | 
| 5 | 
  | 
GenericData::GenericData(){ | 
| 6 | 
  | 
 | 
| 7 | 
  | 
  id = "undefined"; | 
| 18 | 
  | 
  return *this; | 
| 19 | 
  | 
} | 
| 20 | 
  | 
 | 
| 21 | 
< | 
IndexData::IndexData(){ | 
| 22 | 
< | 
 | 
| 23 | 
< | 
  id = "IndexData"; | 
| 24 | 
< | 
 | 
| 21 | 
> | 
//////////////////////////////////////////////////////////////////////////////// | 
| 22 | 
> | 
//Implementation of ZConsParaData | 
| 23 | 
> | 
//////////////////////////////////////////////////////////////////////////////// | 
| 24 | 
> | 
ZConsParaData::ZConsParaData(){ | 
| 25 | 
> | 
  id = ZCONSPARADATA_ID; | 
| 26 | 
  | 
} | 
| 27 | 
  | 
 | 
| 28 | 
< | 
IndexData::IndexData(const IndexData& rhs) | 
| 29 | 
< | 
               : GenericData(rhs), indexData(rhs.indexData){ | 
| 27 | 
< | 
 | 
| 28 | 
> | 
void ZConsParaData::sortByIndex(){ | 
| 29 | 
> | 
  sort(data.begin(), data.end(), ZConsParaSortCriterion()); | 
| 30 | 
  | 
} | 
| 31 | 
< | 
 | 
| 30 | 
< | 
IndexData& IndexData::operator = (const IndexData& rhs){ | 
| 31 | 
> | 
bool ZConsParaData::isIndexUnique(){ | 
| 32 | 
  | 
   | 
| 33 | 
< | 
  if(this == &rhs) | 
| 34 | 
< | 
    return (*this); | 
| 35 | 
< | 
     | 
| 36 | 
< | 
  //chain to base class   | 
| 36 | 
< | 
  GenericData::operator =(rhs); | 
| 37 | 
< | 
   | 
| 38 | 
< | 
  indexData = rhs.indexData; | 
| 39 | 
< | 
   | 
| 40 | 
< | 
  return (*this); | 
| 33 | 
> | 
  for(int i = 0; i < (int)(data.size() - 1); i++) | 
| 34 | 
> | 
    for(int j = i + 1; j < (int)(data.size()); j++) | 
| 35 | 
> | 
      if(data[i].zconsIndex == data[j].zconsIndex) | 
| 36 | 
> | 
        return false;   | 
| 37 | 
  | 
 | 
| 38 | 
+ | 
  return true; | 
| 39 | 
  | 
} | 
| 40 | 
+ | 
 | 
| 41 | 
+ | 
//////////////////////////////////////////////////////////////////////////////// | 
| 42 | 
+ | 
//Implementation of AtomData | 
| 43 | 
+ | 
//////////////////////////////////////////////////////////////////////////////// | 
| 44 | 
+ | 
AtomData::~AtomData(){ | 
| 45 | 
+ | 
  vector<AtomInfo*>::iterator i; | 
| 46 | 
+ | 
  AtomInfo* atomInfo; | 
| 47 | 
+ | 
 | 
| 48 | 
+ | 
  for(atomInfo = beginAtomInfo(i); atomInfo; atomInfo  = nextAtomInfo(i)) | 
| 49 | 
+ | 
    delete atomInfo; | 
| 50 | 
+ | 
 | 
| 51 | 
+ | 
  data.clear(); | 
| 52 | 
+ | 
} |