1 #Copyright (C) 2008 Codethink Ltd
3 #This library is free software; you can redistribute it and/or
4 #modify it under the terms of the GNU Lesser General Public
5 #License version 2 as published by the Free Software Foundation.
7 #This program is distributed in the hope that it will be useful,
8 #but WITHOUT ANY WARRANTY; without even the implied warranty of
9 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 #GNU General Public License for more details.
11 #You should have received a copy of the GNU Lesser General Public License
12 #along with this program; if not, write to the Free Software
13 #Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
15 #------------------------------------------------------------------------------
17 class AccessibleFactory(object):
18 __accessible_interfaces = {}
20 def register_accessible_class(self, name, cls):
21 self.__accessible_interfaces[name] = cls
23 def get_accessible_class(self, name):
24 return self.__accessible_interfaces[name]
26 accessible_factory = AccessibleFactory()
28 #END----------------------------------------------------------------------------