37 lines
No EOL
587 B
C++
Executable file
37 lines
No EOL
587 B
C++
Executable file
#include <iostream>
|
|
#include <vector>
|
|
|
|
using namespace std;
|
|
|
|
//Funtional, might need more functionality
|
|
|
|
template<typename T>
|
|
class Attribute {
|
|
//a named column of a relation
|
|
string name;
|
|
vector<T> values;
|
|
bool isKey;
|
|
int size;
|
|
public:
|
|
Attribute(){ }
|
|
|
|
Attribute(vector<T> v){
|
|
this.values = v;
|
|
}
|
|
|
|
Attribute(const Attribute<T>& a){
|
|
this.values = a.getAll();
|
|
}
|
|
|
|
Attribute& operator=(const Attribute<T>& a){
|
|
this.values = a.getAll();
|
|
}
|
|
|
|
string getName(){
|
|
return name;
|
|
}
|
|
|
|
vector<T> getAll(){
|
|
return this.values;
|
|
}
|
|
}; |