maxon.Data¶
Description¶
maxon.Data
class.maxon.DataType
).Inheritance diagram¶
Inheritance
Parent Class:
Children Classes:
maxon.IdStruct
maxon.LanguageRef
maxon.DataDescription
maxon.Col4
maxon.ParametricType
maxon.Mat3
maxon.ProgressRef
Methods Signature¶
|
Creates a Data and initializes it with the given type. |
Returns the HashCode of the current maxon.DataType. |
|
|
Returns the
maxon.DataType which is passed to register the class via the @dec.MAXON_XXX functionss |
|
Checks if a Data is empty. |
Checks if the data is a NullValue. |
|
|
Converts the data to the expected type (built-in). |
|
Returns a string representation of the content. |
|
Used by copy.copy. |
|
Used by copy.deepcopy. |
|
Performs an equality comparison. |
|
Performs a greater or equal than comparison. |
|
Performs a greater than comparison. |
|
Returns the hash code of a data. |
|
Initializes the appropriate C++ Data object and store it within the _data member. |
|
Performs a lesser or equal than comparison. |
|
Performs a lesser than comparison. |
|
|
|
Performs an inequality comparison. |
|
Returns the string representation of a data. |
|
Returns the string representation of a data. |
Methods Definition¶
-
classmethod
Data.
Create
(cls, *args)¶ Creates a Data and initializes it with the given type.
- Parameters
cls (
maxon.DataType
) – The datatype to create.args (Any) – Optional argument to be passed to the creation.
- Returns
maxon.Data
initialized to the given type on success.- Return type
Any.
-
Data.
GetHashCode
()¶ Returns the HashCode of the current maxon.DataType.
- Returns
The maxon.DataType hash code.
- Return type
int
-
Data.
GetType
()¶ - Returns the
maxon.DataType
which is passed to register the class via the @dec.MAXON_XXX functionss E.g: net.maxon.datatype.int32If you want to know the real datatype, use maxon.Data.GetRealType.This can indeed differ e.g. for types when a tuple or basearray is used.In this case the array GetRealType() returns the underlying type including the template parameter- Returns
Return the DataType of the current
maxon.Data
.- Return type
maxon.DataType
-
Data.
IsEmpty
()¶ Checks if a Data is empty.
- Returns
True if it doesn’t contain any data otherwise False.
- Return type
bool
-
Data.
IsNullValue
()¶ Checks if the data is a NullValue.
- Returns
True if the represented Data is a NullValue otherwise False.
- Return type
bool
-
Data.
MaxonConvert
(expected=None)¶ Converts the data to the expected type (built-in).
- Parameters
expected (Any) – The expected type after the conversion.
- Returns
The data converted.
- Return type
Same as expected
-
Data.
ToString
()¶ Returns a string representation of the content.
- Returns
The string representation of the content of the
maxon.Data
.- Return type
maxon.String
-
Data.
__copy__
()¶ Used by copy.copy. May fail if the C++ Data does not implement a logic for copying itself.
-
Data.
__deepcopy__
(memo)¶ Used by copy.deepcopy. May fail if the C++ Data does not implement a logic for copying itself.
-
Data.
__eq__
(b)¶ Performs an equality comparison. It may not work since not all data implement the Compare method.
- Parameters
b (
maxon.Data
) – The other data to compare against- Returns
True if other is equal to the current value, otherwise False.
- Return type
bool
-
Data.
__ge__
(b)¶ Performs a greater or equal than comparison. It may not work since not all data implement the Compare method.
- Parameters
b (
maxon.Data
) – The other data to compare against.- Returns
True if other is greater or equal than current value, otherwise False.
- Return type
bool
-
Data.
__gt__
(b)¶ Performs a greater than comparison. It may not work since not all data implement the Compare method.
- Parameters
b (
maxon.Data
) – The other data to compare against.- Returns
True if other is greater than current value, otherwise False.
- Return type
bool
-
Data.
__hash__
()¶ Returns the hash code of a data.
-
Data.
__init__
(C=None)¶ Initializes the appropriate C++ Data object and store it within the _data member.
If C is a Data then _data store a copy the C++ Data is done and stored.If C is a C++ Data then _data store a reference of the C++ Data.If C is not defined the C++ data is created and stored in the _data member.- Parameters
C (Union[None,
maxon.Data
]) – Input data from which the Data should be created.
-
Data.
__le__
(b)¶ Performs a lesser or equal than comparison. It may not work since not all data implement the Compare method.
- Parameters
b (
maxon.Data
) – The other data to compare against.- Returns
True if other is lesser or equal than current value, otherwise False.
- Return type
bool
-
Data.
__lt__
(a)¶ Performs a lesser than comparison. It may not work since not all data implement the Compare method.
- Parameters
a (
maxon.Data
) – The other data to compare against.- Returns
True if other is lesser than current value, otherwise False.
- Return type
bool
-
Data.
__maxon_convert__
(expected=None)¶
-
Data.
__ne__
(b)¶ Performs an inequality comparison. It may not work since not all data implement the Compare method.
- Parameters
b (
maxon.Data
) – The other data to compare against- Returns
True if other is unequal to the current value, otherwise False.
- Return type
bool
-
Data.
__repr__
()¶ Returns the string representation of a data.
- Return type
str
-
Data.
__str__
()¶ Returns the string representation of a data.
- Return type
str