NBOUtils¶
Bases: object
Utils class provides static utility functions.
This class contains helper functions for converting between enum types and their string representations.
NBOTypeToString(type)
staticmethod
¶
Convert ENBOType enum to string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
type
|
int
|
The enum to convert |
required |
Returns:
| Type | Description |
|---|---|
string
|
The corresponding string value |
stringToNBOType(name)
staticmethod
¶
Convert string to ENBOType.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
string
|
The string to convert |
required |
Returns:
| Type | Description |
|---|---|
int
|
The corresponding enum |
NBOTypeToValue(type)
staticmethod
¶
Convert ENBOType enum to value.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
type
|
int
|
: The enum to convert |
required |
Returns:
| Type | Description |
|---|---|
int
|
The corresponding value |
valueToNBOType(value)
staticmethod
¶
Convert value to ENBOType.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
: The value to convert |
required |
Returns:
| Type | Description |
|---|---|
int
|
The corresponding enum |
createElementFromType(type)
staticmethod
¶
Create an element instance from an ENBOType.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
: The type identifying the element to create |
required |
Returns:
| Type | Description |
|---|---|
NBOBaseClass
|
The created element, or nullptr if type is UNKNOWN |
getVersion()
staticmethod
¶
Get the NBO library version string.
Returns:
| Type | Description |
|---|---|
string
|
The version string in the format "NBO vMAJOR.MINOR.PATCH[SUFFIX]" |