libyui
 
Loading...
Searching...
No Matches
YWidgetID.h
1/*
2 Copyright (C) 2000-2012 Novell, Inc
3 This library is free software; you can redistribute it and/or modify
4 it under the terms of the GNU Lesser General Public License as
5 published by the Free Software Foundation; either version 2.1 of the
6 License, or (at your option) version 3.0 of the License. This library
7 is distributed in the hope that it will be useful, but WITHOUT ANY
8 WARRANTY; without even the implied warranty of MERCHANTABILITY or
9 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
10 License for more details. You should have received a copy of the GNU
11 Lesser General Public License along with this library; if not, write
12 to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
13 Floor, Boston, MA 02110-1301 USA
14*/
15
16
17/*-/
18
19 File: YWidgetID.h
20
21 Author: Stefan Hundhammer <shundhammer@suse.de>
22
23/-*/
24
25#ifndef YWidgetID_h
26#define YWidgetID_h
27
28#include <iosfwd>
29#include <string>
30
31
32
37{
38protected:
43
44public:
48 virtual ~YWidgetID() {}
49
53 virtual bool isEqual( YWidgetID * otherID ) const = 0;
54
59 virtual std::string toString() const = 0;
60
61private:
65 YWidgetID( const YWidgetID & orig );
66};
67
68
73{
74public:
75
79 YStringWidgetID( const std::string & value );
80
84 virtual ~YStringWidgetID();
85
91 virtual bool isEqual( YWidgetID * otherID ) const;
92
99 virtual std::string toString() const;
100
104 std::string value() const;
105
109 const std::string & valueConstRef() const;
110
111private:
112 std::string _value;
113};
114
115std::ostream & operator<<( std::ostream & stream, const YWidgetID * id );
116
117
118#endif // YWidgetID_h
const std::string & valueConstRef() const
Definition YWidgetID.cc:73
virtual std::string toString() const
Definition YWidgetID.cc:59
std::string value() const
Definition YWidgetID.cc:66
virtual bool isEqual(YWidgetID *otherID) const
Definition YWidgetID.cc:46
YStringWidgetID(const std::string &value)
Definition YWidgetID.cc:32
virtual ~YStringWidgetID()
Definition YWidgetID.cc:39
Definition YWidgetID.h:37
virtual bool isEqual(YWidgetID *otherID) const =0
virtual std::string toString() const =0
YWidgetID()
Definition YWidgetID.h:42
virtual ~YWidgetID()
Definition YWidgetID.h:48