MakeStaticAnalyzerGroup

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 MakeStaticAnalyzerGroup function is used to create a static analyzer group that can be passed to functions such as Analyze or Relog. Members of an analyzer group receive events one by one from left to right, until all events in a trace get analyzed.

Syntax

template <typename... TAnalyzerPtrs>
auto MakeStaticAnalyzerGroup(TAnalyzerPtrs... analyzers);

Parameters

TAnalyzerPtrs
This parameter is always deduced.

analyzers
A parameter pack of IAnalyzer pointers included in the static analyzer group. These pointers can be raw, std::unique_ptr, or std::shared_ptr.

Return Value

A static analyzer group. Use the auto keyword to capture the return value.

Remarks

Unlike dynamic analyzer groups, the members of a static analyzer group must be known at compile time. Additionally, a static analyzer group contains IAnalyzer pointers that don't have polymorphic behavior. When using a static analyzer group to analyze an Event Tracing for Windows (ETW) trace, calls to the IAnalyzer interface always resolve to the object directly pointed to by the analyzer group member. This loss of flexibility comes with a possibility of faster event processing times. If the members of an analyzer group can't be known at compile time, or if you require polymorphic behavior on your IAnalyzer pointers, consider using a dynamic analyzer group. To use a dynamic analyzer group, call MakeDynamicAnalyzerGroup instead.