Update Attribute.h

This commit is contained in:
Brandon Jackson 2015-09-15 21:39:24 -05:00
parent b2e36b3056
commit cf5ad99b9f

View file

@ -9,7 +9,6 @@ using namespace std;
class Attribute {
//a named column of a relation
string name;
bool isKey;
int size;
@ -31,17 +30,40 @@ public:
void display()
{
cout<<"Atribute name:\t"<<name<<"\n";
cout<<"Elements: ";
//cout<<"\nAtribute name:\t"<<name<<"\n";
//cout<<"Elements: ";
for (int i = 0; i < values.size(); ++i)
{
cout<<values[i]<<" ";
}
}
/*
vector<string> getElements(){
return values;
int getSize()
{
return values.size();
}
*/
void pushBack(string s)
{
values.push_back(s);
}
/*
Attribute(vector<string> v){
this.values = v;
}
Attribute(const Attribute<string>& a){
this.values = a.getAll();
}
Attribute& operator=(const Attribute<string>& a){
this.values = a.getAll();
}
vector<string> getAll(){
return this.values;
}
*/
};