00001
00002 #ifndef RDBMODEL_SET_H
00003 #define RDBMODEL_SET_H
00004 #include <vector>
00005 #include <string>
00006 #include "rdbModel/Rdb.h"
00007 #include "rdbModel/Management/Visitor.h"
00008 #include "rdbModel/Tables/Column.h"
00009 #include "rdbModel/Tables/Table.h"
00010 namespace rdbModel{
00011 class Table;
00021 class Set {
00022 public:
00023 Set(Table* table, const std::string& destColName,
00024 FIELDTYPE destType,
00025 const std::string& srcValue, FIELDTYPE srcType,
00026 const std::string& interp = std::string("")) :
00027 m_myTable(table), m_destCol(destColName), m_destType(destType),
00028 m_srcValue(srcValue), m_srcType(srcType), m_interp(interp) {}
00035 ~Set() {}
00036
00037 Visitor::VisitorState accept(Visitor* v);
00038 const std::string& getDestColName() const {return m_destCol;}
00039 FIELDTYPE getDestType() const {return m_destType;}
00040
00041 const std::string& getSrcValue() const {return m_srcValue;}
00042 FIELDTYPE getSrcType() const {return m_srcType;}
00043 const std::string& getInterp() const {return m_interp;}
00044
00045 bool hasInterp() const {return (m_interp.size() > 0);}
00046
00047 private:
00048 Table* m_myTable;
00049
00050 std::string m_destCol;
00051 FIELDTYPE m_destType;
00053 std::string m_srcValue;
00055 FIELDTYPE m_srcType;
00056 std::string m_interp;
00057 };
00058 }
00059 #endif
00060