Skip to main content

Rocky Solver SDK 2024 R2

IRockyPluginDataEntry Class Reference

Last update: 08.07.2024

#include <rocky_plugin_data.h>

Public Member Functions

bool has (const char *_name) const
 
bool get_bool (const char *_name) const
 
int get_int (const char *_name) const
 
double get_double (const char *_name) const
 
std::string get_string (const char *_name) const
 
int get_list_size (const char *_name) const
 
IRockyPluginDataEntry get_list_item (const char *_name, int item_index) const
 

Detailed Description

IRockyPluginDataEntry is a data unit corresponding to a single entity in Rocky (a geometry, a material interaction, etc). It gives access to values of custom module data entered manually through the Rocky UI. IRockyPluginDataEntry may contain boolean, integer, double precision, and string data. Data arranged in lists of IRockyPluginDataEntry is also allowed. The value of a parameter is retrieved passing to the corresponding function the name string, as specified in the Python file that defines the components of the module.

Member Function Documentation

◆ get_bool()

bool IRockyPluginDataEntry::get_bool ( const char *  _name) const
Returns
The boolean value specified for the given parameter in the Rocky UI through a checkbox.
Parameters
_nameThe name of the boolean parameter, as specified in the module definition Python file.

◆ get_double()

double IRockyPluginDataEntry::get_double ( const char *  _name) const
Returns
The double precision value specified for the given parameter in the Rocky UI.
Parameters
_nameThe name of the double precision parameter, as specified in the module definition Python file.

◆ get_int()

int IRockyPluginDataEntry::get_int ( const char *  _name) const
Returns
The integer value specified for the given parameter in the Rocky UI.
Parameters
_nameThe name of the integer parameter, as specified in the module definition Python file.

◆ get_list_item()

IRockyPluginDataEntry IRockyPluginDataEntry::get_list_item ( const char *  _name,
int  item_index 
) const
Returns
An IRockyPluginDataEntry object contained in the list.
Parameters
_nameThe name of the list, as specified in the module definition Python file.
item_indexThe index that specifies the position in the list of the item to be retrieved.

◆ get_list_size()

int IRockyPluginDataEntry::get_list_size ( const char *  _name) const
Returns
The number of IRockyPluginDataEntry objects that the list contains.
Parameters
_nameThe name of the list, as specified in the module definition Python file.

◆ get_string()

std::string IRockyPluginDataEntry::get_string ( const char *  _name) const
Returns
The string value specified for the given parameter in the Rocky UI.
Parameters
_nameThe name of the string parameter, as specified in the module definition Python file.

◆ has()

bool IRockyPluginDataEntry::has ( const char *  _name) const
Returns
True if the parameter specified by name actually exists in the IRockyPluginDataEntry object. Otherwise, it returns false.
Parameters
_nameThe name of the parameter, as specified in the module definition Python file