| 16 |
|
return *this; |
| 17 |
|
} |
| 18 |
|
|
| 19 |
< |
IndexData::IndexData(){ |
| 20 |
< |
|
| 21 |
< |
id = "IndexData"; |
| 22 |
< |
|
| 19 |
> |
ZConsParaData::ZConsParaData(){ |
| 20 |
> |
id = ZCONSPARADATA_ID; |
| 21 |
|
} |
| 22 |
|
|
| 23 |
< |
IndexData::IndexData(const IndexData& rhs) |
| 24 |
< |
: GenericData(rhs), indexData(rhs.indexData){ |
| 27 |
< |
|
| 23 |
> |
void ZConsParaData::sortByIndex(){ |
| 24 |
> |
sort(data.begin(), data.end(), ZConsParaSortCriterion()); |
| 25 |
|
} |
| 26 |
< |
|
| 30 |
< |
IndexData& IndexData::operator = (const IndexData& rhs){ |
| 26 |
> |
bool ZConsParaData::isIndexUnique(){ |
| 27 |
|
|
| 28 |
< |
if(this == &rhs) |
| 29 |
< |
return (*this); |
| 30 |
< |
|
| 31 |
< |
//chain to base class |
| 36 |
< |
GenericData::operator =(rhs); |
| 37 |
< |
|
| 38 |
< |
indexData = rhs.indexData; |
| 39 |
< |
|
| 40 |
< |
return (*this); |
| 28 |
> |
for(int i = 0; i < data.size() - 1; i++) |
| 29 |
> |
for(int j = i + 1; j < data.size(); j++) |
| 30 |
> |
if(data[i].zconsIndex == data[j].zconsIndex) |
| 31 |
> |
return false; |
| 32 |
|
|
| 33 |
+ |
return true; |
| 34 |
|
} |