1 karl 1.19 //%2003////////////////////////////////////////////////////////////////////////
|
2 mike 1.7 //
|
3 karl 1.19 // Copyright (c) 2000, 2001, 2002 BMC Software, Hewlett-Packard Development
4 // Company, L. P., IBM Corp., The Open Group, Tivoli Systems.
5 // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L. P.;
6 // IBM Corp.; EMC Corporation, The Open Group.
|
7 mike 1.7 //
8 // Permission is hereby granted, free of charge, to any person obtaining a copy
|
9 kumpf 1.13 // of this software and associated documentation files (the "Software"), to
10 // deal in the Software without restriction, including without limitation the
11 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
12 mike 1.7 // sell copies of the Software, and to permit persons to whom the Software is
13 // furnished to do so, subject to the following conditions:
14 //
|
15 kumpf 1.13 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
|
16 mike 1.7 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
17 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
18 kumpf 1.13 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
19 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
20 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
21 mike 1.7 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 //
24 //==============================================================================
25 //
26 // Author: Mike Brasher (mbrasher@bmc.com)
27 //
|
28 karl 1.11 // Modified By: Karl Schopmeyer(k.schopmeyer@opengroup.org)
|
29 kumpf 1.12 // Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
|
30 kumpf 1.15 // Carol Ann Krug Graves, Hewlett-Packard Company
31 // (carolann_graves@hp.com)
|
32 mike 1.7 //
33 //%/////////////////////////////////////////////////////////////////////////////
34
35 #ifndef Pegasus_Flavor_h
36 #define Pegasus_Flavor_h
37
38 #include <Pegasus/Common/Config.h>
39 #include <Pegasus/Common/String.h>
|
40 kumpf 1.14 #include <Pegasus/Common/Linkage.h>
|
41 mike 1.7
42 PEGASUS_NAMESPACE_BEGIN
|
43 mike 1.9
|
44 kumpf 1.15 /**
45 The CIMFlavor class implements the concept of the CIM qualifier flavor.
46 The qualifier flavor concept encapsulates the propagation and override
47 rules for the qualifier. The propagation rules define whether a qualifier
48 may be propagated from classes to derived classes, or from classes to
49 instances. The override rules define whether or not derived classes may
50 override a qualifier value, or whether it must be fixed for an entire
51 class hierarchy.
52
53 The possible values are: OVERRIDABLE, TOSUBCLASS, TOINSTANCE,
54 TRANSLATABLE, DISABLEOVERRIDE, RESTRICTED.
55 The flavor is a set of zero or more of these possible values.
56 */
57 class PEGASUS_COMMON_LINKAGE CIMFlavor
|
58 mike 1.7 {
|
59 kumpf 1.15 public:
60
61 /**
62 Constructs a CIMFlavor object with no flavor values set (default
63 constructor).
64 */
65 CIMFlavor ();
66
67 /**
68 Constructs a CIMFlavor object from an existing CIMFlavor object (copy
69 constructor).
70
|
71 kumpf 1.18 @param flavor another CIMFlavor object.
|
72 kumpf 1.15 */
73 CIMFlavor (const CIMFlavor & flavor);
74
75 /**
76 Assigns the value of one CIMFlavor object to another (assignment
77 operator).
78
|
79 kumpf 1.18 @param flavor a CIMFlavor object.
|
80 kumpf 1.15
81 @return the CIMFlavor object
82 */
83 CIMFlavor & operator= (const CIMFlavor & flavor);
84
85 /**
86 Adds the set of flavor values of the specified CIMFlavor object to this
87 CIMFlavor object.
88
|
89 kumpf 1.18 @param flavor a CIMFlavor object.
|
90 kumpf 1.15 */
91 void addFlavor (const CIMFlavor & flavor);
92
93 /**
94 Removes the specified set of flavor values from the CIMFlavor object.
95
|
96 kumpf 1.18 @param flavor a CIMFlavor representing the flavor
97 values to be removed.
|
98 kumpf 1.15 */
|
99 kumpf 1.16 void removeFlavor (const CIMFlavor & flavor);
|
100 kumpf 1.15
101 /**
102 Determines if every value in the specified CIMFlavor object is included
103 in this CIMFlavor object.
104
|
105 kumpf 1.18 @param flavor a CIMFlavor object.
|
106 kumpf 1.15
|
107 kumpf 1.18 @return true if every value in the specified CIMFlavor object is
108 included in the CIMFlavor object, false otherwise.
|
109 kumpf 1.15 */
110 Boolean hasFlavor (const CIMFlavor & flavor) const;
111
112 /**
113 Compares two CIMFlavor objects.
114
|
115 kumpf 1.18 @param flavor a CIMFlavor object.
|
116 kumpf 1.15
|
117 kumpf 1.18 @return true if the two CIMFlavor objects are equal,
118 false otherwise.
|
119 kumpf 1.15 */
120 Boolean equal (const CIMFlavor & flavor) const;
121
122 /**
|
123 kumpf 1.16 Combines two CIMFlavor objects.
124
|
125 kumpf 1.18 @param flavor a CIMFlavor object to add.
|
126 kumpf 1.16
127 @return A new CIMFlavor object that represents the combination of this
128 flavor with the specified flavor.
129 */
130 CIMFlavor operator+ (const CIMFlavor & flavor) const;
131
132 /**
|
133 kumpf 1.15 Returns a String representation of the CIMFlavor object.
134 This method is for diagnostic purposes. The format of the output
135 is subject to change.
136 */
137 String toString () const;
138
139 /**
|
140 kumpf 1.18 Indicates that the qualifier has no flavors.
|
141 kumpf 1.15 */
|
142 kumpf 1.16 static const CIMFlavor NONE;
|
143 mike 1.9
|
144 kumpf 1.15 /**
|
145 kumpf 1.18 Indicates that the qualifier may be overridden.
|
146 kumpf 1.15 */
|
147 kumpf 1.16 static const CIMFlavor OVERRIDABLE;
148 static const CIMFlavor ENABLEOVERRIDE;
|
149 karl 1.11
|
150 kumpf 1.15 /**
|
151 kumpf 1.18 Indicates that the qualifier may not be overridden.
|
152 kumpf 1.15 */
|
153 kumpf 1.16 static const CIMFlavor DISABLEOVERRIDE;
|
154 mike 1.9
|
155 kumpf 1.15 /**
156 Indicates that the qualifier is propagated to the qualifier in the
|
157 kumpf 1.18 subclass with the same name.
|
158 kumpf 1.15 */
|
159 kumpf 1.16 static const CIMFlavor TOSUBCLASS;
|
160 mike 1.9
|
161 kumpf 1.15 /**
162 Indicates that the qualifier is not propagated to the qualifier in the
163 subclass with the same name; it applies only to the class in which it
|
164 kumpf 1.18 is declared.
|
165 kumpf 1.15 */
|
166 kumpf 1.16 static const CIMFlavor RESTRICTED;
|
167 kumpf 1.15
168 /**
169 Indicates that the qualifier is propagated to the qualifier in the
|
170 kumpf 1.18 instance with the same name.
|
171 kumpf 1.15 */
|
172 kumpf 1.16 static const CIMFlavor TOINSTANCE;
|
173 mike 1.9
|
174 kumpf 1.15 /**
|
175 kumpf 1.18 Indicates that the qualifier is translatable (for internationalization).
|
176 kumpf 1.15 */
|
177 kumpf 1.16 static const CIMFlavor TRANSLATABLE;
|
178 mike 1.7
|
179 kumpf 1.15 /**
|
180 kumpf 1.18 Indicates default flavor setting (OVERRIDABLE | TOSUBCLASS).
|
181 kumpf 1.15 */
|
182 kumpf 1.16 static const CIMFlavor DEFAULTS;
|
183 karl 1.10
|
184 kumpf 1.15 /**
|
185 kumpf 1.18 Indicates both toSubclass and toInstance (TOSUBCLASS | TOINSTANCE).
|
186 kumpf 1.15 */
|
187 kumpf 1.16 static const CIMFlavor TOSUBELEMENTS;
|
188 karl 1.11
|
189 kumpf 1.15 private:
190
|
191 kumpf 1.16 /**
192 Constructs a CIMFlavor object with the specified set of values.
193
|
194 kumpf 1.18 @param flavor a Uint32 representing the set of flavor
195 values to initialize with.
|
196 kumpf 1.16 */
197 CIMFlavor (const Uint32 flavor);
|
198 kumpf 1.15
199 Uint32 cimFlavor;
|
200 mike 1.7 };
201
202 PEGASUS_NAMESPACE_END
203
204 #endif /* Pegasus_Flavor_h */
|