Description
This class is a simple wrapper around all types of value. Note that not all operations are
supported by every value type. For details, see the swigpython3 module documentation. This
class is part of the pilotpython module, which is available in the Python (on Server)
component.
class Value(builtins.object)
| Value.CreateValue(classTag) |
| Description |
Creates a new pilotpython.Value instance of the type specified by classTag. The
Value instance must be deleted using Value.deleteInstance() after use. The exception
is the ValueArrayValue type, which takes ownershipof any values added to it. The
ValueHolder class can be used to store the newly created value. When a ValueHolder
moves out of scope, the value it contains is destroyed. |
| Input parameters |
param classTag: Tag specifying the class of value to
create type classTag: str |
| Return value |
None |
| Value.GetValue(rawVal) |
| Description |
Takes a rawpilot.Value and returns it wrapped in its pilotpython.Value. |
| Input parameters |
rawVal |
| Return value |
None |
| Value.__init__(value) |
| Description |
Constructor. |
| Input parameters |
param value: Property value to
wrap type value: swigpython3.Value |
| Return value |
None |
| Value.cloneValue() |
| Description |
Creates a clone (deep copy) of the value. |
| Input parameters |
None |
| Return value |
returns: Deep copy of value
rtype: Value |
| Value.deleteInstance() |
| Description |
Deletes an instance of a value. Any value created with cloneValue() or
newInstanceXXX(), and not assigned to a property, must be deleted. |
| Input parameters |
None |
| Return value |
None |
| Value.getBoolArray() |
| Description |
Returns a copy(!) of the entire data set of a BooleanArrayValue. |
| Input parameters |
None |
| Return value |
returns: All bools contained in value
rtype: list |
| Value.getBoolean() |
| Description |
Returns the value's contents as a boolean value. |
| Input parameters |
None |
| Return value |
returns: Data as a boolean
rtype: bool |
| Value.getByteArray() |
| Description |
Returns a read-only view of the binary data. |
| Input parameters |
None |
| Return value |
returns: Byte array data
rtype: memoryview |
| Value.getClassTag() |
| Description |
Returns the value's type in Pipeline Pilot notation. |
| Input parameters |
None |
| Return value |
returns: A class tag
rtype: str |
| Value.getFloat() |
| Description |
Returns the value's contents as a float. |
| Input parameters |
None |
| Return value |
returns: Value contents as float
rtype: float |
| Value.getFloatArray() |
| Description |
Returns a copy(!) of the entire data set of a DoubleArrayValue. |
| Input parameters |
None |
| Return value |
returns: All floats contained in value
rtype: list |
| Value.getIntArray() |
| Description |
Returns a copy(!) of the entire dataset of an IntegerArrayValue. |
| Input parameters |
None |
| Return value |
returns: All ints contained in value
rtype: list |
| Value.getInteger() |
| Description |
Returns the value's contents as an int. |
| Input parameters |
None |
| Return value |
returns: Data as int
rtype: int |
| Value.getIthBoolean(index) |
| Description |
For ArrayValues: returns the data at index as a boolean value. This operation
is not supported by all ArrayValue types. |
| Input parameters |
param index: Index to use type
index: int |
| Return value |
returns: bool at given index
rtype: bool |
| Value.getIthFloat(index) |
| Description |
For ArrayValues: returns the data at index as a float. This operation is not
supported by all ArrayValue types. |
| Input parameters |
param index: Index to use type
index: int |
| Return value |
returns: Float at given index
rtype: float |
| Value.getIthInteger(index) |
| Description |
For ArrayValues: returns the data at index as an int. This operation is not
supported by all ArrayValue types. |
| Input parameters |
param index: Index to use type
index: int |
| Return value |
returns: int at given index
rtype: int |
| Value.getIthString(index) |
| Description |
For ArrayValues: returns the data at index as a string. This operation is not
supported by all ArrayValue types. |
| Input parameters |
param index: Index to use type
index: int |
| Return value |
returns: String at given index
rtype: str |
| Value.getRawValue() |
| Description |
Returns the raw swigpython3 Value instance wrapped by this instance. |
| Input parameters |
None |
| Return value |
returns: Wrapped value
rtype: swigpython3.Value (or subclass). See
getClassTag() for details. |
| Value.getSize() |
| Description |
Returns the size of the value. |
| Input parameters |
None |
| Return value |
returns: Number of elements
rtype: int |
| Value.getString() |
| Description |
Returns the value's contents as a string. |
| Input parameters |
None |
| Return value |
returns: Value contents as string
rtype: str |
| Value.getStringArray() |
| Description |
Returns a copy(!) of the entire data set of a StringArrayValue. |
| Input parameters |
None |
| Return value |
returns: all strings contained in value
rtype: list |
| Value.setBoolean(val) |
| Description |
Sets the value to the given boolean value |
| Input parameters |
param val: Value to set type
val: bool |
| Return value |
None |
| Value.setFloat(val) |
| Description |
Sets the value's data to the given float value |
| Input parameters |
param val: Value to set type
val: float |
| Return value |
None |
| Value.setInteger(val) |
| Description |
Sets the value's data to the given int value. |
| Input parameters |
param val: Value to set type
val: int |
| Return value |
None |
| Value.setString(val) |
| Description |
Sets the value to the supplied string. The wrapped Value must support this
operation. |
| Input parameters |
param val: string to set type
val: str |
| Return value |
None |
| Value.toDictionary() |
| Description |
Returns a copy of a HashTableValue as a Python dict object. |
| Input parameters |
None |
| Return value |
returns: Hash table
rtype: dict |
Data descriptors defined here
| Value.__dict__ |
| Description |
dictionary for instance variables (if defined) |
| Value.__weakref__ |
| Description |
list of weak references to the object (if defined) |