00001 #ifndef _INTVECTORVAL_H_
00002 #define _INTVECTORVAL_H_
00003
00004 #include "DBValue.h"
00005
00006 using namespace std;
00007
00008
00009 class IntVectorVal : public DBValue{
00010 private:
00011 vector<int> val;
00012 public:
00013 IntVectorVal(){isNull=true;};
00014 IntVectorVal(vector<int> v){val=v;isNull=false;};
00015 string getType(){
00016 return "vector<int>";
00017 }
00018
00019 vector<int> getIntVector(){
00020 if(isNull){
00021 return vector<int>();
00022 }
00023 return val;
00024 }
00025
00026 void setIntVector(vector<int> v){val=v;isNull=false;};
00027
00028 string toString(){
00029 ostringstream oss;
00030 if(isNull)
00031 oss<<"";
00032 else{
00033 for(vector<int>::const_iterator itr=val.begin();itr!=val.end();itr++){
00034 oss<<(*itr)<<" ";
00035 }
00036 }
00037 return oss.str();
00038 }
00039 };
00040 #endif