--- trunk/OOPSE/libmdtools/GenericData.cpp 2003/08/12 17:51:33 682 +++ trunk/OOPSE/libmdtools/GenericData.cpp 2004/06/04 03:15:31 1234 @@ -1,5 +1,7 @@ #include "GenericData.hpp" - +//////////////////////////////////////////////////////////////////////////////// +//Implementation of GenericData +//////////////////////////////////////////////////////////////////////////////// GenericData::GenericData(){ id = "undefined"; @@ -16,10 +18,35 @@ GenericData& GenericData::operator = (const GenericDat return *this; } +//////////////////////////////////////////////////////////////////////////////// +//Implementation of ZConsParaData +//////////////////////////////////////////////////////////////////////////////// ZConsParaData::ZConsParaData(){ id = ZCONSPARADATA_ID; } void ZConsParaData::sortByIndex(){ sort(data.begin(), data.end(), ZConsParaSortCriterion()); +} +bool ZConsParaData::isIndexUnique(){ + + for(int i = 0; i < (int)(data.size() - 1); i++) + for(int j = i + 1; j < (int)(data.size()); j++) + if(data[i].zconsIndex == data[j].zconsIndex) + return false; + + return true; +} + +//////////////////////////////////////////////////////////////////////////////// +//Implementation of AtomData +//////////////////////////////////////////////////////////////////////////////// +AtomData::~AtomData(){ + vector::iterator i; + AtomInfo* atomInfo; + + for(atomInfo = beginAtomInfo(i); atomInfo; atomInfo = nextAtomInfo(i)) + delete atomInfo; + + data.clear(); } \ No newline at end of file