共用方式為


調用類別

C++ Build Insights SDK 與 Visual Studio 2017 和更新版本相容。 若要查看這些版本的檔,請將本文的 Visual Studio 版本 選取器控制項設定為 Visual Studio 2017 或更新版本。 其位於此頁面目錄頂端。

類別 Invocation 會與 MatchEvent MatchEventInMemberFunction MatchEventStack 和 MatchEventStackInMemberFunction 函式搭配 使用。 使用它來比對 編譯器 LINKER 事件。

語法

class Invocation : public Activity
{
    const INVOCATION_DATA* data_;

public:
    enum class Type
    {
        CL      = MSVC_TOOL_CODE_CL,
        LINK    = MSVC_TOOL_CODE_LINK
    };

    Invocation(const RawEvent& event);

    Type             Type() const;
    const char*      ToolVersionString() const;
    const wchar_t*   WorkingDirectory() const;
    const wchar_t*   ToolPath() const;

    const INVOCATION_VERSION_DATA& ToolVersion() const;
};

成員

除了繼承的成員自其 Activity 基類之外,類別 Invocation 也包含下列成員:

建構函式

調用

函式

ToolPath ToolVersionString 類型 WorkingDirectory

引動過程

Invocation(const RawEvent& event);

參數

event
編譯器 LINKER 事件。

ToolPath

const wchar_t* ToolPath() const;

傳回值

叫用工具的絕對路徑。

ToolVersion

const INVOCATION_VERSION_DATA& ToolVersion() const;

傳回值

叫用的工具版本,做為 INVOCATION_VERSION_DATA 參考。

ToolVersionString

const char* ToolVersionString() const;

傳回值

叫用的工具版本,做為 ANSI 字串。

類型

Type Type() const;

傳回值

指出叫用工具的程式碼。

WorkingDirectory

const wchar_t* WorkingDirectory() const;

傳回值

叫用工具之目錄的絕對路徑。