eVision C++ API 26.10.0-beta.2.dev
Loading...
Searching...
No Matches
eVision::Preconfiguration Class Reference

#include <CppWrapperCallbackManagerImpl.h>

Static Public Member Functions

static Preconfiguration * GetInstance ()
static void SelectLicensingModels (ELicensingModel model)
static ELicensingModel GetLicensingModels ()
 Gets the current licensing model.
static void OverrideDllPath (const std::string &path)
static std::string GetDllPath ()
 Gets the location of the eVision shared library if it was overrided. If the location was not overrided this method will return an empty string.
static void OverrideResourcesPath (const std::string &path)
static std::string GetResourcesPath ()
 Gets the location of the resources folder of eVision if it was overrided. If the location was not overrided this method will return an empty string.
static EInitializationMode GetInitializationMode ()
static void SetInitializationMode (EInitializationMode initializationMode)
static void Initialize ()
static void Terminate ()

Member Function Documentation

◆ GetDllPath()

std::string eVision::Preconfiguration::GetDllPath ( )
static

Gets the location of the eVision shared library if it was overrided. If the location was not overrided this method will return an empty string.

◆ GetInitializationMode()

EInitializationMode eVision::Preconfiguration::GetInitializationMode ( )
static

Gets the initialization mode of the eVision shared library.

Defaults to eVision::EInitializationMode::EInitializationMode_Automatic.

◆ GetInstance()

Preconfiguration * eVision::Preconfiguration::GetInstance ( )
static

◆ GetLicensingModels()

ELicensingModel eVision::Preconfiguration::GetLicensingModels ( )
static

Gets the current licensing model.

Parameters
modelThe licensing model.

◆ GetResourcesPath()

std::string eVision::Preconfiguration::GetResourcesPath ( )
static

Gets the location of the resources folder of eVision if it was overrided. If the location was not overrided this method will return an empty string.

◆ Initialize()

void eVision::Preconfiguration::Initialize ( )
static

Initializes the eVision shared library.

This method can only be called if the eVision shared library initialization mode was set to eVision::EInitializationMode::EInitializationMode_Manual and the shared library was not already initialized. A std::runtime_error will be thrown otherwise.

Handling eVision's shared library initialization in manual mode requires to call eVision::Preconfiguration::Terminate when the library is not needed anymore. Failing to do so will generate random crashes at the process exit due to erratic behavior on most operating systems when threads initialized inside a shared library are not properly terminated before closing the process.

This method is not thread safe.

◆ OverrideDllPath()

void eVision::Preconfiguration::OverrideDllPath ( const std::string & path)
static

Overrides the location of the eVision shared library.

This method must be called before first usage of eVision or it will have no effect.

This method is not thread safe.

Parameters
pathThe path to the shared library.

◆ OverrideResourcesPath()

void eVision::Preconfiguration::OverrideResourcesPath ( const std::string & path)
static

Overrides the location of the resources folder of eVision.

This method must be called before first usage of eVision or it will have no effect.

This method is not thread safe.

Parameters
pathThe path to the resources folder.

◆ SelectLicensingModels()

void eVision::Preconfiguration::SelectLicensingModels ( ELicensingModel model)
static

Sets the licensing model to use.

This method must be called before first usage of eVision or it will have no effect.

This method is not thread safe.

Parameters
modelThe licensing model.

◆ SetInitializationMode()

void eVision::Preconfiguration::SetInitializationMode ( EInitializationMode initializationMode)
static

Sets the initialization mode of the eVision shared library.

Defaults to eVision::EInitializationMode::EInitializationMode_Automatic.

Calling this method after the eVision shared library was initialized will throw a std::runtime_error.

This method is not thread safe.

Parameters
initializationModeThe initialization mode

◆ Terminate()

void eVision::Preconfiguration::Terminate ( )
static

Terminates the eVision shared library.

This method can only be called if the eVision shared library initialization mode was set to eVision::EInitializationMode::EInitializationMode_Manual and the shared library was previously initialized using eVision::Preconfiguration::Initialize(). A std::runtime_error will be thrown otherwise.

This method is not thread safe.