2013-11-18 20:25:19 +01:00
|
|
|
//#include <iostream>
|
2013-11-12 20:56:28 +01:00
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
#include "PrimImplikant.h"
|
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
|
2013-11-12 21:58:33 +01:00
|
|
|
#ifndef PRIMIMPLIKANTCOLLEC
|
|
|
|
#define PRIMIMPLIKANTCOLLEC
|
|
|
|
|
2013-11-12 20:56:28 +01:00
|
|
|
class PrimImplikantCollection{
|
|
|
|
public:
|
2013-11-12 21:58:33 +01:00
|
|
|
void add(PrimImplikant* &PI);
|
2013-11-12 20:56:28 +01:00
|
|
|
void add(string input);
|
2013-11-14 14:45:25 +01:00
|
|
|
void add(unsigned int input);
|
|
|
|
void add(unsigned int input1, unsigned int input2);
|
2013-11-12 20:56:28 +01:00
|
|
|
|
2013-11-14 14:45:25 +01:00
|
|
|
bool valueAt(unsigned int position);
|
|
|
|
PrimImplikantCollection primImplikantenAt(unsigned int position);
|
2013-11-12 23:48:24 +01:00
|
|
|
|
2013-11-12 21:58:33 +01:00
|
|
|
unsigned int size();
|
2013-11-12 23:48:24 +01:00
|
|
|
PrimImplikant* back();
|
|
|
|
PrimImplikant* front();
|
2013-11-14 14:45:25 +01:00
|
|
|
PrimImplikant* at(unsigned int const &index);
|
|
|
|
PrimImplikant* operator[](unsigned int const &index);
|
|
|
|
const PrimImplikant* operator[](unsigned int const &index) const;
|
2013-11-12 20:56:28 +01:00
|
|
|
|
2013-11-12 23:58:15 +01:00
|
|
|
~PrimImplikantCollection() // destructor
|
|
|
|
{
|
|
|
|
for (unsigned int i = 0; i < this->size(); i++)
|
|
|
|
delete this->at(i);
|
|
|
|
}
|
2013-11-12 20:56:28 +01:00
|
|
|
private:
|
2013-11-12 21:58:33 +01:00
|
|
|
vector<PrimImplikant*> PIVector;
|
2013-11-12 20:56:28 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|