1 karl 1.46 //%2004////////////////////////////////////////////////////////////////////////
|
2 mike 1.12 //
|
3 karl 1.46 // 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.43 // IBM Corp.; EMC Corporation, The Open Group.
|
7 karl 1.46 // 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.12 //
10 // Permission is hereby granted, free of charge, to any person obtaining a copy
|
11 kumpf 1.26 // 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.12 // 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 //
|
17 kumpf 1.26 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
|
18 mike 1.12 // 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.26 // 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.12 // 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_Qualifier_h
31 #define Pegasus_Qualifier_h
32
33 #include <Pegasus/Common/Config.h>
|
34 kumpf 1.32 #include <Pegasus/Common/Linkage.h>
35 #include <Pegasus/Common/CIMName.h>
|
36 karl 1.15 #include <Pegasus/Common/CIMFlavor.h>
|
37 kumpf 1.20 #include <Pegasus/Common/CIMType.h>
38 #include <Pegasus/Common/CIMValue.h>
|
39 mike 1.12
40 PEGASUS_NAMESPACE_BEGIN
41
42 ////////////////////////////////////////////////////////////////////////////////
43 //
44 // CIMQualifier
45 //
46 ////////////////////////////////////////////////////////////////////////////////
47
48 class CIMConstQualifier;
49 class CIMClassRep;
|
50 kumpf 1.30 class Resolver;
|
51 sage 1.27 class CIMQualifierRep;
|
52 mike 1.12
|
53 kumpf 1.40 /** The CIMQualifier class is used to represent CIM qualifiers in Pegasus.
54 It is almost identical to \Ref{CIMQualifierDecl} except that it has no
55 scope member.
|
56 karl 1.18 This includes functions to create qualifiers and manipulate/test
57 the individual components of the CIMQualifier.
|
58 kumpf 1.40 CIMQualifiers are accumulated into lists for use in CIMClasses and
59 CIMProperties using the \Ref{CIMQualifierList} Class and its
60 functions.
|
61 mike 1.12 */
62 class PEGASUS_COMMON_LINKAGE CIMQualifier
63 {
64 public:
65
|
66 kumpf 1.40 /** Constructor - Creates a CIM qualifier object with empty name
67 value fields.
|
68 mike 1.12 */
|
69 kumpf 1.20 CIMQualifier();
|
70 mike 1.12
|
71 kumpf 1.40 /** Constructor - Creates a CIM qualifier object from another
72 CIM qualifier object.
73 @param x - CIMQualifier object.
|
74 kumpf 1.20 */
75 CIMQualifier(const CIMQualifier& x);
|
76 mike 1.12
|
77 kumpf 1.40 /** Constructor - Creates a CIM qualifier object with the parameters
|
78 kumpf 1.20 defined on input.
|
79 kumpf 1.40 @param name - CIMName representing name for the new qualifier.
80 @param value - CIMValue from which to extract the value for the keys.
|
81 kumpf 1.20 @param flavor - Flavor defined for this qualifier definition. Default
82 for this parameter is CIMFlavor::NONE.
|
83 kumpf 1.37 @param propagated - Boolean defining whether this is a propagated
|
84 kumpf 1.20 qualifier. This is an optional parameter with default = false
85 */
|
86 mike 1.12 CIMQualifier(
|
87 kumpf 1.32 const CIMName& name,
|
88 mike 1.12 const CIMValue& value,
|
89 kumpf 1.35 const CIMFlavor & flavor = CIMFlavor (CIMFlavor::NONE),
|
90 kumpf 1.20 Boolean propagated = false);
91
|
92 kumpf 1.40 /// Destructor
|
93 kumpf 1.20 ~CIMQualifier();
94
|
95 kumpf 1.40 ///
|
96 kumpf 1.20 CIMQualifier& operator=(const CIMQualifier& x);
|
97 mike 1.12
|
98 kumpf 1.40 /** Returns the name field from the qualifier.
|
99 kumpf 1.32 @return CIMName containing the qualifier name.
|
100 mike 1.12 */
|
101 kumpf 1.32 const CIMName& getName() const;
|
102 mike 1.12
|
103 kumpf 1.40 /** Sets the qualifier name field in the qualifier object.
104 @param name - CIMName containing the name for the qualifier.
|
105 mike 1.12 */
|
106 kumpf 1.32 void setName(const CIMName& name);
|
107 mike 1.12
|
108 kumpf 1.40 /** Gets the type field from the qualifier object.
109 @return CIMType containing the type for this qualifier.
|
110 mike 1.12 */
|
111 kumpf 1.20 CIMType getType() const;
|
112 mike 1.12
|
113 kumpf 1.40 /** Return true if the qualifier is an array.
114 @return true if the qualifier is an array, false otherwise.
|
115 mike 1.12 */
|
116 kumpf 1.20 Boolean isArray() const;
|
117 mike 1.12
|
118 kumpf 1.40 /** Gets the value component of the qualifier object.
119 @return CIMValue containing the value component.
|
120 mike 1.12 */
|
121 kumpf 1.20 const CIMValue& getValue() const;
|
122 mike 1.12
|
123 kumpf 1.40 /** Puts a CIMValue object into a CIMQualifier object.
124 @param value - The CIMValue object to install.
|
125 mike 1.12 */
|
126 kumpf 1.20 void setValue(const CIMValue& value);
127
|
128 kumpf 1.40 /** Sets the bits defined on input into the Flavor variable
|
129 kumpf 1.20 for the Qualifier Object.
|
130 kumpf 1.35 @param flavor - CIMFlavor object defines the flavor bits to be set.
|
131 kumpf 1.20 */
|
132 kumpf 1.35 void setFlavor(const CIMFlavor & flavor);
|
133 kumpf 1.20
|
134 kumpf 1.40 /** Resets the bits defined for the flavor
|
135 kumpf 1.20 for the Qualifier Object with the input.
|
136 kumpf 1.40 @param flavor - CIMFlavor object defines the flavor bits to be unset.
|
137 kumpf 1.20 */
|
138 kumpf 1.36 void unsetFlavor(const CIMFlavor & flavor);
|
139 karl 1.16
|
140 kumpf 1.40 /** Gets the Flavor field from the Qualifier.
141 @return CIMFlavor object from this qualifier.
|
142 mike 1.12 */
|
143 kumpf 1.35 const CIMFlavor & getFlavor() const;
|
144 kumpf 1.20
|
145 kumpf 1.42 /** Gets the Propagated flag for the qualifier.
146 (Note: Although this method is intended to return a Boolean value,
147 changing the return type would break interface compatibility.)
148 @return non-zero if qualifier is propagated, zero otherwise.
|
149 marek 1.41 */
|
150 kumpf 1.42 const Uint32 getPropagated() const;
|
151 mike 1.12
|
152 kumpf 1.42 /** Sets the Propagated flag for the qualifier.
|
153 kumpf 1.40 @param propagated - Flag indicating propagation.
|
154 mike 1.12 */
|
155 kumpf 1.20 void setPropagated(Boolean propagated);
|
156 mike 1.12
|
157 kumpf 1.40 /** Determines if the object has not been initialized.
158 @return true if the object has not been initialized,
159 false otherwise.
|
160 kumpf 1.34 */
161 Boolean isUninitialized() const;
|
162 mike 1.12
|
163 kumpf 1.40 /** Compares two CIMQualifier objects.
164 @return true if the objects are identical, false otherwise.
|
165 kumpf 1.20 */
|
166 mike 1.12 Boolean identical(const CIMConstQualifier& x) const;
167
|
168 kumpf 1.40 /** Creates an exact copy of the qualifier and returns the
|
169 karl 1.18 new object.
|
170 kumpf 1.40 @return copy of CIMQualifier object.
|
171 mike 1.12 */
|
172 kumpf 1.20 CIMQualifier clone() const;
|
173 mike 1.12
174 private:
175
|
176 kumpf 1.20 CIMQualifier(CIMQualifierRep* rep);
177
178 void _checkRep() const;
|
179 mike 1.12
180 CIMQualifierRep* _rep;
|
181 kumpf 1.22
|
182 mike 1.12 friend class CIMConstQualifier;
183 friend class CIMClassRep;
|
184 kumpf 1.30 friend class Resolver;
|
185 kumpf 1.22 friend class XmlWriter;
|
186 kumpf 1.23 friend class MofWriter;
|
187 schuur 1.44 friend class BinaryStreamer;
|
188 mike 1.12 };
189
190 ////////////////////////////////////////////////////////////////////////////////
191 //
192 // CIMConstQualifier
193 //
194 ////////////////////////////////////////////////////////////////////////////////
195
|
196 kumpf 1.40 ///
|
197 mike 1.12 class PEGASUS_COMMON_LINKAGE CIMConstQualifier
198 {
199 public:
200
|
201 kumpf 1.40 ///
|
202 kumpf 1.20 CIMConstQualifier();
|
203 mike 1.12
|
204 kumpf 1.40 ///
|
205 kumpf 1.20 CIMConstQualifier(const CIMConstQualifier& x);
|
206 mike 1.12
|
207 kumpf 1.40 ///
|
208 kumpf 1.20 CIMConstQualifier(const CIMQualifier& x);
|
209 mike 1.12
|
210 kumpf 1.40 ///
|
211 mike 1.12 CIMConstQualifier(
|
212 kumpf 1.32 const CIMName& name,
|
213 mike 1.12 const CIMValue& value,
|
214 kumpf 1.35 const CIMFlavor & flavor = CIMFlavor (CIMFlavor::NONE),
|
215 kumpf 1.20 Boolean propagated = false);
216
|
217 kumpf 1.40 ///
|
218 kumpf 1.20 ~CIMConstQualifier();
219
|
220 kumpf 1.40 ///
|
221 kumpf 1.20 CIMConstQualifier& operator=(const CIMConstQualifier& x);
222
|
223 kumpf 1.40 ///
|
224 kumpf 1.20 CIMConstQualifier& operator=(const CIMQualifier& x);
225
|
226 kumpf 1.40 ///
|
227 kumpf 1.32 const CIMName& getName() const;
|
228 kumpf 1.20
|
229 kumpf 1.40 ///
|
230 kumpf 1.20 CIMType getType() const;
231
|
232 kumpf 1.40 ///
|
233 kumpf 1.20 Boolean isArray() const;
234
|
235 kumpf 1.40 ///
|
236 kumpf 1.20 const CIMValue& getValue() const;
237
|
238 kumpf 1.40 ///
|
239 kumpf 1.35 const CIMFlavor & getFlavor() const;
|
240 kumpf 1.20
|
241 kumpf 1.40 ///
|
242 kumpf 1.42 const Uint32 getPropagated() const;
|
243 kumpf 1.20
|
244 kumpf 1.40 ///
|
245 kumpf 1.34 Boolean isUninitialized() const;
|
246 kumpf 1.20
|
247 kumpf 1.40 ///
|
248 kumpf 1.20 Boolean identical(const CIMConstQualifier& x) const;
249
|
250 kumpf 1.40 ///
|
251 kumpf 1.20 CIMQualifier clone() const;
|
252 mike 1.12
253 private:
254
|
255 kumpf 1.20 void _checkRep() const;
|
256 mike 1.12
257 CIMQualifierRep* _rep;
|
258 kumpf 1.22
|
259 mike 1.12 friend class CIMQualifier;
|
260 kumpf 1.22 friend class XmlWriter;
|
261 kumpf 1.23 friend class MofWriter;
|
262 mike 1.12 };
263
264 #define PEGASUS_ARRAY_T CIMQualifier
|
265 kumpf 1.25 # include <Pegasus/Common/ArrayInter.h>
|
266 mike 1.12 #undef PEGASUS_ARRAY_T
267
268 PEGASUS_NAMESPACE_END
269
270 #endif /* Pegasus_Qualifier_h */
|