|
Telescience Resource Kit
TReK Python
5.4.0 ART
|
This class maps unsigned integer values to strings for enumeration. More...
Inherits BaseEnumerator.
Public Member Functions | |
Initialize / Finalize | |
Functions handling class initialization and finalization. | |
def | Enumerator ( Optional[Enumerator] enumerator=None, Optional[c_void_p] native_ptr=None, is_clone: bool=False -> None ) -> def |
Class initializer. More... | |
def | __eq__ (enumerator: object -> bool ) -> def |
Equality operator "==". More... | |
def | clone ( -> object ) -> def |
Creates a new instance of the object with the same contents. More... | |
def | copy (copy_from: object -> None ) -> def |
Copies the contents of the provided 'copy_from' Enumerator. More... | |
def | initialize ( -> None ) -> def |
Initializes the object. More... | |
def | load_file (filename: str -> None ) -> def |
Loads the Enumerator definition from the specified file. More... | |
def | save_file (filename: str -> None ) -> def |
Saves the Enumerator definition to the specified file. More... | |
Enumeration Values | |
Functions handling enumeration names and values. | |
def | add_enum (int_value: int, str_value: str, end_value: int=0 -> None ) -> def |
Adds the string values as enumeration for the unsigned integer value. More... | |
def | get_number_of_enumerations ( -> int ) -> def |
Returns the current number of enumerations. More... | |
def | get_enum_value (enum_name: str -> int ) -> def |
Finds the corresponding unsigned integer value for the specified string. More... | |
def | get_enum_name (enum_value: int -> str ) -> def |
Finds the corresponding string value for the specified unsigned integer. More... | |
def | get_enum_names ( -> list[str] ) -> def |
Gets a list of the string enumerations. More... | |
def | get_enum_values ( -> list[int] ) -> def |
Gets a list of the integer values. More... | |
def | get_enum_ranges ( -> list[EnumeratorRangePoint] ) -> def |
Gets a list of the begin and end values for which enumerators exist. More... | |
def | remove_enum_all ( -> None ) -> def |
Remove all enumerations. More... | |
def | remove_enum_name (enum_name: str -> None ) -> def |
Removes the enumeration specifed by the string. More... | |
def | remove_enum_value (enum_value: int -> None ) -> def |
Removes the enumeration specifed by the integer. More... | |
Initialize / Finalize | |
Functions handling class initialization and finalization. | |
Enumeration Values | |
Functions handling enumeration names and values. | |
![]() | |
def | remove_all_attributes ( -> None ) -> def |
Removes all attributes. | |
def | remove_attribute (name: str -> None ) -> def |
Removes the attribute by name. More... | |
def | add_attribute (name: str, value: str -> None ) -> def |
Adds an attribute to the item. More... | |
def | get_alias ( -> str ) -> def |
Returns the alias of the item. More... | |
def | get_attribute (name: str -> str ) -> def |
Get the value of the specified attribute. More... | |
def | get_attribute_list ( -> list[str] ) -> def |
Gets a list of the attribute names. More... | |
def | get_name ( -> str ) -> def |
Returns the name of the item. More... | |
def | get_long_description ( -> str ) -> def |
Returns the long description of the item. More... | |
def | get_short_description ( -> str ) -> def |
Returns the short description of the item. More... | |
def | get_user_description ( -> str ) -> def |
Returns the user description of the item. More... | |
def | get_owner ( -> str ) -> def |
Returns the owner of the item. More... | |
def | get_path ( -> str ) -> def |
Returns the path for the item. More... | |
def | set_name (name: str -> None ) -> def |
Sets the name of the item. More... | |
def | set_alias (alias: str -> None ) -> def |
Sets the alias of the item. More... | |
def | set_short_description (description: str -> None ) -> def |
Sets the short description of the item. More... | |
def | set_long_description (description: str -> None ) -> def |
Sets the long description of the item. More... | |
def | set_user_description (description: str -> None ) -> def |
Sets the user description of the item. More... | |
def | set_owner (owner: str -> None ) -> def |
Sets the owner of the item. More... | |
def | set_path (path: str -> None ) -> def |
Sets the path of the item. More... | |
This class maps unsigned integer values to strings for enumeration.
The unsigned integer values is limited to 32 bits.
( | enumerator | : Optional[Enumerator] | |
native_ptr | : Optional[c_void_p] | ||
is_clone | : bool | ||
) | -> None |
Class initializer.
[in] | enumerator | (Optional) The Enumerator to copy construct from. |
[in] | native_ptr | (Optional) Internal parameter, do not provide. |
[in] | is_clone | (Optional) Internal parameter, do not provide. |
Reimplemented from NamedItem.
( | enumerator | : object | ) | -> bool |
Equality operator "==".
Reimplemented from NamedItem.
( | int_value | : int | |
str_value | : str | ||
end_value | : int | ||
) | -> None |
Adds the string values as enumeration for the unsigned integer value.
[in] | int_value | The integer value. |
[in] | str_value | The string value. |
[in] | end_value | Ignored for this class (default 0). |
TrekError | 15005 - TREK_DATA_ALREADY_EXISTS |
Reimplemented from BaseEnumerator.
( | ) | -> object |
Creates a new instance of the object with the same contents.
Reimplemented from BaseEnumerator.
( | copy_from | : object | ) | -> None |
Copies the contents of the provided 'copy_from' Enumerator.
[in] | copy_from | Enumerator to copy from. |
TypeError | if 'copy_from' is not a Enumerator. |
Reimplemented from NamedItem.
( | enum_value | : int | ) | -> str |
Finds the corresponding string value for the specified unsigned integer.
[in] | enum_value | Integer to find. |
TrekError | 15007 - TREK_DATA_DOES_NOT_EXIST |
Reimplemented from BaseEnumerator.
( | ) | -> list[str] |
Gets a list of the string enumerations.
Reimplemented from BaseEnumerator.
( | ) | -> list[EnumeratorRangePoint] |
Gets a list of the begin and end values for which enumerators exist.
For Enumerator, the begin and end values will always be the same.
Reimplemented from BaseEnumerator.
( | enum_name | : str | ) | -> int |
Finds the corresponding unsigned integer value for the specified string.
[in] | enum_name | The name for which a value is desired. |
TrekError | 15007 - TREK_DATA_DOES_NOT_EXIST |
Reimplemented from BaseEnumerator.
( | ) | -> list[int] |
Gets a list of the integer values.
Reimplemented from BaseEnumerator.
( | ) | -> int |
Returns the current number of enumerations.
Reimplemented from BaseEnumerator.
( | ) | -> None |
Initializes the object.
All values are set to default state. New instances need not be initialized.
Reimplemented from NamedItem.
( | filename | : str | ) | -> None |
Loads the Enumerator definition from the specified file.
Reads an XML Enumerator.
[in] | filename | The file from which to load the enumerator object. |
TrekError | 32007 - TUA_XML_PARSER_ERROR, 1 - FAIL, etc. |
( | ) | -> None |
Remove all enumerations.
Reimplemented from BaseEnumerator.
( | enum_name | : str | ) | -> None |
Removes the enumeration specifed by the string.
[in] | enum_name | Name to find and remove. |
TrekError | 15007 - TREK_DATA_DOES_NOT_EXIST |
Reimplemented from BaseEnumerator.
( | enum_value | : int | ) | -> None |
Removes the enumeration specifed by the integer.
[in] | enum_value | Integer to find and remove. |
TrekError | 15007 - TREK_DATA_DOES_NOT_EXIST |
Reimplemented from BaseEnumerator.
( | filename | : str | ) | -> None |
Saves the Enumerator definition to the specified file.
Writes an XML Enumerator.
[in] | filename | The file to save the enumerator object. |
TrekError | 32007 - TUA_XML_PARSER_ERROR, 1 - FAIL, etc. |