]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/io/server/src/vbus_factory.cc
df7e5df4e93102c118f852a22a49a580be83fb8e
[l4.git] / l4 / pkg / io / server / src / vbus_factory.cc
1 /*
2  * (c) 2010 Alexander Warg <warg@os.inf.tu-dresden.de>
3  *     economic rights: Technische Universität Dresden (Germany)
4  *
5  * This file is part of TUD:OS and distributed under the terms of the
6  * GNU General Public License 2.
7  * Please see the COPYING-GPL-2 file for details.
8  */
9 #include "vbus_factory.h"
10
11 namespace Vi {
12
13 Device *
14 Dev_factory::create(std::string const &_class)
15 {
16   Name_map &m = name_map();
17   Name_map::iterator i = m.find(_class);
18   if (i == m.end())
19     {
20       printf("WARNING: cannot create virtual device: '%s'\n",
21              _class.c_str());
22       return 0;
23     }
24
25   return i->second->vcreate();
26 }
27
28 }