本文整理汇总了C++中DDFFieldDefn::SetFormatControls方法的典型用法代码示例。如果您正苦于以下问题:C++ DDFFieldDefn::SetFormatControls方法的具体用法?C++ DDFFieldDefn::SetFormatControls怎么用?C++ DDFFieldDefn::SetFormatControls使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DDFFieldDefn
的用法示例。
在下文中一共展示了DDFFieldDefn::SetFormatControls方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
else if( strcmp(pszTypeCode, "bit_string") == 0 ) eTypeCode = dtc_bit_string;
else if( strcmp(pszTypeCode, "mixed_data_type") == 0 ) eTypeCode = dtc_mixed_data_type;
const char* pszFormatControls = CPLGetXMLValue(psIter, "formatControls", NULL);
if( eStructCode != dsc_elementary )
pszFormatControls = NULL;
const char* pszArrayDescr = CPLGetXMLValue(psIter, "arrayDescr", "");
if( eStructCode == dsc_vector )
pszArrayDescr = "";
else if( eStructCode == dsc_array )
pszArrayDescr = "*";
poFDefn->Create( CPLGetXMLValue(psIter, "tag", ""),
CPLGetXMLValue(psIter, "fieldName", ""),
pszArrayDescr,
eStructCode, eTypeCode,
pszFormatControls );
CPLXMLNode* psSubIter = psIter->psChild;
while( psSubIter != NULL )
{
if( psSubIter->eType == CXT_Element &&
strcmp(psSubIter->pszValue, "DDFSubfieldDefn") == 0 )
{
poFDefn->AddSubfield( CPLGetXMLValue(psSubIter, "name", ""),
CPLGetXMLValue(psSubIter, "format", "") );
}
psSubIter = psSubIter->psNext;
}
pszFormatControls = CPLGetXMLValue(psIter, "formatControls", NULL);
if( pszFormatControls )
poFDefn->SetFormatControls(pszFormatControls);
oModule.AddField( poFDefn );
}
else if( psIter->eType == CXT_Element &&
strcmp(psIter->pszValue, "DDFRecord") == 0 )
{
//const bool bFirstRecord = !bCreated;
if( !bCreated )
{
oModule.Create( pszOutFilename );
bCreated = TRUE;
}
DDFRecord *poRec = new DDFRecord( &oModule );
std::map<std::string, int> oMapField;
//if( !bFirstRecord )
// poRec->SetReuseHeader(atoi(CPLGetXMLValue(psIter, "reuseHeader", CPLSPrintf("%d", poRec->GetReuseHeader()))));
poRec->SetSizeFieldLength(atoi(CPLGetXMLValue(psIter, "_sizeFieldLength", CPLSPrintf("%d", poRec->GetSizeFieldLength()))));
poRec->SetSizeFieldPos(atoi(CPLGetXMLValue(psIter, "_sizeFieldPos", CPLSPrintf("%d", poRec->GetSizeFieldPos()))));
poRec->SetSizeFieldTag(atoi(CPLGetXMLValue(psIter, "_sizeFieldTag", CPLSPrintf("%d", poRec->GetSizeFieldTag()))));
CPLXMLNode* psSubIter = psIter->psChild;
while( psSubIter != NULL )
{
if( psSubIter->eType == CXT_Element &&
strcmp(psSubIter->pszValue, "DDFField") == 0 )
{
const char* pszFieldName = CPLGetXMLValue(psSubIter, "name", "");
DDFFieldDefn* poFieldDefn = oModule.FindFieldDefn( pszFieldName );
if( poFieldDefn == NULL )
{