Skip to main content

DPF C++ client library 2023 R2

ansys::dpf::Context Class Reference

Last update: 10.07.2023

#include <dpf_api_base.h>

Public Member Functions

 Context (EDpfContext context=EDpfContext::eDefault, std::string const &setup_file_path="")
 
EDpfContext getContext () const
 
std::string const & getSetupFilePath () const
 

Static Public Member Functions

static Context entryContext ()
 
static Context premiumContext ()
 

Detailed Description

Context for LibraryHandle. It defines the licensing logic DPF starts with.

See also
Using DPF Context

Constructor & Destructor Documentation

◆ Context()

ansys::dpf::Context::Context ( EDpfContext  context = EDpfContext::eDefault,
std::string const &  setup_file_path = "" 
)

Defines the settings that will be used to load DPF. A DPF xml file is used to define those settings.

Parameters
[in]contextDefines setup to use.
[in]setup_file_pathOptional path to a DPF xml file if using a custom defined location.

Member Function Documentation

◆ entryContext()

static Context ansys::dpf::Context::entryContext ( )
static
Returns
Entry context instance that does not allow DPF to perform any license checkout, meaning that licensed DPF operators run will fail.
See also
Using DPF Context

◆ getContext()

EDpfContext ansys::dpf::Context::getContext ( ) const
Returns
DPF context enum value.

◆ getSetupFilePath()

std::string const & ansys::dpf::Context::getSetupFilePath ( ) const
Returns
DPF file path DPF has been started with, if specified.

◆ premiumContext()

static Context ansys::dpf::Context::premiumContext ( )
static
Returns
Premium context instance that allows DPF to perform license checkouts, allowing licensed DPF operators to run.
See also
Using DPF Context