IDebugHostTypeSignature::IsMatch メソッド (dbgmodel.h)
IsMatch メソッドは、特定の型インスタンスが型シグネチャで指定された条件と一致するかどうかを示す値を返します。 その場合は、型シグネチャのワイルドカードと一致した型インスタンスの特定の部分 (シンボルとして) をすべて示す列挙子と同様に、これが返されます。
構文
HRESULT IsMatch(
IDebugHostType *type,
bool *isMatch,
IDebugHostSymbolEnumerator **wildcardMatches
);
パラメーター
type
型シグネチャと比較する型インスタンス。
isMatch
型インスタンスが型シグネチャと一致するかどうかを示す値がここで返されます。
wildcardMatches
型インスタンスが型シグネチャと一致する場合は、型シグネチャのワイルドカードと一致した型インスタンスの特定の部分をすべて (シンボルとして) 列挙する列挙子がここで返されます。
戻り値
このメソッドは、成功または失敗を示す HRESULT を返します。
備考
サンプル コード の
ComPtr<IDebugHostSymbols> spSym; /* get the host's symbols interface */
ComPtr<IDebugHostType> spType; /* get a type */
ComPtr<IDebugHostTypeSignature> spSig;
if (SUCCEEDED(spSym->CreateTypeSignature(L"MyTemplateType<*>",
nullptr,
&spSig)))
{
bool isMatch;
ComPtr<IDebugHostSymbolEnumerator> spWildcardEnum;
if (SUCCEEDED(spSig->IsMatch(spType.get(), &isMatch, &spWildcardEnum)))
{
// isMatch will contain whether the type matches the signature (whether
// it is a MyTemplateType template with *ANY* template arguments
if (isMatch)
{
// spWildcardEnum will contain what the '*' in 'MyTemplateType<*>'
// matched against. This may be one or more template arguments in
// linear order. An IDebugHostType would be present for type arguments.
}
}
}
必要条件
要件 | 価値 |
---|---|
ヘッダー | dbgmodel.h |
関連項目
IDebugHostTypeSignature インターフェイス の