다음을 통해 공유


IDebugHostTypeSignature::IsMatch 메서드(dbgmodel.h)

IsMatch 메서드는 특정 형식 instance 형식 서명에 지정된 조건과 일치하는지 여부를 나타냅니다. 이 경우 형식 서명의 와일드카드와 일치하는 형식 instance(기호)의 모든 특정 부분을 나타내는 열거자뿐만 아니라 이 표시가 반환됩니다.

구문

HRESULT IsMatch(
  IDebugHostType             *type,
  bool                       *isMatch,
  IDebugHostSymbolEnumerator **wildcardMatches
);

매개 변수

type

형식 시그니처와 비교할 형식 instance.

isMatch

형식 instance 형식 서명과 일치하는지 여부를 나타내는 표시가 여기에 반환됩니다.

wildcardMatches

형식 instance 형식 서명과 일치하는 경우 형식 서명의 와일드카드와 일치하는 형식 instance 형식의 모든 특정 부분(기호)을 열거하는 열거자가 여기에 반환됩니다.

반환 값

이 메서드는 성공 또는 실패를 나타내는 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 인터페이스