#include <Query.h>
Public Member Functions | |
Query (Table *table, const std::vector< std::string > *toSelect=0, Assertion *pAssert=0) | |
~Query () | |
const std::vector< std::string > & | getToSelect () const |
const Assertion * | getAssertion () const |
const Table * | getTable () const |
void | addSelect (const std::string &col) |
Visitor::VisitorState | accept (Visitor *v) |
Private Attributes | |
Table * | m_myTable |
std::vector< std::string > | m_toSelect |
Assertion * | m_assert |
Definition at line 18 of file Query.h.
rdbModel::Query::Query | ( | Table * | table, | |
const std::vector< std::string > * | toSelect = 0 , |
|||
Assertion * | pAssert = 0 | |||
) |
Definition at line 8 of file Query.cxx.
References genRecEmupikp::i, and m_toSelect.
00009 : m_myTable(table), m_assert(pAssert) { 00010 m_toSelect.clear(); 00011 00012 if (toSelect != 0) { 00013 unsigned n = toSelect->size(); 00014 m_toSelect.reserve(n); 00015 for (unsigned i = 0; i < n; i++) { 00016 m_toSelect.push_back((*toSelect)[i]); 00017 } 00018 } 00019 00020 }
rdbModel::Query::~Query | ( | ) |
Definition at line 22 of file Query.cxx.
References m_toSelect.
00022 { 00023 m_toSelect.clear(); 00024 // delete pAssert; // ?? This is probably already done by ~Table 00025 }
Visitor::VisitorState rdbModel::Query::accept | ( | Visitor * | v | ) |
Definition at line 27 of file Query.cxx.
References v, rdbModel::Visitor::VBRANCHDONE, and rdbModel::Visitor::VCONTINUE.
00027 { 00028 Visitor::VisitorState state = v->visitQuery(this); 00029 if (state == Visitor::VBRANCHDONE) return Visitor::VCONTINUE; 00030 return state; 00031 }
void rdbModel::Query::addSelect | ( | const std::string & | col | ) | [inline] |
Definition at line 27 of file Query.h.
References m_toSelect.
00027 { 00028 m_toSelect.push_back(col); 00029 }
const Assertion* rdbModel::Query::getAssertion | ( | ) | const [inline] |
const Table* rdbModel::Query::getTable | ( | ) | const [inline] |
const std::vector<std::string>& rdbModel::Query::getToSelect | ( | ) | const [inline] |
Assertion* rdbModel::Query::m_assert [private] |
Table* rdbModel::Query::m_myTable [private] |
std::vector<std::string> rdbModel::Query::m_toSelect [private] |
Definition at line 37 of file Query.h.
Referenced by addSelect(), getToSelect(), Query(), and ~Query().