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