ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-4/src/utils/GenericData.cpp
(Generate patch)

Comparing trunk/OOPSE-4/src/utils/GenericData.cpp (file contents):
Revision 1624 by tim, Fri Sep 24 16:27:58 2004 UTC vs.
Revision 1625 by tim, Thu Oct 21 16:22:01 2004 UTC

# Line 1 | Line 1
1   #include "utils/GenericData.hpp"
2 ////////////////////////////////////////////////////////////////////////////////
3 //Implementation of GenericData
4 ////////////////////////////////////////////////////////////////////////////////
5 GenericData::GenericData(){
2  
7  id = "undefined";
8
9 }
10
11 GenericData& GenericData::operator = (const GenericData& rhs){
12  
13  if(this == &rhs)
14    return (*this);
15  
16  id = rhs.id;
17  
18  return *this;
19 }
20
3   ////////////////////////////////////////////////////////////////////////////////
4   //Implementation of ZConsParaData
5   ////////////////////////////////////////////////////////////////////////////////
24 ZConsParaData::ZConsParaData(){
25  id = ZCONSPARADATA_ID;
26 }
6  
28 void ZConsParaData::sortByIndex(){
29  sort(data.begin(), data.end(), ZConsParaSortCriterion());
30 }
31 bool ZConsParaData::isIndexUnique(){
32  
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;  
7  
38  return true;
39 }
40
8   ////////////////////////////////////////////////////////////////////////////////
9   //Implementation of AtomData
10   ////////////////////////////////////////////////////////////////////////////////
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 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines