diff --git a/Attribute.h b/Attribute.h index 9d8587b..6621b08 100755 --- a/Attribute.h +++ b/Attribute.h @@ -9,41 +9,29 @@ using namespace std; class Attribute { //a named column of a relation string name; - string type; - bool key; + bool isKey; int size; public: + vector values; - - Attribute(string n, string t, bool k){ + + void initializeAttribute(string n, vector a){ + name = n; - type = t; - key = k; - size = 0; - } - - void addRow(string v) { - values.push_back(v); + values = a; } string getName(){ return name; } - string getType(){ - return type; - } - - bool isKey(){ - return key; - } + Attribute(){ } void display() { - cout<<"Atribute name:\t"< v){ + this.values = v; + } + + Attribute(const Attribute& a){ + this.values = a.getAll(); + } + + Attribute& operator=(const Attribute& a){ + this.values = a.getAll(); + } + + + + vector getAll(){ + return this.values; + } +*/ };