Skip to main content
The class representing the DPF execution context. This is used to configure several aspects of DPF like:
  • The XML configuration file to be loaded.
  • The license context to be used.
See also: dpf::LibraryHandle, dpf::core::applyContext

Inner classes

Members

Public types

Enumeration type EDpfLicenseContext

Enum to select the license context.

Enumerator eNone

Enumerator eEntryLevel

Enumerator ePremium

Enumeration type PluginLoadErrorMode

Enum that determines the error reporting strategy during plugin loading.

Enumerator eSilent

Enumerator eReportFirst

Enumerator eReportAll

Friends

Friend internal

Public functions

Function Context

Defines the settings that will be used to load DPF. A DPF xml file is used to define those settings. Parameters:
  • EDpfContext context = EDpfContext::eDefault : [in] Defines setup to use.
  • std::string const & setup_file_path = "" : [in] Optional path to a DPF xml file if using a custom defined location. If a file name is passed, instead of a path, it will search for it int the predefined location dpf/utilities.
Return type:

Function getContext

Get the DPF context enum value. Returns: EDpfContext Return type: EDpfContext

Function getSetupFilePath

Get the path to the XML file used to configure DPF. Returns: std::string const& Return type: std::string const &

Function getLicenseContext

Get the DPF license context enum value. Use with DPF runtime R2025R1 or later. Returns: EDpfLicenseContext Return type: EDpfLicenseContext

Function errorOnPluginLoad

Get the error reporting mode for plugin loading. Use with DPF runtime R2025R1 or later. Returns: PluginLoadErrorMode Return type: PluginLoadErrorMode

Function withErrorOnPluginLoad

Sets the mode in which DPF report errors when plugins are loaded. Use with DPF runtime R2025R1 or later. Parameters:
  • error_mode: The strategy for error reporting.
Returns: Context& Parameters: Return type: Context &

Function withPremiumLicense

Sets the license context to Premium. Use with DPF runtime R2025R1 or later. Returns: Context& Return type: Context &

Function withEntryLevelLicense

Sets the license context to Entry. Use with DPF runtime R2025R1 or later. Returns: Context& Return type: Context &

Public static functions

Function entryContext

Returns: Entry context instance that does not allow DPF to perform any license checkout, meaning that licensed DPF operators run will fail. Return type: Context

Function premiumContext

Returns: Premium context instance that allows DPF to perform license checkouts, allowing licensed DPF operators to run. Return type: Context

Function defaultContext

Creates a default context. Use with DPF runtime R2025R1 or later. Returns: Context Return type: Context

Function standaloneContext

Creates a standalone context. Returns: Context Return type: Context

Function userDefinedContext

Creates a user-defined context. Use with DPF runtime R2025R1 or later. Parameters:
  • setup_file: The path to the DPF XML file with the user configuration. If a file name is provided as parameter, it will search in /utilities for it. The default XML file used is /utilities/DpfCustomDefined.xml, that the user can edit.
Returns: Context Parameters:
  • std::string const & setup_file = “DpfCustomDefined.xml”
Return type: Context