Esempio n. 1
0
def _addDirection(direction):
    '''Create a function decorator which adds the given direction to
    the directions property for the function.

    * direction -- The direction

    '''
    return listProperty(_DIRECTIONS_PROP, direction)
Esempio n. 2
0
def createClassFilter(className):
    '''Create a function decorator which is used to filter received objects
    to find objects with the given class name.

    * className -- The class name used to filter received objects

    '''
    return listProperty(_CLASSES_PROP, className)
Esempio n. 3
0
def createClassFilter(className):
    '''Create a function decorator which is used to filter received objects
    to find objects with the given class name.

    * className -- The class name used to filter received objects

    '''
    return listProperty(_CLASSES_PROP, className)
Esempio n. 4
0
    def wrapper(text, *args, **kwargs):
        '''A wrapper function which takes text and creates a decorator
        which adds the given speech rule to the list of speech rules
        for the decorated function.

        * text -- The text to use with the Rule

        '''
        speechRule = ruleClass(text, *args, **kwargs)
        return listProperty(_SPEECH_RULES_PROP, speechRule)
Esempio n. 5
0
    def wrapper(text, *args, **kwargs):
        '''A wrapper function which takes text and creates a decorator
        which adds the given speech rule to the list of speech rules
        for the decorated function.

        * text -- The text to use with the Rule

        '''
        speechRule = ruleClass(text, *args, **kwargs)
        return listProperty(_SPEECH_RULES_PROP, speechRule)