1 mike 1.7 //%/////////////////////////////////////////////////////////////////////////////
2 //
|
3 kumpf 1.13 // Copyright (c) 2000, 2001, 2002 BMC Software, Hewlett-Packard Company, IBM,
4 // The Open Group, Tivoli Systems
|
5 mike 1.7 //
6 // Permission is hereby granted, free of charge, to any person obtaining a copy
|
7 kumpf 1.13 // 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.7 // 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.13 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
|
14 mike 1.7 // 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.13 // 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.7 // 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 karl 1.11 // Modified By: Karl Schopmeyer(k.schopmeyer@opengroup.org)
|
27 kumpf 1.12 // Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
|
28 kumpf 1.15 // Carol Ann Krug Graves, Hewlett-Packard Company
29 // (carolann_graves@hp.com)
|
30 mike 1.7 //
31 //%/////////////////////////////////////////////////////////////////////////////
32
33 #ifndef Pegasus_Flavor_h
34 #define Pegasus_Flavor_h
35
36 #include <Pegasus/Common/Config.h>
37 #include <Pegasus/Common/String.h>
|
38 kumpf 1.14 #include <Pegasus/Common/Linkage.h>
|
39 mike 1.7
40 PEGASUS_NAMESPACE_BEGIN
|
41 mike 1.9
|
42 kumpf 1.15 /**
43 The CIMFlavor class implements the concept of the CIM qualifier flavor.
44 The qualifier flavor concept encapsulates the propagation and override
45 rules for the qualifier. The propagation rules define whether a qualifier
46 may be propagated from classes to derived classes, or from classes to
47 instances. The override rules define whether or not derived classes may
48 override a qualifier value, or whether it must be fixed for an entire
49 class hierarchy.
50
51 The possible values are: OVERRIDABLE, TOSUBCLASS, TOINSTANCE,
52 TRANSLATABLE, DISABLEOVERRIDE, RESTRICTED.
53 The flavor is a set of zero or more of these possible values.
54 */
55 class PEGASUS_COMMON_LINKAGE CIMFlavor
|
56 mike 1.7 {
|
57 kumpf 1.15 public:
58
59 /**
60 Constructs a CIMFlavor object with no flavor values set (default
61 constructor).
62 */
63 CIMFlavor ();
64
65 /**
66 Constructs a CIMFlavor object from an existing CIMFlavor object (copy
67 constructor).
68
|
69 kumpf 1.18 @param flavor another CIMFlavor object.
|
70 kumpf 1.15 */
71 CIMFlavor (const CIMFlavor & flavor);
72
73 /**
74 Assigns the value of one CIMFlavor object to another (assignment
75 operator).
76
|
77 kumpf 1.18 @param flavor a CIMFlavor object.
|
78 kumpf 1.15
79 @return the CIMFlavor object
80 */
81 CIMFlavor & operator= (const CIMFlavor & flavor);
82
83 /**
84 Adds the set of flavor values of the specified CIMFlavor object to this
85 CIMFlavor object.
86
|
87 kumpf 1.18 @param flavor a CIMFlavor object.
|
88 kumpf 1.15 */
89 void addFlavor (const CIMFlavor & flavor);
90
91 /**
92 Removes the specified set of flavor values from the CIMFlavor object.
93
|
94 kumpf 1.18 @param flavor a CIMFlavor representing the flavor
95 values to be removed.
|
96 kumpf 1.15 */
|
97 kumpf 1.16 void removeFlavor (const CIMFlavor & flavor);
|
98 kumpf 1.15
99 /**
100 Determines if every value in the specified CIMFlavor object is included
101 in this CIMFlavor object.
102
|
103 kumpf 1.18 @param flavor a CIMFlavor object.
|
104 kumpf 1.15
|
105 kumpf 1.18 @return true if every value in the specified CIMFlavor object is
106 included in the CIMFlavor object, false otherwise.
|
107 kumpf 1.15 */
108 Boolean hasFlavor (const CIMFlavor & flavor) const;
109
110 /**
111 Compares two CIMFlavor objects.
112
|
113 kumpf 1.18 @param flavor a CIMFlavor object.
|
114 kumpf 1.15
|
115 kumpf 1.18 @return true if the two CIMFlavor objects are equal,
116 false otherwise.
|
117 kumpf 1.15 */
118 Boolean equal (const CIMFlavor & flavor) const;
119
120 /**
|
121 kumpf 1.16 Combines two CIMFlavor objects.
122
|
123 kumpf 1.18 @param flavor a CIMFlavor object to add.
|
124 kumpf 1.16
125 @return A new CIMFlavor object that represents the combination of this
126 flavor with the specified flavor.
127 */
128 CIMFlavor operator+ (const CIMFlavor & flavor) const;
129
130 /**
|
131 kumpf 1.15 Returns a String representation of the CIMFlavor object.
132 This method is for diagnostic purposes. The format of the output
133 is subject to change.
134 */
135 String toString () const;
136
137 /**
|
138 kumpf 1.18 Indicates that the qualifier has no flavors.
|
139 kumpf 1.15 */
|
140 kumpf 1.16 static const CIMFlavor NONE;
|
141 mike 1.9
|
142 kumpf 1.15 /**
|
143 kumpf 1.18 Indicates that the qualifier may be overridden.
|
144 kumpf 1.15 */
|
145 kumpf 1.16 static const CIMFlavor OVERRIDABLE;
146 static const CIMFlavor ENABLEOVERRIDE;
|
147 karl 1.11
|
148 kumpf 1.15 /**
|
149 kumpf 1.18 Indicates that the qualifier may not be overridden.
|
150 kumpf 1.15 */
|
151 kumpf 1.16 static const CIMFlavor DISABLEOVERRIDE;
|
152 mike 1.9
|
153 kumpf 1.15 /**
154 Indicates that the qualifier is propagated to the qualifier in the
|
155 kumpf 1.18 subclass with the same name.
|
156 kumpf 1.15 */
|
157 kumpf 1.16 static const CIMFlavor TOSUBCLASS;
|
158 mike 1.9
|
159 kumpf 1.15 /**
160 Indicates that the qualifier is not propagated to the qualifier in the
161 subclass with the same name; it applies only to the class in which it
|
162 kumpf 1.18 is declared.
|
163 kumpf 1.15 */
|
164 kumpf 1.16 static const CIMFlavor RESTRICTED;
|
165 kumpf 1.15
166 /**
167 Indicates that the qualifier is propagated to the qualifier in the
|
168 kumpf 1.18 instance with the same name.
|
169 kumpf 1.15 */
|
170 kumpf 1.16 static const CIMFlavor TOINSTANCE;
|
171 mike 1.9
|
172 kumpf 1.15 /**
|
173 kumpf 1.18 Indicates that the qualifier is translatable (for internationalization).
|
174 kumpf 1.15 */
|
175 kumpf 1.16 static const CIMFlavor TRANSLATABLE;
|
176 mike 1.7
|
177 kumpf 1.15 /**
|
178 kumpf 1.18 Indicates default flavor setting (OVERRIDABLE | TOSUBCLASS).
|
179 kumpf 1.15 */
|
180 kumpf 1.16 static const CIMFlavor DEFAULTS;
|
181 karl 1.10
|
182 kumpf 1.15 /**
|
183 kumpf 1.18 Indicates both toSubclass and toInstance (TOSUBCLASS | TOINSTANCE).
|
184 kumpf 1.15 */
|
185 kumpf 1.16 static const CIMFlavor TOSUBELEMENTS;
|
186 karl 1.11
|
187 kumpf 1.15 private:
188
|
189 kumpf 1.16 /**
190 Constructs a CIMFlavor object with the specified set of values.
191
|
192 kumpf 1.18 @param flavor a Uint32 representing the set of flavor
193 values to initialize with.
|
194 kumpf 1.16 */
195 CIMFlavor (const Uint32 flavor);
|
196 kumpf 1.15
197 Uint32 cimFlavor;
|
198 mike 1.7 };
199
200 PEGASUS_NAMESPACE_END
201
202 #endif /* Pegasus_Flavor_h */
|