Skip to main content

DPF C++ Client Library 2025 R2

ansys::dpf::CustomContainerBase Class Reference

Last update: 16.07.2025

Allows you to define your own containers by deriving from this class. More...

#include <dpf_api.h>

Public Member Functions

 CustomContainerBase (std::string const &class_name)
 
 CustomContainerBase (std::string const &class_name, Client const *const client)
 
 CustomContainerBase (std::string const &class_name, GenericDataContainer const &container)
 
GenericDataContainer & container ()
 
virtual GenericDataContainer const & container () const
 
std::string describe () const
 
std::vector< std::string > getAttributeNames () const
 
bool getClient (Client &client) const
 

Detailed Description

Allows you to define your own containers by deriving from this class.

For the custom class deriving from CustomContainerBase to be fully supported by DPF features (connection to Operator, remote access, multi languages API), all private attributes should registered into the GenericDataContainer held.

Constructor & Destructor Documentation

◆ CustomContainerBase() [1/3]

ansys::dpf::CustomContainerBase::CustomContainerBase ( std::string const &  class_name)
Parameters
[in]class_nameName of the custom class in camel case format. Will be used to print the instance.

◆ CustomContainerBase() [2/3]

ansys::dpf::CustomContainerBase::CustomContainerBase ( std::string const &  class_name,
Client const *const  client 
)
Parameters
[in]class_nameName of the custom class in camel case format. Will be used to print the instance.
[in]clientClient instance designating the IP, port and protocol to use.

◆ CustomContainerBase() [3/3]

ansys::dpf::CustomContainerBase::CustomContainerBase ( std::string const &  class_name,
GenericDataContainer const &  container 
)
Parameters
[in]class_nameName of the custom class in camel case format. Will be used to print the instance.
[in]containerInternal container holding all the attributes as properties.

Member Function Documentation

◆ container() [1/2]

GenericDataContainer & ansys::dpf::CustomContainerBase::container ( )
Returns
The internal container.

◆ container() [2/2]

virtual GenericDataContainer const & ansys::dpf::CustomContainerBase::container ( ) const
virtual
Returns
The internal container.

◆ describe()

std::string ansys::dpf::CustomContainerBase::describe ( ) const
Returns
Description of object.

◆ getClient()

bool ansys::dpf::CustomContainerBase::getClient ( Client client) const
Returns
Get the Client the object is on, if it has one. Must not be used without using remote API.

Connect with Ansys