本文整理汇总了C++中DDFRecord::Clone方法的典型用法代码示例。如果您正苦于以下问题:C++ DDFRecord::Clone方法的具体用法?C++ DDFRecord::Clone怎么用?C++ DDFRecord::Clone使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DDFRecord
的用法示例。
在下文中一共展示了DDFRecord::Clone方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
DDFField *SDTSAttrReader::GetNextRecord( SDTSModId * poModId,
DDFRecord ** ppoRecord,
int bDuplicate )
{
DDFRecord *poRecord;
DDFField *poATTP;
/* -------------------------------------------------------------------- */
/* Fetch a record. */
/* -------------------------------------------------------------------- */
if( ppoRecord != NULL )
*ppoRecord = NULL;
if( oDDFModule.GetFP() == NULL )
return NULL;
poRecord = oDDFModule.ReadRecord();
if( poRecord == NULL )
return NULL;
/* -------------------------------------------------------------------- */
/* Make a copy of the record for persistent use if requested by */
/* the caller. */
/* -------------------------------------------------------------------- */
if( bDuplicate )
poRecord = poRecord->Clone();
/* -------------------------------------------------------------------- */
/* Find the ATTP field. */
/* -------------------------------------------------------------------- */
poATTP = poRecord->FindField( "ATTP", 0 );
if( poATTP == NULL )
{
poATTP = poRecord->FindField( "ATTS", 0 );
}
if( poATTP == NULL )
return NULL;
/* -------------------------------------------------------------------- */
/* Update the module ID if required. */
/* -------------------------------------------------------------------- */
if( poModId != NULL )
{
DDFField *poATPR = poRecord->FindField( "ATPR" );
if( poATPR == NULL )
poATPR = poRecord->FindField( "ATSC" );
if( poATPR != NULL )
poModId->Set( poATPR );
}
/* -------------------------------------------------------------------- */
/* return proper answer. */
/* -------------------------------------------------------------------- */
if( ppoRecord != NULL )
*ppoRecord = poRecord;
return poATTP;
}