Change way of ID generation

This commit is contained in:
Jonny007-MKD 2014-01-05 19:20:51 +01:00
parent e14e3b15d8
commit d31fba386d
2 changed files with 5 additions and 3 deletions

View file

@ -14,21 +14,21 @@ void PrimImplikantCollection::add(string input)
{
PrimImplikant* PI = new PrimImplikant(input);
PI->id = this->size();
PI->id = PrimImplikantCollection::globalCount++;
this->setgroupCollection1(PI);
this->add(PI);
}
void PrimImplikantCollection::add(uint input)
{
PrimImplikant* PI = new PrimImplikant(input);
PI->id = this->size();
PI->id = PrimImplikantCollection::globalCount++;
this->setgroupCollection1(PI);
this->add(PI);
}
void PrimImplikantCollection::add(uint input1, uint input2)
{
PrimImplikant* PI = new PrimImplikant(input1, input2);
PI->id = this->size();
PI->id = PrimImplikantCollection::globalCount++;
this->setgroupCollection1(PI);
this->add(PI);
}

View file

@ -35,6 +35,8 @@ public:
PrimImplikant* operator[](uint &index);
private:
vector<PrimImplikant*> PIVector;
static uint globalCount = 0;
};
#endif