1 mike 1.11 //%/////////////////////////////////////////////////////////////////////////////
2 //
|
3 kumpf 1.12 // Copyright (c) 2000, 2001, 2002 BMC Software, Hewlett-Packard Company, IBM,
4 // The Open Group, Tivoli Systems
|
5 mike 1.11 //
6 // Permission is hereby granted, free of charge, to any person obtaining a copy
|
7 kumpf 1.12 // of this software and associated documentation files (the "Software"), to
8 // deal in the Software without restriction, including without limitation the
9 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
10 mike 1.11 // sell copies of the Software, and to permit persons to whom the Software is
11 // furnished to do so, subject to the following conditions:
12 //
|
13 kumpf 1.12 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
|
14 mike 1.11 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
15 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
16 kumpf 1.12 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
17 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
18 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
19 mike 1.11 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 //
22 //==============================================================================
23 //
24 // Author: Mike Brasher (mbrasher@bmc.com)
25 //
|
26 kumpf 1.14 // Modified By: Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
|
27 mike 1.11 //
28 //%/////////////////////////////////////////////////////////////////////////////
29
30 #ifndef Pegasus_Char16_h
31 #define Pegasus_Char16_h
32
33 #include <iostream>
34 #include <Pegasus/Common/Config.h>
|
35 kumpf 1.13 #include <Pegasus/Common/Linkage.h>
|
36 mike 1.11
37 PEGASUS_NAMESPACE_BEGIN
38
39 /** The Char16 class represents a CIM sixteen bit character (char16).
40 This class is a trivial wrapper for a sixteen bit integer. It is used
41 as the element type in the String class (used to represent the CIM
42 string type). Ordinarily Uint16 could be used; however, a distinguishable
43 type was needed for the purposes of function overloaded which occurs in
44 the CIMValue class.
45 */
46 class PEGASUS_COMMON_LINKAGE Char16
47 {
48 public:
49
50 /// Constructor Char16
|
51 kumpf 1.14 Char16();
|
52 mike 1.11
53 /// Constructor Char16
|
54 kumpf 1.14 Char16(Uint16 x);
|
55 mike 1.11
56 /// Constructor Char16
|
57 kumpf 1.14 Char16(const Char16& x);
|
58 mike 1.11
59 /** Destructor. */
|
60 kumpf 1.14 ~Char16();
|
61 mike 1.11
62 /// Constructor Char16
|
63 kumpf 1.14 Char16& operator=(Uint16 x);
|
64 mike 1.11
65 /// Constructor Char16
|
66 kumpf 1.14 Char16& operator=(const Char16& x);
|
67 mike 1.11
68 /// Implicit converter from Char16 to Uint16
|
69 kumpf 1.14 operator Uint16() const;
|
70 mike 1.11
71 private:
72
73 Uint16 _code;
74 };
75
|
76 kumpf 1.14 PEGASUS_COMMON_LINKAGE Boolean operator==(const Char16& x, const Char16& y);
77 PEGASUS_COMMON_LINKAGE Boolean operator==(const Char16& x, char y);
78 PEGASUS_COMMON_LINKAGE Boolean operator==(char x, const Char16& y);
79 PEGASUS_COMMON_LINKAGE Boolean operator!=(const Char16& x, const Char16& y);
80 PEGASUS_COMMON_LINKAGE Boolean operator!=(const Char16& x, char y);
81 PEGASUS_COMMON_LINKAGE Boolean operator!=(char x, const Char16& y);
|
82 mike 1.11
83 PEGASUS_NAMESPACE_END
84
85 #endif /* Pegasus_Char16_h */
|