Invocation class

The C++ Build Insights SDK is compatible with Visual Studio 2017 and above. To see the documentation for these versions, set the Visual Studio Version selector control for this article to Visual Studio 2017 or Visual Studio 2019. It's found at the top of the table of contents on this page.

The Invocation class is used with the MatchEvent, MatchEventInMemberFunction, MatchEventStack, and MatchEventStackInMemberFunction functions. Use it to match a COMPILER or LINKER event.

Syntax

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;
};

Members

Along with the inherited members from its Activity base class, the Invocation class contains the following members:

Constructors

Invocation

Functions

ToolPath ToolVersion ToolVersionString Type WorkingDirectory

Invocation

Invocation(const RawEvent& event);

Parameters

event
A COMPILER or LINKER event.

ToolPath

const wchar_t* ToolPath() const;

Return Value

The absolute path to the tool that was invoked.

ToolVersion

const INVOCATION_VERSION_DATA& ToolVersion() const;

Return Value

The version of the tool that was invoked, as an INVOCATION_VERSION_DATA reference.

ToolVersionString

const char* ToolVersionString() const;

Return Value

The version of the tool that was invoked, as an ANSI string.

Type

Type Type() const;

Return Value

A code indicating the tool that was invoked.

WorkingDirectory

const wchar_t* WorkingDirectory() const;

Return Value

The absolute path to the directory in which the tool was invoked.