Пример #1
0
def __get_curve__(pip_curves, index, locator_name):
    """Gets curve class instance entry from given input dictonary. If the entry is not present,
    entry is firstly created in dictionary and then returned.

    :param pip_curves: input dictionary of curve class instances
    :type pip_curves: dict[int, io_scs_tools.exp.pip.curve.Curve]
    :param index: index of curve we are looking for
    :type index: int
    :param locator_name: start locator name
    :type locator_name: str
    :return: curve class instance
    :rtype: io_scs_tools.exp.pip.curve.Curve
    """
    if index not in pip_curves:

        pip_curves[index] = Curve(index, _tokenize_name(locator_name), locator_name)

    return pip_curves[index]
Пример #2
0
def __get_curve__(pip_curves, index, locator_name):
    """Gets curve class instance entry from given input dictonary. If the entry is not present,
    entry is firstly created in dictionary and then returned.

    :param pip_curves: input dictionary of curve class instances
    :type pip_curves: dict[int, io_scs_tools.exp.pip.curve.Curve]
    :param index: index of curve we are looking for
    :type index: int
    :param locator_name: start locator name
    :type locator_name: str
    :return: curve class instance
    :rtype: io_scs_tools.exp.pip.curve.Curve
    """
    if index not in pip_curves:

        pip_curves[index] = Curve(index, _tokenize_name(locator_name), locator_name)

    return pip_curves[index]