(cls, name, types, default=None, description=None)
Register a state option.

        :param str name:        Name of the state option.
        :param types:           A collection of allowed types of this state option.
        :param default:         The default value of this state option.
        :param str description: The description of this state option.
        :return:                None
Register a state option.
Register a state option .
def register_option(cls, name, types, default=None, description=None):
        """
        Register a state option.

        :param str name:        Name of the state option.
        :param types:           A collection of allowed types of this state option.
        :param default:         The default value of this state option.
        :param str description: The description of this state option.
        :return:                None
        """

        if name in cls.OPTIONS:
            raise SimStateOptionsError("A state option with the same name has been registered.")

        if isinstance(types, type):
            types = { types }

        o = StateOption(name, types, default=default, description=description)
        cls.OPTIONS[name] = o
def register_option ( cls , name , types , default = None , description = None ) : if name in cls . OPTIONS : raise SimStateOptionsError ( "A state option with the same name has been registered." ) if isinstance ( types , type ) : types = { types } o = StateOption ( name , types , default = default , description = description ) cls . OPTIONS [ name ] = o