本文整理汇总了C++中PCOL::ReadColumn方法的典型用法代码示例。如果您正苦于以下问题:C++ PCOL::ReadColumn方法的具体用法?C++ PCOL::ReadColumn怎么用?C++ PCOL::ReadColumn使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PCOL
的用法示例。
在下文中一共展示了PCOL::ReadColumn方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ReadDB
int TDBPIVOT::ReadDB(PGLOBAL g)
{
int rc = RC_OK;
bool newrow = FALSE;
PCOL colp;
if (FileStatus == 2)
return RC_EF;
if (FileStatus)
for (colp = Columns; colp; colp = colp->GetNext())
if (colp->GetAmType() == TYPE_AM_SRC)
((PSRCCOL)colp)->SetColumn();
// New row, reset all function column values
for (colp = Columns; colp; colp = colp->GetNext())
if (colp->GetAmType() == TYPE_AM_FNC)
colp->GetValue()->Reset();
/*********************************************************************/
/* Now start the multi reading process. */
/*********************************************************************/
do {
if (RowFlag != 1) {
if ((rc = Tdbp->ReadDB(g)) != RC_OK) {
if (FileStatus && rc == RC_EF) {
// A prepared row remains to be sent
FileStatus = 2;
rc = RC_OK;
} // endif FileStatus
break;
} // endif rc
for (colp = Tdbp->GetColumns(); colp; colp = colp->GetNext())
colp->ReadColumn(g);
for (colp = Columns; colp; colp = colp->GetNext())
if (colp->GetAmType() == TYPE_AM_SRC)
if (FileStatus) {
if (((PSRCCOL)colp)->CompareLast()) {
newrow = (RowFlag) ? TRUE : FALSE;
break;
} // endif CompareLast
} else
((PSRCCOL)colp)->SetColumn();
FileStatus = 1;
} // endif RowFlag
if (newrow) {
RowFlag = 1;
break;
} else
RowFlag = 2;
// Look for the column having this header
for (colp = Columns; colp; colp = colp->GetNext())
if (colp->GetAmType() == TYPE_AM_FNC) {
if (((PFNCCOL)colp)->CompareColumn())
break;
} // endif AmType
if (!colp && !(colp = Dcolp)) {
if (!Accept) {
strcpy(g->Message, MSG(NO_MATCH_COL));
return RC_FX;
} else
continue;
} // endif colp
// Set the value of the matching column from the fonction value
colp->GetValue()->SetValue_pval(Fcolp->GetValue());
} while (RowFlag == 2);
N++;
return rc;
} // end of ReadDB