~ubuntu-branches/ubuntu/gutsy/libcorelinux/gutsy

« back to all changes in this revision

Viewing changes to corelinux/Identifier.hpp

  • Committer: Bazaar Package Importer
  • Author(s): Christophe Prud'homme
  • Date: 2001-12-29 17:43:34 UTC
  • Revision ID: james.westby@ubuntu.com-20011229174334-ejlsuilsiro5vmzr
Tags: 0.4.32-4
* fix config.{guess,sub} out of date on hppa and s390 (closes: #124296,#121830)
* try to be more descriptive in the description of the package  (closes: #115758)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#if !defined (__IDENTIFIER_HPP)
 
2
#define __IDENTIFIER_HPP
 
3
 
 
4
/*
 
5
  CoreLinux++ 
 
6
  Copyright (C) 1999,2000 CoreLinux Consortium
 
7
  
 
8
   The CoreLinux++ Library is free software; you can redistribute it and/or
 
9
   modify it under the terms of the GNU Library General Public License as
 
10
   published by the Free Software Foundation; either version 2 of the
 
11
   License, or (at your option) any later version.
 
12
 
 
13
   The CoreLinux++ Library Library is distributed in the hope that it will 
 
14
   be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
16
   Library General Public License for more details.
 
17
 
 
18
   You should have received a copy of the GNU Library General Public
 
19
   License along with the GNU C Library; see the file COPYING.LIB.  If not,
 
20
   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 
21
   Boston, MA 02111-1307, USA.  
 
22
*/   
 
23
 
 
24
#if !defined IN_COMMON_HPP
 
25
   #error Identifier.hpp is included by Common.hpp only.
 
26
#endif
 
27
 
 
28
namespace corelinux
 
29
{
 
30
 
 
31
   DECLARE_CLASS( Identifier );
 
32
 
 
33
   /**
 
34
   An Identifier is a abstract representation of identity. Derivations
 
35
   implement ConcreteIdentifiers (Strings, Widgets, UUID, whatever).
 
36
   The logical operators call virtual methods which derivations
 
37
   should define.as all the defaults return true.
 
38
   */
 
39
 
 
40
   class Identifier : public CoreLinuxObject
 
41
   {
 
42
   public:
 
43
 
 
44
                           /// Default Constructor
 
45
 
 
46
                           Identifier( void );
 
47
 
 
48
                           /** Copy Constructor
 
49
                           @param Identifier const reference
 
50
                           */
 
51
 
 
52
                           Identifier( IdentifierCref );
 
53
 
 
54
                           /// Virtual Destructor  
 
55
 
 
56
      virtual              ~Identifier( void );
 
57
 
 
58
      //
 
59
      // Operator overloads
 
60
      //
 
61
               /**
 
62
               Assignment operator overload
 
63
               @param  Identifier const reference
 
64
               @return Identifier reference to self
 
65
               */
 
66
            
 
67
               IdentifierRef  operator=( IdentifierCref );
 
68
 
 
69
               /**
 
70
               Equality operator overload calls isEqual
 
71
               virtual method.
 
72
               @param Identifier const reference
 
73
               @return true if equal, false otherwise
 
74
               */
 
75
 
 
76
               bool        operator==( IdentifierCref ) const;
 
77
 
 
78
               /**
 
79
               Non-equality operator overload returns
 
80
               !isEqual(aRef)
 
81
               @param Identifier const reference
 
82
               @return false if equal, true otherwise
 
83
               */
 
84
 
 
85
               bool        operator!=( IdentifierCref ) const;
 
86
 
 
87
               /**
 
88
               Less than operator overload. Calls isLessThan 
 
89
               virtual method.
 
90
               @param Identifier const reference
 
91
               @return true if less than, false otherwise
 
92
               */
 
93
 
 
94
               bool        operator<( IdentifierCref ) const;
 
95
 
 
96
               /**
 
97
               Less than or equal operator overload. Calls 
 
98
               isLessThanOrEqual virtual method.
 
99
               @param Identifier const reference
 
100
               @return true if less than or equal, false otherwise
 
101
               */
 
102
 
 
103
               bool        operator<=( IdentifierCref ) const;
 
104
 
 
105
               /**
 
106
               Greater than operator overload. Calls isGreaterThan
 
107
               virtual method.
 
108
               @param Identifier const reference
 
109
               @return true if greater than, false otherwise
 
110
               */
 
111
 
 
112
               bool        operator>( IdentifierCref ) const;
 
113
 
 
114
               /**
 
115
               Greater than or equal operator overload. Calls 
 
116
               isGreaterThanOrEqual virtual method.
 
117
               @param Identifier const reference
 
118
               @return true if greater than or equal, false otherwise
 
119
               */
 
120
 
 
121
               bool        operator>=( IdentifierCref ) const;
 
122
 
 
123
   protected:
 
124
 
 
125
               /**
 
126
               Equality method
 
127
               @param Identifier const reference
 
128
               @return true if equal, false otherwise
 
129
               */
 
130
         
 
131
      virtual  bool        isEqual( IdentifierCref ) const ;
 
132
         
 
133
               /**
 
134
               Less than method
 
135
               @param Identifier const reference
 
136
               @return true if less than, false otherwise
 
137
               */
 
138
         
 
139
      virtual  bool        isLessThan( IdentifierCref ) const ;
 
140
         
 
141
               /**
 
142
               Less than or equal method.
 
143
               @param Identifier const reference
 
144
               @return true if less than or equal, false otherwise
 
145
               */
 
146
         
 
147
      virtual  bool        isLessThanOrEqual( IdentifierCref ) const ;
 
148
         
 
149
               /**
 
150
               Greater than method.
 
151
               @param Identifier const reference
 
152
               @return true if greater than, false otherwise
 
153
               */
 
154
         
 
155
      virtual  bool        isGreaterThan( IdentifierCref ) const ;
 
156
         
 
157
               /**
 
158
               Greater than or equal method.
 
159
               @param Identifier const reference
 
160
               @return true if greater than or equal, false otherwise
 
161
               */
 
162
 
 
163
      virtual  bool        isGreaterThanOrEqual( IdentifierCref ) const ;
 
164
 
 
165
   };
 
166
 
 
167
}
 
168
          
 
169
#endif   // if !defined(__IDENTIFIER_HPP)
 
170
 
 
171
/*
 
172
   Common rcs information do not modify
 
173
   $Author: prudhomm $
 
174
   $Revision: 1.1 $
 
175
   $Date: 2000/04/23 20:43:13 $
 
176
   $Locker:  $
 
177
*/
 
178
 
 
179
 
 
180