Skip to main content

DPF C++ client library 2023 R2

ansys::dpf::OperatorMain Class Reference

Last update: 10.07.2023

#include <dpf_api.h>

Public Member Functions

 OperatorMain (opaque::DpfOperatorData *)
 
 OperatorMain (OperatorMain const &)=delete
 
 OperatorMain (OperatorMain &&)=delete
 
OperatorMainoperator= (OperatorMain const &)=delete
 
OperatorMainoperator= (OperatorMain &&)=delete
 
void setSuccessed ()
 
void setFailed ()
 
dp_int getNumInputs ()
 
Field getInputField (dp_index pin_index)
 
void setOutput (dp_index pin_index, Field &f)
 
DataSources getInputDataSources (dp_index pin_index)
 
void setOutput (dp_index pin_index, DataSources &f)
 
FieldsContainer getInputFieldsContainer (dp_index pin_index)
 
void setOutput (dp_index pin_index, FieldsContainer &f)
 
Scoping getInputScoping (dp_index pin_index)
 
void setOutput (dp_index pin_index, Scoping &f)
 
ScopingsContainer getInputScopingsContainer (dp_index pin_index)
 
void setOutput (dp_index pin_index, ScopingsContainer &f)
 
MeshedRegion getInputMeshedRegion (dp_index pin_index)
 
void setOutput (dp_index pin_index, MeshedRegion &f)
 
TimeFreqSupport getInputTimeFreqSupport (dp_index pin_index)
 
void setOutput (dp_index pin_index, TimeFreqSupport &f)
 
MeshesContainer getInputMeshesContainer (dp_index pin_index)
 
void setOutput (dp_index pin_index, MeshesContainer &f)
 
Support getInputSupport (dp_index pin_index)
 
void setOutput (dp_index pin_index, Support &f)
 
StringField getInputStringField (dp_index pin_index)
 
void setOutput (dp_index pin_index, StringField &f)
 
CustomTypeField getInputCustomTypeField (dp_index pin_index)
 
void setOutput (dp_index pin_index, CustomTypeField &f)
 
Any getInputAsAny (dp_index pin_index)
 
void setOutput (dp_index pin_index, Any &f)
 
Streams getInputStreams (dp_index pin_index)
 
Workflow getInputWorkflow (dp_index pin_index)
 
Operator getInputOperator (dp_index pin_index)
 
RemoteWorkflow getInputRemoteWorkflow (dp_index pin_index)
 
RemoteOperator getInputRemoteOperator (dp_index pin_index)
 
void setOutput (dp_index pin_index, Streams &f)
 
LabelSpace getInputLabelSpace (dp_index pin_index)
 
PropertyField getInputPropertyField (dp_index pin_index)
 
GenericDataContainer getInputGenericDataContainer (dp_index pin_index)
 
void setOutput (dp_index pin_index, GenericDataContainer &f)
 
void setOutput (dp_index pin_index, PropertyField &f)
 
void setOutput (dp_index pin_index, Workflow &f)
 
void setOutput (dp_index pin_index, MeshInfo &f)
 
void setOutput (dp_index pin_index, ResultInfo &f)
 
DataTree getInputDataTree (dp_index pin_index)
 
void setOutput (dp_index pin_index, DataTree &f)
 
std::string getInputString (dp_index pin_index)
 
void setOutput (dp_index pin_index, std::string const &f)
 
dp_int getInputInteger (dp_index pin_index)
 
void setOutput (dp_index pin_index, dp_int f)
 
dp_double getInputDouble (dp_index pin_index)
 
void setOutput (dp_index pin_index, dp_double f)
 
long long int getInputLongLong (dp_index pin_index)
 
void setOutput (dp_index pin_index, long long int f)
 
std::vector< int > getInputVecInt (dp_index pin_index)
 
std::vector< double > getInputVecDouble (dp_index pin_index)
 
std::vector< std::string > getInputVecString (dp_index pin_index)
 
void setOutput (dp_index pin_index, std::vector< int > const &out)
 
void setOutput (dp_index pin_index, std::vector< double > const &out)
 
void setOutput (dp_index pin_index, std::vector< std::string > const &out)
 
bool getInputBool (dp_index pin_index)
 
void setOutput (dp_index pin_index, bool f)
 
void setOutput (dp_index pin_index, RemoteWorkflow f)
 
void setOutput (dp_index pin_index, RemoteOperator f)
 
void setOutput (dp_index pin_index, Operator f)
 
void delegateRun (Operator op, bool forwardInputs=true)
 
template<typename DataT >
DataT getInputCustom (dp_index pin_index)
 
template<typename DataT >
void setOutputCustom (dp_index pin_index, DataT d)
 @ details Set typed data for given output pin. More...
 
template<typename DataT >
bool testInput (dp_int pin_index)
 
bool hasInput (dp_int pin_index)
 
void connectAllInputs (ansys::dpf::Operator &op)
 
std::string operatorName () const
 
OperatorConfig config () const
 

Detailed Description

To be used in order to write external operators

Member Function Documentation

◆ config()

OperatorConfig ansys::dpf::OperatorMain::config ( ) const
Returns
The Operator Config used to create this operator.

◆ connectAllInputs()

void ansys::dpf::OperatorMain::connectAllInputs ( ansys::dpf::Operator op)

@ connects all inputs connected to this operatorMain instance to another Operator

Parameters
[in]opOperator on which the inputs are connected.

◆ delegateRun()

void ansys::dpf::OperatorMain::delegateRun ( Operator  op,
bool  forwardInputs = true 
)

run the input op and take its state and outputs as his

Parameters
[in]opOperator to use.
[in]forwardInputsChoose if the input definition of this operator should be given to op.

◆ getInputAsAny()

Any ansys::dpf::OperatorMain::getInputAsAny ( dp_index  pin_index)
Returns
Any for given input pin.
Parameters
[in]pin_indexInput pin for which to get valuer.

◆ getInputBool()

bool ansys::dpf::OperatorMain::getInputBool ( dp_index  pin_index)
Returns
Boolean value for given input pin.
Parameters
[in]pin_indexInput pin for which to get value.

◆ getInputCustom()

template<typename DataT >
DataT ansys::dpf::OperatorMain::getInputCustom ( dp_index  pin_index)
inline
Returns
Typed data for given input pin.
Parameters
[in]pin_indexInput pin for which to get value.

◆ getInputCustomTypeField()

CustomTypeField ansys::dpf::OperatorMain::getInputCustomTypeField ( dp_index  pin_index)
Returns
CustomTypeField for given input pin.
Parameters
[in]pin_indexInput pin for which to get value.

◆ getInputDataSources()

DataSources ansys::dpf::OperatorMain::getInputDataSources ( dp_index  pin_index)
Returns
Data sources for input pin.
Parameters
[in]pin_indexInput pin for which to get value.

◆ getInputDataTree()

DataTree ansys::dpf::OperatorMain::getInputDataTree ( dp_index  pin_index)
Returns
DataTree for given input pin.
Parameters
[in]pin_indexInput pin for which to get value.

◆ getInputDouble()

dp_double ansys::dpf::OperatorMain::getInputDouble ( dp_index  pin_index)
Returns
Double value for given input pin.
Parameters
[in]pin_indexInput pin for which to get value.

◆ getInputField()

Field ansys::dpf::OperatorMain::getInputField ( dp_index  pin_index)
Returns
Input field given by pin index.
Parameters
[in]pin_indexInput pin for which to get value.

◆ getInputFieldsContainer()

FieldsContainer ansys::dpf::OperatorMain::getInputFieldsContainer ( dp_index  pin_index)
Returns
Fields container for given input pin.
Parameters
[in]pin_indexInput pin for which to get value.

◆ getInputGenericDataContainer()

GenericDataContainer ansys::dpf::OperatorMain::getInputGenericDataContainer ( dp_index  pin_index)
Returns
GenericDataContainer for given input pin.
Parameters
[in]pin_indexInput pin for which to get value.

◆ getInputInteger()

dp_int ansys::dpf::OperatorMain::getInputInteger ( dp_index  pin_index)
Returns
Integer value for given input pin.
Parameters
[in]pin_indexInput pin for which to get value.

◆ getInputLabelSpace()

LabelSpace ansys::dpf::OperatorMain::getInputLabelSpace ( dp_index  pin_index)
Returns
Streams for given input pin.
Parameters
[in]pin_indexInput pin for which to get value.

◆ getInputLongLong()

long long int ansys::dpf::OperatorMain::getInputLongLong ( dp_index  pin_index)
Returns
Long long int value for given input pin.
Parameters
[in]pin_indexInput pin for which to get value.

◆ getInputMeshedRegion()

MeshedRegion ansys::dpf::OperatorMain::getInputMeshedRegion ( dp_index  pin_index)
Returns
Meshed region for given input pin.
Parameters
[in]pin_indexInput pin for which to get value.

◆ getInputMeshesContainer()

MeshesContainer ansys::dpf::OperatorMain::getInputMeshesContainer ( dp_index  pin_index)
Returns
Meshes container for given input pin.
Parameters
[in]pin_indexInput pin for which to get value.

◆ getInputOperator()

Operator ansys::dpf::OperatorMain::getInputOperator ( dp_index  pin_index)
Returns
Operator for given input pin.
Parameters
[in]pin_indexInput pin for which to get value.

◆ getInputPropertyField()

PropertyField ansys::dpf::OperatorMain::getInputPropertyField ( dp_index  pin_index)
Returns
Property field for given input pin.
Parameters
[in]pin_indexInput pin for which to get value.

◆ getInputRemoteOperator()

RemoteOperator ansys::dpf::OperatorMain::getInputRemoteOperator ( dp_index  pin_index)
Returns
RemoteOperator for given input pin.
Parameters
[in]pin_indexInput pin for which to get value.

◆ getInputRemoteWorkflow()

RemoteWorkflow ansys::dpf::OperatorMain::getInputRemoteWorkflow ( dp_index  pin_index)
Returns
RemoteWorkflow for given input pin.
Parameters
[in]pin_indexInput pin for which to get value.

◆ getInputScoping()

Scoping ansys::dpf::OperatorMain::getInputScoping ( dp_index  pin_index)
Returns
Scoping for given input pin.
Parameters
[in]pin_indexInput pin for which to get value.

◆ getInputScopingsContainer()

ScopingsContainer ansys::dpf::OperatorMain::getInputScopingsContainer ( dp_index  pin_index)
Returns
Scopings container for given input pin.
Parameters
[in]pin_indexInput pin for which to get value.

◆ getInputStreams()

Streams ansys::dpf::OperatorMain::getInputStreams ( dp_index  pin_index)
Returns
Streams for given input pin.
Parameters
[in]pin_indexInput pin for which to get value.

◆ getInputString()

std::string ansys::dpf::OperatorMain::getInputString ( dp_index  pin_index)
Returns
String value for given input pin.
Parameters
[in]pin_indexInput pin for which to get value.

◆ getInputStringField()

StringField ansys::dpf::OperatorMain::getInputStringField ( dp_index  pin_index)
Returns
StringField for given input pin.
Parameters
[in]pin_indexInput pin for which to get value.

◆ getInputSupport()

Support ansys::dpf::OperatorMain::getInputSupport ( dp_index  pin_index)
Returns
Support for given input pin.
Parameters
[in]pin_indexInput pin for which to get value.

◆ getInputTimeFreqSupport()

TimeFreqSupport ansys::dpf::OperatorMain::getInputTimeFreqSupport ( dp_index  pin_index)
Returns
Time frequency support for given input pin.
Parameters
[in]pin_indexInput pin for which to get value.

◆ getInputVecDouble()

std::vector< double > ansys::dpf::OperatorMain::getInputVecDouble ( dp_index  pin_index)
Returns
Vector of doubles for given input pin.
Parameters
[in]pin_indexInput pin for which to get value.

◆ getInputVecInt()

std::vector< int > ansys::dpf::OperatorMain::getInputVecInt ( dp_index  pin_index)
Returns
Vector of integers for given input pin.
Parameters
[in]pin_indexInput pin for which to get value.

◆ getInputVecString()

std::vector< std::string > ansys::dpf::OperatorMain::getInputVecString ( dp_index  pin_index)
Returns
Vector of strings for given input pin.
Parameters
[in]pin_indexInput pin for which to get value.

◆ getInputWorkflow()

Workflow ansys::dpf::OperatorMain::getInputWorkflow ( dp_index  pin_index)
Returns
Workflow for given input pin.
Parameters
[in]pin_indexInput pin for which to get value.

◆ getNumInputs()

dp_int ansys::dpf::OperatorMain::getNumInputs ( )
Returns
Number of operator input pins.

◆ hasInput()

bool ansys::dpf::OperatorMain::hasInput ( dp_int  pin_index)
Returns
Indication that input pin exists.
Parameters
[in]pin_indexInput pin for which to check data type.

◆ operatorName()

std::string ansys::dpf::OperatorMain::operatorName ( ) const
Returns
The Operator name used to record.

◆ setFailed()

void ansys::dpf::OperatorMain::setFailed ( )

Set state of operator to fail.

◆ setOutput() [1/30]

void ansys::dpf::OperatorMain::setOutput ( dp_index  pin_index,
Any f 
)

Set Any object for given output pin with its real type.

Parameters
[in]pin_indexOutput pin for which to set value.
[in]fAny to assign to output pin.

◆ setOutput() [2/30]

void ansys::dpf::OperatorMain::setOutput ( dp_index  pin_index,
bool  f 
)

Set boolean value for given output pin.

Parameters
[in]pin_indexOutput pin for which to set value.
[in]fBoolean value to assign to output pin.

◆ setOutput() [3/30]

void ansys::dpf::OperatorMain::setOutput ( dp_index  pin_index,
CustomTypeField f 
)

Set CustomTypeField object for given output pin with its real type.

Parameters
[in]pin_indexOutput pin for which to set value.
[in]fCustomTypeField to assign to output pin.

◆ setOutput() [4/30]

void ansys::dpf::OperatorMain::setOutput ( dp_index  pin_index,
DataSources f 
)

Set data sources for given output pin.

Parameters
[in]pin_indexOutput pin for which to set value.
[in]fData sources to assign to output pin.

◆ setOutput() [5/30]

void ansys::dpf::OperatorMain::setOutput ( dp_index  pin_index,
DataTree f 
)

Set DataTree for given output pin.

Parameters
[in]pin_indexOutput pin for which to set value.
[in]fMeshes container to assign to output pin.

◆ setOutput() [6/30]

void ansys::dpf::OperatorMain::setOutput ( dp_index  pin_index,
dp_double  f 
)

Set double value for given output pin.

Parameters
[in]pin_indexOutput pin for which to set value.
[in]fDouble value to assign to output pin.

◆ setOutput() [7/30]

void ansys::dpf::OperatorMain::setOutput ( dp_index  pin_index,
dp_int  f 
)

Set integer value for given output pin.

Parameters
[in]pin_indexOutput pin for which to set value.
[in]fInteger value to assign to output pin.

◆ setOutput() [8/30]

void ansys::dpf::OperatorMain::setOutput ( dp_index  pin_index,
Field f 
)

Set field for output pin.

Parameters
[in]pin_indexOutput pin for which to set value.
[in]fField to assign to output pin.

◆ setOutput() [9/30]

void ansys::dpf::OperatorMain::setOutput ( dp_index  pin_index,
FieldsContainer f 
)

Set fields container for given output pin.

Parameters
[in]pin_indexOutput pin for which to set value.
[in]fFields container to assign to output pin.

◆ setOutput() [10/30]

void ansys::dpf::OperatorMain::setOutput ( dp_index  pin_index,
GenericDataContainer &  f 
)

Set GenericDataContainer for given output pin.

Parameters
[in]pin_indexOutput pin for which to set value.
[in]fGenericDataContainer to assign to output pin.

◆ setOutput() [11/30]

void ansys::dpf::OperatorMain::setOutput ( dp_index  pin_index,
long long int  f 
)

Set long long int value for given output pin.

Parameters
[in]pin_indexOutput pin for which to set value.
[in]fLong long int value to assign to output pin.

◆ setOutput() [12/30]

void ansys::dpf::OperatorMain::setOutput ( dp_index  pin_index,
MeshedRegion f 
)

Set meshed region for given output pin.

Parameters
[in]pin_indexOutput pin for which to set value.
[in]fMeshed region to assign to output pin.

◆ setOutput() [13/30]

void ansys::dpf::OperatorMain::setOutput ( dp_index  pin_index,
MeshesContainer f 
)

Set meshes container for given output pin.

Parameters
[in]pin_indexOutput pin for which to set value.
[in]fMeshes container to assign to output pin.

◆ setOutput() [14/30]

void ansys::dpf::OperatorMain::setOutput ( dp_index  pin_index,
MeshInfo &  f 
)

Set MeshInfo for given output pin.

Parameters
[in]pin_indexOutput pin for which to set value.
[in]fMesh info to assign to output pin.

◆ setOutput() [15/30]

void ansys::dpf::OperatorMain::setOutput ( dp_index  pin_index,
Operator  f 
)

Set Operator value for given output pin.

Parameters
[in]pin_indexOutput pin for which to set value.
[in]fOperator value to assign to output pin.

◆ setOutput() [16/30]

void ansys::dpf::OperatorMain::setOutput ( dp_index  pin_index,
PropertyField f 
)

Set property field for given output pin.

Parameters
[in]pin_indexOutput pin for which to set value.
[in]fProperty field to assign to output pin.

◆ setOutput() [17/30]

void ansys::dpf::OperatorMain::setOutput ( dp_index  pin_index,
RemoteOperator  f 
)

Set RemoteOperator value for given output pin.

Parameters
[in]pin_indexOutput pin for which to set value.
[in]fRemoteOperator value to assign to output pin.

◆ setOutput() [18/30]

void ansys::dpf::OperatorMain::setOutput ( dp_index  pin_index,
RemoteWorkflow  f 
)

Set RemoteWorkflow value for given output pin.

Parameters
[in]pin_indexOutput pin for which to set value.
[in]fRemoteWorkflow value to assign to output pin.

◆ setOutput() [19/30]

void ansys::dpf::OperatorMain::setOutput ( dp_index  pin_index,
ResultInfo f 
)

Set ResultInfo for given output pin.

Parameters
[in]pin_indexOutput pin for which to set value.
[in]fResultInfo to assign to output pin.

◆ setOutput() [20/30]

void ansys::dpf::OperatorMain::setOutput ( dp_index  pin_index,
Scoping f 
)

Set scoping for given output pin.

Parameters
[in]pin_indexOutput pin for which to set value.
[in]fScoping to assign to output pin.

◆ setOutput() [21/30]

void ansys::dpf::OperatorMain::setOutput ( dp_index  pin_index,
ScopingsContainer f 
)

Set scopings container for given input pin.

Parameters
[in]pin_indexOutput pin for which to set value.
[in]fScopings container to assign to output pin.

◆ setOutput() [22/30]

void ansys::dpf::OperatorMain::setOutput ( dp_index  pin_index,
std::string const &  f 
)

Set string value for given output pin.

Parameters
[in]pin_indexOutput pin for which to set value.
[in]fString value to assign to output pin.

◆ setOutput() [23/30]

void ansys::dpf::OperatorMain::setOutput ( dp_index  pin_index,
std::vector< double > const &  out 
)

Set vector of doubles for given output pin.

Parameters
[in]pin_indexOutput pin for which to set value.
[in]outVector of doubles to assign to output pin.

◆ setOutput() [24/30]

void ansys::dpf::OperatorMain::setOutput ( dp_index  pin_index,
std::vector< int > const &  out 
)

Set vector of integers for given output pin.

Parameters
[in]pin_indexOutput pin for which to set value.
[in]outVector of integers to assign to output pin.

◆ setOutput() [25/30]

void ansys::dpf::OperatorMain::setOutput ( dp_index  pin_index,
std::vector< std::string > const &  out 
)

Set vector of string for given output pin.

Parameters
[in]pin_indexOutput pin for which to set value.
[in]outVector of string to assign to output pin.

◆ setOutput() [26/30]

void ansys::dpf::OperatorMain::setOutput ( dp_index  pin_index,
Streams f 
)

Set streams for given output pin.

Parameters
[in]pin_indexOutput pin for which to set value.
[in]fStreams to assign to output pin.

◆ setOutput() [27/30]

void ansys::dpf::OperatorMain::setOutput ( dp_index  pin_index,
StringField f 
)

Set StringField object for given output pin with its real type.

Parameters
[in]pin_indexOutput pin for which to set value.
[in]fStringField to assign to output pin.

◆ setOutput() [28/30]

void ansys::dpf::OperatorMain::setOutput ( dp_index  pin_index,
Support f 
)

Set support for given output pin.

Parameters
[in]pin_indexOutput pin for which to set value.
[in]fSupport to assign to output pin.

◆ setOutput() [29/30]

void ansys::dpf::OperatorMain::setOutput ( dp_index  pin_index,
TimeFreqSupport f 
)

Set time freqency support for given output pin.

Parameters
[in]pin_indexOutput pin for which to set value.
[in]fTime frequency support to assign to output pin.

◆ setOutput() [30/30]

void ansys::dpf::OperatorMain::setOutput ( dp_index  pin_index,
Workflow f 
)

Set property field for given output pin.

Parameters
[in]pin_indexOutput pin for which to set value.
[in]fProperty field to assign to output pin.

◆ setOutputCustom()

template<typename DataT >
void ansys::dpf::OperatorMain::setOutputCustom ( dp_index  pin_index,
DataT  d 
)
inline

@ details Set typed data for given output pin.

Parameters
[in]pin_indexOutput pin for which to set value.
[in]dTyped data to assign to output pin.

◆ setSuccessed()

void ansys::dpf::OperatorMain::setSuccessed ( )

Set state of operator to success.

◆ testInput()

template<typename DataT >
bool ansys::dpf::OperatorMain::testInput ( dp_int  pin_index)
inline
Returns
Indication that input pin contains typed data.
Parameters
[in]pin_indexInput pin for which to check data type.