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