libyui
YExternalWidgets.h
1 /*
2  Copyright (C) 2013 Angelo Naselli <anaselli at linux dot it>
3 
4  This file is part of libyui project
5 
6  This library is free software; you can redistribute it and/or modify
7  it under the terms of the GNU Lesser General Public License as
8  published by the Free Software Foundation; either version 2.1 of the
9  License, or (at your option) version 3.0 of the License. This library
10  is distributed in the hope that it will be useful, but WITHOUT ANY
11  WARRANTY; without even the implied warranty of MERCHANTABILITY or
12  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
13  License for more details. You should have received a copy of the GNU
14  Lesser General Public License along with this library; if not, write
15  to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
16  Floor, Boston, MA 02110-1301 USA
17 */
18 
19 #ifndef YExternalWidgets_h
20 #define YExternalWidgets_h
21 #include <map>
22 #include <string>
23 
25 
30 {
31  friend class YExternalWidgetsTerminator;
32 
33 protected:
40  YExternalWidgets( const std::string& name );
41 
42 public:
43 
47  virtual ~YExternalWidgets();
48 
49 
58  static YExternalWidgets * externalWidgets( const std::string & name );
59 
80  static YExternalWidgetFactory * externalWidgetFactory( const std::string & name );
81 
82 protected:
83 
92 
93 private:
94 
96  std::string _name;
97 
99  YExternalWidgetFactory* _factory;
100 
102  static std::map<std::string, YExternalWidgets *> _externalWidgets;
103 };
104 
105 #endif // YExternalWidgets_h
virtual YExternalWidgetFactory * createExternalWidgetFactory()=0
YExternalWidgets(const std::string &name)
Definition: YExternalWidgets.cc:35
Definition: YExternalWidgets.cc:100
static YExternalWidgets * externalWidgets(const std::string &name)
Definition: YExternalWidgets.cc:60
Definition: YExternalWidgets.h:29
virtual ~YExternalWidgets()
Definition: YExternalWidgets.cc:52
YExternalWidgetFactory * externalWidgetFactory()
Definition: YExternalWidgets.cc:83
Definition: YExternalWidgetFactory.h:30