本文整理汇总了C++中IsoString::Reserve方法的典型用法代码示例。如果您正苦于以下问题:C++ IsoString::Reserve方法的具体用法?C++ IsoString::Reserve怎么用?C++ IsoString::Reserve使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IsoString
的用法示例。
在下文中一共展示了IsoString::Reserve方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Properties
ImagePropertyDescriptionArray FileFormatInstance::Properties()
{
ImagePropertyDescriptionArray properties;
IsoString id;
size_type len = 0;
(*API->FileFormat->EnumerateImageProperties)( handle, 0, 0, &len, 0 ); // 1st call to get max identifier length
if ( len > 0 )
{
id.Reserve( len );
if ( (*API->FileFormat->EnumerateImageProperties)( handle, APIPropertyEnumerationCallback,
id.Begin(), &len, &properties ) == api_false )
throw APIFunctionError( "EnumerateImageProperties" );
}
return properties;
}
示例2: IconsByProcessId
IsoStringList ProcessInstance::IconsByProcessId( const IsoString& processId )
{
size_type len = 0;
(*API->Process->EnumerateProcessIcons)( 0, 0, &len, 0 );
ProcessIconsByProcessIdEnumerationData data( processId );
if ( len != 0 )
{
IsoString iconId;
iconId.Reserve( len );
if ( (*API->Process->EnumerateProcessIcons)( InternalIconEnumerator::ProcessCallback,
iconId.c_str(), &len, &data ) == api_false )
throw APIFunctionError( "EnumerateProcessIcons" );
}
return data.icons;
}
示例3: Icons
IsoStringList ProcessInstance::Icons()
{
size_type len = 0;
(*API->Process->EnumerateProcessIcons)( 0, 0, &len, 0 );
IsoStringList icons;
if ( len != 0 )
{
IsoString iconId;
iconId.Reserve( len );
if ( (*API->Process->EnumerateProcessIcons)( InternalIconEnumerator::IconCallback,
iconId.c_str(), &len, &icons ) == api_false )
throw APIFunctionError( "EnumerateProcessIcons" );
}
return icons;
}