libyui-mga-ncurses  1.0.1
YNCWE.cc
1 /*
2  This library is free software; you can redistribute it and/or modify
3  it under the terms of the GNU Lesser General Public License as
4  published by the Free Software Foundation; either version 2.1 of the
5  License, or (at your option) version 3.0 of the License. This library
6  is distributed in the hope that it will be useful, but WITHOUT ANY
7  WARRANTY; without even the implied warranty of MERCHANTABILITY or
8  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
9  License for more details. You should have received a copy of the GNU
10  Lesser General Public License along with this library; if not, write
11  to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
12  Floor, Boston, MA 02110-1301 USA
13 */
14 
15 
16 /*-/
17 
18  File: YNCWE.cc
19 
20  Author: Angelo Naselli <anaselli@linux.it>
21 
22 /-*/
23 
24 #include "YNCWE.h"
25 #include "YMGANCWidgetFactory.h"
26 #include <yui/YUIException.h>
27 #include <string>
28 
29 YNCWE::YNCWE( const std::string& name ) : YExternalWidgets(name)
30 {
31 }
32 
33 YNCWE::~YNCWE()
34 {
35 }
36 
37 YExternalWidgetFactory* YNCWE::createExternalWidgetFactory()
38 {
39  YMGANCWidgetFactory * factory = new YMGANCWidgetFactory();
40  YUI_CHECK_NEW( factory );
41 
42  return factory;
43 }
44 
45 YExternalWidgets * createExternalWidgets(const char* name)
46 {
47  std::string pluginName(name);
48  YNCWE * ew = new YNCWE( pluginName );
49  YUI_CHECK_NEW ( ew );
50 
51  return YExternalWidgets::externalWidgets(pluginName);
52 }
Concrete widget factory for mandatory widgets.
Definition: YNCWE.h:28