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