#include <RegisterReference.h>
Public Member Functions | |
| ~RegisterSetBinding () | |
| RegisterSetBinding (TupleData *base, bool ownIt=false) | |
| binds a register set to a tuple | |
| RegisterSetBinding (TupleData *base, const TupleData *shadow, bool ownIt=false) | |
| bind an output register set bound to a tuple, with supplementary target address info. | |
| const TupleData & | asTupleData () const |
| view the register set as a tuple (read-only) | |
| TupleDatum & | operator[] (int n) |
| get the Nth register | |
| PConstBuffer | getTargetAddr (int n) |
| get the target address of the Nth register | |
Private Attributes | |
| const bool | ownTheBase |
| uint | ncols |
| TupleData *const | base |
| PConstBuffer * | datumAddr |
Definition at line 49 of file RegisterReference.h.
| RegisterSetBinding::~RegisterSetBinding | ( | ) |
Definition at line 34 of file RegisterReference.cpp.
References base, datumAddr, and ownTheBase.
00035 { 00036 if (ownTheBase) { 00037 delete base; 00038 } 00039 delete[] datumAddr; 00040 }
| RegisterSetBinding::RegisterSetBinding | ( | TupleData * | base, | |
| bool | ownIt = false | |||
| ) |
binds a register set to a tuple
| base | the underlying tuple | |
| ownIt | the RegisterSetBinding takes ownership of the TupleData |
Definition at line 42 of file RegisterReference.cpp.
References base, datumAddr, and ncols.
00043 : ownTheBase(ownIt), base(base) 00044 { 00045 assert(base); 00046 ncols = base->size(); 00047 datumAddr = new PConstBuffer[ncols]; 00048 for (int i = 0; i < ncols; i++) { 00049 const TupleDatum& baseCol = (*base)[i]; 00050 datumAddr[i] = baseCol.pData; 00051 } 00052 }
| RegisterSetBinding::RegisterSetBinding | ( | TupleData * | base, | |
| const TupleData * | shadow, | |||
| bool | ownIt = false | |||
| ) |
bind an output register set bound to a tuple, with supplementary target address info.
| base | the underlying tuple (some columns may be null) | |
| shadow | Equivalent to base, but all TupleDatum elements have a non-null address. | |
| ownIt | the RegisterSetBinding takes ownership of the TupleData |
Definition at line 54 of file RegisterReference.cpp.
References base, datumAddr, ncols, and TupleDatum::pData.
00058 : ownTheBase(ownIt), 00059 base(base) 00060 { 00061 assert(base); 00062 ncols = base->size(); 00063 assert(shadow->size() == ncols); 00064 datumAddr = new PConstBuffer[ncols]; 00065 for (int i = 0; i < ncols; i++) { 00066 const TupleDatum& baseCol = (*base)[i]; 00067 const TupleDatum& shadowCol = (*shadow)[i]; 00068 datumAddr[i] = shadowCol.pData; 00069 // check that SHADOW coincides with BASE 00070 if (baseCol.pData) { 00071 assert(baseCol.pData == shadowCol.pData); 00072 } else { 00073 assert(shadowCol.pData); 00074 } 00075 } 00076 }
| const TupleData& RegisterSetBinding::asTupleData | ( | ) | const [inline] |
view the register set as a tuple (read-only)
Definition at line 83 of file RegisterReference.h.
Referenced by Calculator::getStatusRegister(), and Calculator::zeroStatusRegister().
00083 { 00084 return *base; 00085 }
| TupleDatum& RegisterSetBinding::operator[] | ( | int | n | ) | [inline] |
| PConstBuffer RegisterSetBinding::getTargetAddr | ( | int | n | ) | [inline] |
const bool RegisterSetBinding::ownTheBase [private] |
uint RegisterSetBinding::ncols [private] |
TupleData* const RegisterSetBinding::base [private] |
Definition at line 53 of file RegisterReference.h.
Referenced by RegisterSetBinding(), and ~RegisterSetBinding().
PConstBuffer* RegisterSetBinding::datumAddr [private] |
Definition at line 54 of file RegisterReference.h.
Referenced by RegisterSetBinding(), and ~RegisterSetBinding().
1.5.1