Ejemplo n.º 1
0
    def __contains__(self, value):
        '''
        Check if specific type is allowed
        '''

        return (value in self.channel_types or
                BaseType.__contains__(self, value))
Ejemplo n.º 2
0
    def __contains__(self, value):
        '''
        Look up for type among supported channels. Child chlasses should
        overload this method to add new channels
        '''

        return (value in self.input_types or
                BaseType.__contains__(self, value))
Ejemplo n.º 3
0
    def __init__(self, input_type):
        '''
        Initialize with user defined input type
        '''

        BaseType.__init__(self, input_type, "input_type")
Ejemplo n.º 4
0
    def __init__(self, channel_type):
        '''
        Initialize channel with specific type
        '''

        BaseType.__init__(self, channel_type, "channel_type")