1# Copyright 2016 Free Software Foundation, Inc.
2# This file is part of GNU Radio
3#
4# GNU Radio Companion is free software; you can redistribute it and/or
5# modify it under the terms of the GNU General Public License
6# as published by the Free Software Foundation; either version 2
7# of the License, or (at your option) any later version.
8#
9# GNU Radio Companion is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12# GNU General Public License for more details.
13#
14# You should have received a copy of the GNU General Public License
15# along with this program; if not, write to the Free Software
16# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
17
18from .port import Port, Element
19
20
21class PortClone(Port):
22
23    def __init__(self, parent, direction, master, name, key):
24        Element.__init__(self, parent)
25        self.master_port = master
26
27        self.name = name
28        self.key = key
29        self.multiplicity = 1
30
31    def __getattr__(self, item):
32        return getattr(self.master_port, item)
33
34    def add_clone(self):
35        raise NotImplementedError()
36
37    def remove_clone(self, port):
38        raise NotImplementedError()
39