00001 // $Header: /bes/bes/BossCvs/Calibration/rdbModel/src/Tables/InterRow.cxx,v 1.1.1.1 2005/10/17 06:10:53 maqm Exp $ 00002 00003 #include "rdbModel/Tables/Query.h" 00004 #include "rdbModel/Tables/Set.h" 00005 #include "rdbModel/Tables/InterRow.h" 00006 00007 namespace rdbModel { 00008 00009 InterRow::InterRow(Table* table, Query* query, bool quit) 00010 : m_myTable(table), m_query(query), m_quit(quit) { 00011 m_sets.clear(); 00012 } 00013 00014 InterRow::~InterRow() { 00015 delete m_query; 00016 00017 // Don't know yet whether anything more needs to be done here 00018 m_sets.clear(); 00019 } 00020 00021 void InterRow::addSet(const Set& set) { 00022 m_sets.push_back(set); 00023 } 00024 00025 00026 Visitor::VisitorState InterRow::accept(Visitor* v) { 00027 Visitor::VisitorState state = v->visitInterRow(this); 00028 if (state == Visitor::VBRANCHDONE) return Visitor::VCONTINUE; 00029 00030 unsigned n = m_sets.size(); 00031 for (unsigned i = 0; i < n; i++) { 00032 state = m_sets[i].accept(v); 00033 if (state != Visitor::VCONTINUE) return state; 00034 } 00035 return state; 00036 } 00037 00038 }