OSFI-Python
3.10.1
OpenSF Integration Library
|
Public Member Functions | |
def | __init__ (self, int n, typing.Callable[[str], typing.Any] parse_fun, bool is_str) |
def | parseSingleValue (self, str x) |
def | parseMultipleValues (self, str value, typing.Optional[int] expectedLen=None) |
def | splitValues (self, str string, bool expected_empty=False) |
Static Public Member Functions | |
str | getParamTypeName ('ParamType' paramType) |
'ParamType' | valueOf (str typeName) |
Static Public Attributes | |
int | INTEGER = 1, int, False |
int | FLOAT = 2, float, False |
int | BOOLEAN = 3, parseSingleBool, False |
int | STRING = 4, lambda x: x, True |
int | FILE = 5, parseSingleFile, True |
int | FOLDER = 6, parseSingleFile, True |
int | TIME = 7, TimeValue.parse, False |
Internal definition of parameter types
def OSFI.ParamType.ParamType.parseMultipleValues | ( | self, | |
str | value, | ||
typing.Optional[int] | expectedLen = None |
||
) |
Parse a sequence of values in a string into a vector. If expectedLen is given, also assert that the number of parsed values equals that argument.
References OSFI.ParamType.ParamType.__parseSingleVal, OSFI.Parameter.Parameter.splitValues(), and OSFI.ParamType.ParamType.splitValues().
def OSFI.ParamType.ParamType.splitValues | ( | self, | |
str | string, | ||
bool | expected_empty = False |
||
) |
Split values into the tokens to be parsed @param string unparsed str or None (only for empty dimensions in ARRAY parameters) @param expected_empty True if the data corresponds to an empty dimension in an ARRAY param @return List[str] with the unparsed but split values
References OSFI.ParamType.ParamType.__isStringBased.