本文整理汇总了C++中CWStringDynamic::AppendFormat方法的典型用法代码示例。如果您正苦于以下问题:C++ CWStringDynamic::AppendFormat方法的具体用法?C++ CWStringDynamic::AppendFormat怎么用?C++ CWStringDynamic::AppendFormat使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CWStringDynamic
的用法示例。
在下文中一共展示了CWStringDynamic::AppendFormat方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CWStringDynamic
//---------------------------------------------------------------------------
// @function:
// IMDRelation::PstrColumns
//
// @doc:
// Serialize an array of column ids into a comma-separated string
//
//---------------------------------------------------------------------------
CWStringDynamic *
IMDRelation::PstrColumns
(
IMemoryPool *pmp,
DrgPul *pdrgpul
)
{
CWStringDynamic *pstr = GPOS_NEW(pmp) CWStringDynamic(pmp);
ULONG ulLen = pdrgpul->UlLength();
for (ULONG ul = 0; ul < ulLen; ul++)
{
ULONG ulId = *((*pdrgpul)[ul]);
if (ul == ulLen - 1)
{
// last element: do not print a comma
pstr->AppendFormat(GPOS_WSZ_LIT("%d"), ulId);
}
else
{
pstr->AppendFormat(GPOS_WSZ_LIT("%d%ls"), ulId, CDXLTokens::PstrToken(EdxltokenComma)->Wsz());
}
}
return pstr;
}
示例2: CWStringDynamic
//---------------------------------------------------------------------------
// @function:
// CMDFunctionGPDB::PstrOutArgTypes
//
// @doc:
// Serialize the array of output argument types into a comma-separated string
//
//---------------------------------------------------------------------------
CWStringDynamic *
CMDFunctionGPDB::PstrOutArgTypes() const
{
GPOS_ASSERT(NULL != m_pdrgpmdidTypes);
CWStringDynamic *pstr = GPOS_NEW(m_pmp) CWStringDynamic(m_pmp);
const ULONG ulLen = m_pdrgpmdidTypes->UlLength();
for (ULONG ul = 0; ul < ulLen; ul++)
{
IMDId *pmdid = (*m_pdrgpmdidTypes)[ul];
if (ul == ulLen - 1)
{
// last element: do not print a comma
pstr->AppendFormat(GPOS_WSZ_LIT("%ls"), pmdid->Wsz());
}
else
{
pstr->AppendFormat(GPOS_WSZ_LIT("%ls%ls"), pmdid->Wsz(), CDXLTokens::PstrToken(EdxltokenComma)->Wsz());
}
}
return pstr;
}
示例3: CWStringDynamic
//---------------------------------------------------------------------------
// @function:
// CDXLPhysicalMotion::PstrSegIds
//
// @doc:
// Serialize the array of segment ids into a comma-separated string
//
//---------------------------------------------------------------------------
CWStringDynamic *
CDXLPhysicalMotion::PstrSegIds(const DrgPi *pdrgpi) const
{
GPOS_ASSERT(pdrgpi != NULL && 0 < pdrgpi->UlLength());
CWStringDynamic *pstr = GPOS_NEW(m_pmp) CWStringDynamic(m_pmp);
ULONG ulNumSegments = pdrgpi->UlLength();
for (ULONG ul = 0; ul < ulNumSegments; ul++)
{
INT iSegId = *((*pdrgpi)[ul]);
if (ul == ulNumSegments - 1)
{
// last element: do not print a comma
pstr->AppendFormat(GPOS_WSZ_LIT("%d"), iSegId);
}
else
{
pstr->AppendFormat(GPOS_WSZ_LIT("%d%ls"), iSegId, CDXLTokens::PstrToken(EdxltokenComma)->Wsz());
}
}
return pstr;
}
示例4: strName
//---------------------------------------------------------------------------
// @function:
// CColumnFactory::PcrCreate
//
// @doc:
// Variant without name for computed columns
//
//---------------------------------------------------------------------------
CColRef *
CColumnFactory::PcrCreate
(
const IMDType *pmdtype
)
{
// increment atomic counter
ULONG ulId = m_aul.TIncr();
WCHAR wszFmt[] = GPOS_WSZ_LIT("ColRef_%04d");
CWStringDynamic *pstrTempName = GPOS_NEW(m_pmp) CWStringDynamic(m_pmp);
CAutoP<CWStringDynamic> a_pstrTempName(pstrTempName);
pstrTempName->AppendFormat(wszFmt, ulId);
CWStringConst strName(pstrTempName->Wsz());
return PcrCreate(pmdtype, ulId, CName(&strName));
}
示例5: strName
//---------------------------------------------------------------------------
// @function:
// CColumnFactory::PcrCreate
//
// @doc:
// Variant without name for computed columns
//
//---------------------------------------------------------------------------
CColRef *
CColumnFactory::PcrCreate
(
const IMDType *pmdtype,
INT type_modifier
)
{
// increment atomic counter
ULONG id = m_aul.Incr();
WCHAR wszFmt[] = GPOS_WSZ_LIT("ColRef_%04d");
CWStringDynamic *pstrTempName = GPOS_NEW(m_mp) CWStringDynamic(m_mp);
CAutoP<CWStringDynamic> a_pstrTempName(pstrTempName);
pstrTempName->AppendFormat(wszFmt, id);
CWStringConst strName(pstrTempName->GetBuffer());
return PcrCreate(pmdtype, type_modifier, id, CName(&strName));
}