/*------------------------------------------------------------------------------ * function: AttrProj::ReadWholeRec * Read an entire record (not its projections). */ DevStatus AttrProj::ReadWholeRec(RecId recId, Vector &vector) { DO_DEBUG(printf("AttrProj::ReadWholeRec()\n")); DevStatus result = StatusOk; _tDataP->InitGetRecs(recId, recId); int dataSize; int numRecs; if (!_tDataP->GetRecs(_recBuf, _recBufSize, recId, numRecs, dataSize)) { result = StatusFailed; } else { AttrList * attrListP = _tDataP->GetAttrList(); int attrNum = 0; attrListP->InitIterator(); while (attrListP->More()) { AttrInfo *attrInfoP = attrListP->Next(); vector.value[attrNum] = AttrToDouble(attrInfoP->type, _recBuf + attrInfoP->offset); attrNum++; } attrListP->DoneIterator(); } return result; }
/*------------------------------------------------------------------------------ * function: AttrProj::GetWholeRecSize * Returns information about the size of data that will be produced when * an entire record (not its projections) is read. */ DevStatus AttrProj::GetWholeRecSize(int &attrCount, int &recSize) { DO_DEBUG(printf("AttrProj::GetWholeRecSize()\n")); DevStatus result = StatusOk; attrCount = 0; recSize = 0; AttrList *attrListP = _tDataP->GetAttrList(); attrListP->InitIterator(); while (attrListP->More()) { AttrInfo *attrInfoP = attrListP->Next(); attrCount++; recSize += sizeof(VECTOR_TYPE); } attrListP->DoneIterator(); return result; }