rdbModel::InsertNew Class Reference

#include <InsertNew.h>

List of all members.

Public Member Functions

 InsertNew (Table *table, Assertion *internal, Assertion *official)
 ~InsertNew ()
const AssertiongetInternal () const
const AssertiongetOfficial () const
const std::vector< InterRow * > & getInterRow () const
const TablegetTable () const
Visitor::VisitorState accept (Visitor *v)
void addInterRow (InterRow *interRow)

Private Attributes

Tablem_myTable
Assertionm_internal
 internal consistency conditions
Assertionm_official
 conditions to be satisfied to show row is worth the extra trouble
std::vector< InterRow * > m_interRow


Detailed Description

Keep track of constraints on insertion of new row, not intended to replace any existing row. o Internal constraints to insure new row is self-consistent o Look for conflicts with existing rows; specify what to do to correct if found.

Definition at line 21 of file InsertNew.h.


Constructor & Destructor Documentation

rdbModel::InsertNew::InsertNew ( Table table,
Assertion internal,
Assertion official 
) [inline]

Definition at line 23 of file InsertNew.h.

References m_interRow.

00024       : m_myTable(table), m_internal(internal), m_official(official) {
00025       m_interRow.clear();
00026     }

rdbModel::InsertNew::~InsertNew (  ) 

Definition at line 10 of file InsertNew.cxx.

References genRecEmupikp::i, and m_interRow.

00010                         {
00011     while (m_interRow.size() ) {
00012       InterRow* i  = m_interRow.back();
00013       m_interRow.pop_back();
00014       delete i;
00015     }
00016   }


Member Function Documentation

Visitor::VisitorState rdbModel::InsertNew::accept ( Visitor v  ) 

Definition at line 18 of file InsertNew.cxx.

References genRecEmupikp::i, m_interRow, v, rdbModel::Visitor::VBRANCHDONE, and rdbModel::Visitor::VCONTINUE.

00018                                                   {
00019     Visitor::VisitorState state = v->visitInsertNew(this);
00020     if (state == Visitor::VBRANCHDONE) return Visitor::VCONTINUE;
00021 
00022     unsigned n = m_interRow.size();
00023     for (unsigned i = 0; i < n; i++) {
00024       state = m_interRow[i]->accept(v);
00025       if (state != Visitor::VCONTINUE) return state;
00026     }
00027     return state;
00028   }

void rdbModel::InsertNew::addInterRow ( InterRow interRow  )  [inline]

Definition at line 39 of file InsertNew.h.

References m_interRow.

Referenced by rdbModel::XercesBuilder::buildInsertNew().

00039 {m_interRow.push_back(interRow);}

const Assertion* rdbModel::InsertNew::getInternal (  )  const [inline]

Definition at line 30 of file InsertNew.h.

References m_internal.

Referenced by rdbModel::Table::insertLatest().

00030 {return m_internal;}

const std::vector<InterRow*>& rdbModel::InsertNew::getInterRow (  )  const [inline]

Definition at line 32 of file InsertNew.h.

References m_interRow.

Referenced by rdbModel::Table::insertLatest().

00032 {return m_interRow;}

const Assertion* rdbModel::InsertNew::getOfficial (  )  const [inline]

Definition at line 31 of file InsertNew.h.

References m_official.

Referenced by rdbModel::Table::insertLatest().

00031 {return m_official;}

const Table* rdbModel::InsertNew::getTable (  )  const [inline]

Definition at line 34 of file InsertNew.h.

References m_myTable.

00034 {return m_myTable;}


Member Data Documentation

Assertion* rdbModel::InsertNew::m_internal [private]

internal consistency conditions

Definition at line 46 of file InsertNew.h.

Referenced by getInternal().

std::vector<InterRow*> rdbModel::InsertNew::m_interRow [private]

Definition at line 49 of file InsertNew.h.

Referenced by accept(), addInterRow(), getInterRow(), InsertNew(), and ~InsertNew().

Table* rdbModel::InsertNew::m_myTable [private]

Definition at line 43 of file InsertNew.h.

Referenced by getTable().

Assertion* rdbModel::InsertNew::m_official [private]

conditions to be satisfied to show row is worth the extra trouble

Definition at line 48 of file InsertNew.h.

Referenced by getOfficial().


Generated on Tue Nov 29 23:36:36 2016 for BOSS_7.0.2 by  doxygen 1.4.7