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