Skip to main content

DPF C++ client library 2023 R2

ansys::dpf::core Class Reference

Last update: 10.07.2023

#include <dpf_api.h>

Static Public Member Functions

static DpfError applyContext (Context const &context)
 
static DpfError releaseDpf ()
 
static DpfError releaseDpf (Client const *const client)
 
static DpfError applyContext (Context const &context, Client const *const client)
 
static DpfError loadDpfPlugin (std::string const &plugin_path, std::string const &plugin_name, std::string const &symbol="LoadOperators")
 
static DpfError loadDpfPlugin (std::string const &plugin_path, std::string const &plugin_name, Client const *const client)
 
static DpfError loadDpfPlugin (std::string const &plugin_path, std::string const &plugin_name, std::string const &symbol, Client const *const client)
 
static Operator assertInstantiate (std::string const &identifier)
 
static Operator assertInstantiate (std::string const &identifier, OperatorConfig const &config)
 
static OperatorConfig defaultOperatorConfig (std::string const &op_identifier, Client const *const client=nullptr)
 
static OperatorSpecification getOperatorSpecification (std::string const &identifier, Client const *const client=nullptr)
 
static void recordOperator (OperatorMainFunction f, std::string const &operator_identifier, AbstractCore *core=nullptr)
 
static void recordOperator (OperatorMainFunction f, std::string const &operator_identifier, OperatorSpecification const &spec, AbstractCore *=nullptr)
 
template<typename StructureT >
static void recordOperator ()
 
template<typename StructureT >
static void recordOperatorAtCore (AbstractCore *core)
 
static void recordOperatorWithNewName (std::string const &exising_identifier, std::string const &new_identifier, AbstractCore *=nullptr)
 
static Workflow workflowById (int id)
 
static Workflow workflowById (int id, Client const *const client)
 
static Operator operatorById (int id)
 
static Workflow workflowFromTemplate (std::string const &template_identifier)
 
static bool workflowTemplateExists (std::string const &template_identifier)
 
static void prepareServerShutdown (Client *const client)
 
static void releaseServer (Client *const client)
 
static std::vector< std::string > availableOperators ()
 
static std::vector< std::string > availableOperators (Client *const client)
 
static dataIdentifierInDatabase recordInDatabase (databaseIdentifier const &key, DpfTypes &data)
 
static dataIdentifierInDatabase recordInDatabase (DpfTypes &data)
 
static void releaseFromDatabase (dp_id id, Client const *const client, bool async=false)
 
static RuntimeCoreConfig getRuntimeCoreConfig ()
 
static RuntimeCoreConfig getRuntimeCoreConfig (Client *const client)
 
static RuntimeClientConfig getRuntimeClientConfig ()
 

Detailed Description

Groups all DataProcessingFramework core controls and utilities, like loading the core, loading libraries, protected instantiation, settings control.

Member Function Documentation

◆ applyContext() [1/2]

static DpfError ansys::dpf::core::applyContext ( Context const &  context)
static

Defines the settings that will be used to load DPF's plugins. A DPF xml file can be used.

Returns
Status of call.

◆ applyContext() [2/2]

static DpfError ansys::dpf::core::applyContext ( Context const &  context,
Client const *const  client 
)
static

Defines the settings that will be used to load DPF's plugins. A DPF xml file can be used.

Returns
Status of call.
Parameters
[in]clientClient instance designating the IP, port and protocol to use.

◆ assertInstantiate() [1/2]

static Operator ansys::dpf::core::assertInstantiate ( std::string const &  identifier)
static
Returns
Operator given by identifier.
Parameters
[in]identifierOperator to instantiate.

◆ assertInstantiate() [2/2]

static Operator ansys::dpf::core::assertInstantiate ( std::string const &  identifier,
OperatorConfig const &  config 
)
static
Parameters
[in]identifierOperator to instantiate.
[in]configAdditional configuration information.

◆ availableOperators() [1/2]

static std::vector< std::string > ansys::dpf::core::availableOperators ( )
static

Returns all the availbale operators names.

◆ availableOperators() [2/2]

static std::vector< std::string > ansys::dpf::core::availableOperators ( Client *const  client)
static

Returns all the availbale operators names for a given client.

Parameters
[in]clientClient instance designating the IP, port and protocol to use.

◆ defaultOperatorConfig()

static OperatorConfig ansys::dpf::core::defaultOperatorConfig ( std::string const &  op_identifier,
Client const *const  client = nullptr 
)
static
Returns
Default configuration of given operator.
Parameters
[in]op_identifierOperator for which to get configuration.
[in]clientClient on which to get the operator's config from. Default is nullptr.
Examples
OperatorsApis.cpp.

◆ getOperatorSpecification()

static OperatorSpecification ansys::dpf::core::getOperatorSpecification ( std::string const &  identifier,
Client const *const  client = nullptr 
)
static
Returns
Specification of given operator.
Parameters
[in]identifierOperator for which to get specification.
[in]clientClient on which to get the operator's config from. Default is nullptr.

◆ getRuntimeClientConfig()

static RuntimeClientConfig ansys::dpf::core::getRuntimeClientConfig ( )
static
Returns
the RuntimeClientConfig used to set Client runtime configuration options

◆ getRuntimeCoreConfig() [1/2]

static RuntimeCoreConfig ansys::dpf::core::getRuntimeCoreConfig ( )
static
Returns
the RuntimeCoreConfig used to set DataProcessingCore runtime configuration options

◆ getRuntimeCoreConfig() [2/2]

static RuntimeCoreConfig ansys::dpf::core::getRuntimeCoreConfig ( Client *const  client)
static
Returns
the RuntimeCoreConfig used to set DataProcessingCore runtime configuration options
Parameters
[in]clientClient instance designating the IP, port and protocol to use.

◆ loadDpfPlugin() [1/3]

static DpfError ansys::dpf::core::loadDpfPlugin ( std::string const &  plugin_path,
std::string const &  plugin_name,
Client const *const  client 
)
static

Loads specified DPF plugin.

Returns
Status of call.
Parameters
[in]plugin_pathFull path to plugin.
[in]plugin_nameIdentifying name for plugin.
[in]clientClient instance designating the IP, port and protocol to use.

◆ loadDpfPlugin() [2/3]

static DpfError ansys::dpf::core::loadDpfPlugin ( std::string const &  plugin_path,
std::string const &  plugin_name,
std::string const &  symbol,
Client const *const  client 
)
static

Loads specified DPF plugin.

Returns
Status of call.
Parameters
[in]plugin_pathFull path to plugin.
[in]plugin_nameIdentifying name for plugin.
[in]symbolType of load.
[in]clientClient instance designating the IP, port and protocol to use.

◆ loadDpfPlugin() [3/3]

static DpfError ansys::dpf::core::loadDpfPlugin ( std::string const &  plugin_path,
std::string const &  plugin_name,
std::string const &  symbol = "LoadOperators" 
)
static

Loads specified DPF plugin.

Returns
Status of call.
Parameters
[in]plugin_pathFull path to plugin.
[in]plugin_nameIdentifying name for plugin.
[in]symbolType of load.
Examples
Example.cpp.

◆ operatorById()

static Operator ansys::dpf::core::operatorById ( int  id)
static
Returns
Operator given by id.
Parameters
[in]idOperator id.

◆ prepareServerShutdown()

static void ansys::dpf::core::prepareServerShutdown ( Client *const  client)
static

Send a prepare shutdown request (cleanup process) to a specified server.

Parameters
[in]clientClient instance designating the IP, port and protocol to use.

◆ recordInDatabase()

static dataIdentifierInDatabase ansys::dpf::core::recordInDatabase ( DpfTypes data)
static
Parameters
[in]dataRemote Data to record

◆ recordOperator() [1/3]

template<typename StructureT >
static void ansys::dpf::core::recordOperator ( )
inlinestatic

Record a new operator based on defined type.

◆ recordOperator() [2/3]

static void ansys::dpf::core::recordOperator ( OperatorMainFunction  f,
std::string const &  operator_identifier,
AbstractCore *  core = nullptr 
)
static

Record a new operator.

Parameters
[in]fFunction to perform operator.
[in]operator_identifierUnique identifier for operator.

◆ recordOperator() [3/3]

static void ansys::dpf::core::recordOperator ( OperatorMainFunction  f,
std::string const &  operator_identifier,
OperatorSpecification const &  spec,
AbstractCore *  = nullptr 
)
static

Record a new operator.

Parameters
[in]fFunction to perform operator.
[in]operator_identifierUnique identifier for operator.
[in]specDefinition of inputs and outputs.

◆ recordOperatorWithNewName()

static void ansys::dpf::core::recordOperatorWithNewName ( std::string const &  exising_identifier,
std::string const &  new_identifier,
AbstractCore *  = nullptr 
)
static

Duplicates the record of the Operator identified by its name in the registry. The Operator will be added as private and won't appear in the documentation

Parameters
[in]exising_identifierexisting unique identifier for operator.
[in]new_identifierUnique identifier for operator.

◆ releaseDpf() [1/2]

static DpfError ansys::dpf::core::releaseDpf ( )
static

Clears the available Operators and Releases licenses when necessary.

Returns
Status of call.

◆ releaseDpf() [2/2]

static DpfError ansys::dpf::core::releaseDpf ( Client const *const  client)
static

Clears the available Operators and Releases licenses when necessary.

Returns
Status of call.
Parameters
[in]clientClient instance designating the IP, port and protocol to use.

◆ releaseFromDatabase()

static void ansys::dpf::core::releaseFromDatabase ( dp_id  id,
Client const *const  client,
bool  async = false 
)
static

suppress the entity from the server's database.

Parameters
[in]idits Id on the server.
[in]clientClient instance designating the IP, port and protocol to use.

◆ releaseServer()

static void ansys::dpf::core::releaseServer ( Client *const  client)
static

@detailsremoves the handle on the server should be used only if the server was started by this client instance

Parameters
[in]clientClient instance designating the IP, port and protocol to use.

◆ workflowById() [1/2]

static Workflow ansys::dpf::core::workflowById ( int  id)
static
Returns
Worflow registered in the registry (with Workflow::record) with its id.
Parameters
[in]idWorkflow id created by Workflow::record.
Examples
DataApis.cpp.

◆ workflowById() [2/2]

static Workflow ansys::dpf::core::workflowById ( int  id,
Client const *const  client 
)
static
Returns
Worflow registered in a server's registry (with Workflow::record) with its id.
Parameters
[in]idWorkflow id created by Workflow::record.
[in]clientClient instance designating the IP, port and protocol to use.

◆ workflowFromTemplate()

static Workflow ansys::dpf::core::workflowFromTemplate ( std::string const &  template_identifier)
static
Returns
Workflow given by template identifier.
Parameters
[in]template_identifierWorkflow template identifier.

◆ workflowTemplateExists()

static bool ansys::dpf::core::workflowTemplateExists ( std::string const &  template_identifier)
static
Returns
true if template identifier exists
Parameters
[in]template_identifierWorkflow template identifier.