SBValue#

This class exposes bindings for the SAMSON SDK SBValue class that encapsulates values. It used primarily when calling functionality exposed from SAMSON extensions thanks to the introspection mechanism.

class samson.SBValue(*args, **kwargs)#

Bases: pybind11_object

This class encapsulates values to pass them in and out via the Introspection mechanism of SAMSON, i.e. via proxies and functions exposed via the Introspection mechanism.

SAMSON API: Introspection, SBCMetaValue

Overloaded function.

  1. __init__(self: samson.SBValue) -> None

Constructs an empty (invalid) value holder.

  1. __init__(self: samson.SBValue, value: samson.SBValue) -> None

Copy constructor.

Parameters:

value (samson.SBValue) – Source value holder.

  1. __init__(self: samson.SBValue, object: object, argType: samson.SBValue.ArgType = <ArgType.Auto: 0>) -> None

Constructs an SBValue by converting a Python object.

Parameters:
  • object (object) – Python object to store in SBValue.

  • argType (samson.SBValue.ArgType, default=SBValue.ArgType.Auto) – Controls whether conversion uses value/reference/pointer semantics where available.

class ArgType(self: samson.SBValue.ArgType, value: int)#

Bases: pybind11_object

Members:

Auto

Value

Reference

Pointer

ConstReference

ConstPointer

Auto = <ArgType.Auto: 0>#
ConstPointer = <ArgType.ConstPointer: 5>#
ConstReference = <ArgType.ConstReference: 4>#
Pointer = <ArgType.Pointer: 3>#
Reference = <ArgType.Reference: 2>#
Value = <ArgType.Value: 1>#
property name#
property value#
static canCast(object: object, argType: samson.SBValue.ArgType = <ArgType.Auto: 0>) bool#

Returns whether a Python object can be converted to SBValue.

Parameters:
  • object (object) – Python object to test.

  • argType (samson.SBValue.ArgType, default=SBValue.ArgType.Auto) – Requested conversion mode (value/reference/pointer).

Returns:

True if conversion is supported.

Return type:

bool

getBaseTypeName(self: samson.SBValue) str#

Returns the name of the base type

getParentTypeName(self: samson.SBValue) str#

Returns the name of the parent type

getRootTypeName(self: samson.SBValue) str#

Returns the name of the root type

getShortBaseTypeName(self: samson.SBValue) str#

Returns the short base type name

getShortParentTypeName(self: samson.SBValue) str#

Returns the short parent type name

getShortRootTypeName(self: samson.SBValue) str#

Returns the short root type name

getShortTypeName(self: samson.SBValue) str#

Returns the short type name

getTypeName(self: samson.SBValue) str#

Returns the type name

getTypeUUID(self: samson.SBValue) samson.SBUUID#

Returns the UUID identifying the stored C++ type.

getValue(self: samson.SBValue) object#

Returns the stored object converted back to a Python object.

Returns:

Python representation of the stored value.

Return type:

object

isValid(self: samson.SBValue) bool#

Returns whether the value is valid and can be obtained with getValue

Auto = <ArgType.Auto: 0>#
ConstPointer = <ArgType.ConstPointer: 5>#
ConstReference = <ArgType.ConstReference: 4>#
Pointer = <ArgType.Pointer: 3>#
Reference = <ArgType.Reference: 2>#
Value = <ArgType.Value: 1>#