Skip to main content

oSP3D Script API 2024 R1

ParameterContainer< Type > Struct Template Reference

Last update: 16.07.2025

This class provides functions to work with a list/container parameter of the givien type. More...

Static Public Member Functions

static Type load (JsonValue root)
 Static function that deserializaes the value of a parameter with the given type. More...
 
static JsonValue save (Type t, string="")
 Static function that takes an instance of type (a container) and renders a Json representation. It uses the default range given in the SerializationTraits. More...
 
static JsonValue save (Type t, CreateRangeBase range, string="")
 Static function that takes an instance of type (a container) and renders a Json representation. It uses the specific range given be the user. More...
 

Detailed Description

template<typename Type>
struct ParameterContainer< Type >

This class provides functions to work with a list/container parameter of the givien type.

Template Parameters
TThe type of the parameter it needs to be a container of some type

Member Function Documentation

◆ load()

static Type load ( JsonValue  root)
static

Static function that deserializaes the value of a parameter with the given type.

Parameters
rootThe Json object contained the serialized data
Returns
An instance of a Type (container) containing the value present in the serialization

◆ save() [1/2]

static JsonValue save ( Type  t,
string  = "" 
)
static

Static function that takes an instance of type (a container) and renders a Json representation. It uses the default range given in the SerializationTraits.

Parameters
tThe instance to serialize
display_nameThe name to display in the GUI
Returns
The Json serialization

◆ save() [2/2]

static JsonValue save ( Type  t,
CreateRangeBase  range,
string  = "" 
)
static

Static function that takes an instance of type (a container) and renders a Json representation. It uses the specific range given be the user.

Parameters
tThe instance to serialize
rangethe custom range to use for this instance
display_nameThe name to display in the GUI
Returns
The Json serialization

Connect with Ansys