#include <iostream>
#include <vector>
#include "Attribute.h"
Attribute::Attribute(){
name = "";
type = "";
key = 0;
size = 0;
}
Attribute::Attribute(string n, string t, bool k){
name = n;
type = t;
key = k;
void Attribute::addCell(string v){
values.push_back(v);
size++;
string Attribute::operator[](int i){
return values[i];
vector<string> Attribute::getValues(){
return values;
string Attribute::getName(){
return name;
void Attribute::setName(string s){
name = s;
string Attribute::getType(){
return type;
bool Attribute::isKey(){
return key;
int Attribute::getSize(){
return size;
void Attribute::display(){
cout << "-------------\n";
cout << name << "\n" << type << "\n\n";
vector<string>::iterator it = values.begin();
while (it != values.end()){
cout << *it << "\n";
it++;
void Attribute::clearAllValues(){
values.clear();