Skip to main content

DPF C++ client library 2023 R2

ansys::dpf::Session Class Reference

Last update: 10.07.2023

#include <dpf_api.h>

Inheritance diagram for ansys::dpf::Session:
ansys::dpf::DpfTypes

Public Member Functions

 Session (Client const *const client)
 
 Session (Session const &)
 
 Session (Session &&)=delete
 
Sessionoperator= (Session const &)
 
Sessionoperator= (Session &&)=delete
 
std::string id () const
 
void add (Workflow &wf, std::string const &identifier)
 
std::string add (Workflow &wf)
 
Workflow getWorkflow (std::string const &identifier)
 
Workflow getWorkflowByIndex (dp_index index)
 
dp_int numberOfWorkflow () const
 
void flushWorkflows ()
 
void addEventHandler (EventHandler &event_handler)
 
- Public Member Functions inherited from ansys::dpf::DpfTypes
virtual bool empty () const
 
virtual std::string describe () const
 
so::API const * callAPI () const
 
bool isOnCommonAPI () const
 
bool getClient (Client &client) const
 
bool hasBeenMovedLocally () const
 
bool isSameObject (DpfTypes const &rhs) const
 

Detailed Description

Define a DPF session.

Constructor & Destructor Documentation

◆ Session()

ansys::dpf::Session::Session ( Client const *const  client)

Create a new Session on a server.

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

Member Function Documentation

◆ add() [1/2]

std::string ansys::dpf::Session::add ( Workflow wf)

Add workflow to session.

Returns
Identifier for workflow.
Parameters
[in]wfWorkflow to add.

◆ add() [2/2]

void ansys::dpf::Session::add ( Workflow wf,
std::string const &  identifier 
)

Add a workflow to session.

Parameters
[in]wfWorkflow to add.
[out]identifierIdentifier for workflow.

◆ addEventHandler()

void ansys::dpf::Session::addEventHandler ( EventHandler event_handler)

Add event handler to handle status of DPF session.

Parameters
[in]event_handlerHandler for session status.

◆ getWorkflow()

Workflow ansys::dpf::Session::getWorkflow ( std::string const &  identifier)
Returns
Workflow given by identifier.
Parameters
[in]identifierIdentifier of workflow.

◆ getWorkflowByIndex()

Workflow ansys::dpf::Session::getWorkflowByIndex ( dp_index  index)
Returns
Workflow given by index.
Parameters
[in]indexIndex of workflow.

◆ id()

std::string ansys::dpf::Session::id ( ) const
Returns
Id of session.

◆ numberOfWorkflow()

dp_int ansys::dpf::Session::numberOfWorkflow ( ) const
Returns
Number of workflows in session.