(file) Return to CIMQualifier.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

  1 karl  1.47 //%2005////////////////////////////////////////////////////////////////////////
  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 mike  1.12 //
 12            // Permission is hereby granted, free of charge, to any person obtaining a copy
 13 kumpf 1.26 // 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.12 // 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            // 
 19 kumpf 1.26 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
 20 mike  1.12 // 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.26 // 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.12 // 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_Qualifier_h
 33            #define Pegasus_Qualifier_h
 34            
 35            #include <Pegasus/Common/Config.h>
 36 kumpf 1.32 #include <Pegasus/Common/Linkage.h>
 37            #include <Pegasus/Common/CIMName.h>
 38 karl  1.15 #include <Pegasus/Common/CIMFlavor.h>
 39 kumpf 1.20 #include <Pegasus/Common/CIMType.h>
 40            #include <Pegasus/Common/CIMValue.h>
 41 mike  1.12 
 42            PEGASUS_NAMESPACE_BEGIN
 43            
 44            ////////////////////////////////////////////////////////////////////////////////
 45            //
 46            // CIMQualifier
 47            //
 48            ////////////////////////////////////////////////////////////////////////////////
 49            
 50            class CIMConstQualifier;
 51            class CIMClassRep;
 52 kumpf 1.30 class Resolver;
 53 sage  1.27 class CIMQualifierRep;
 54 mike  1.12 
 55 kumpf 1.40 /** The CIMQualifier class is used to represent CIM qualifiers in Pegasus.
 56                It is almost identical to \Ref{CIMQualifierDecl} except that it has no 
 57                scope member.
 58 karl  1.18     This includes functions to create qualifiers and manipulate/test
 59                the individual components of the CIMQualifier.
 60 kumpf 1.40     CIMQualifiers are accumulated into lists for use in CIMClasses and 
 61                CIMProperties using the \Ref{CIMQualifierList} Class and its
 62                functions.
 63 mike  1.12 */
 64            class PEGASUS_COMMON_LINKAGE CIMQualifier
 65            {
 66            public:
 67            
 68 kumpf 1.40     /** Constructor - Creates a CIM qualifier object with empty name 
 69                    value fields.
 70 mike  1.12     */
 71 kumpf 1.20     CIMQualifier();
 72 mike  1.12 
 73 kumpf 1.40     /** Constructor - Creates a CIM qualifier object from another 
 74                    CIM qualifier object. 
 75                    @param x - CIMQualifier object.
 76 kumpf 1.20     */
 77                CIMQualifier(const CIMQualifier& x);
 78 mike  1.12 
 79 kumpf 1.40     /** Constructor - Creates a CIM qualifier object with the parameters 
 80 kumpf 1.20         defined on input.
 81 kumpf 1.40         @param name - CIMName representing name for the new qualifier.
 82                    @param value - CIMValue from which to extract the value for the keys.
 83 kumpf 1.20         @param flavor - Flavor defined for this qualifier definition. Default
 84                    for this parameter is CIMFlavor::NONE.
 85 kumpf 1.37         @param propagated - Boolean defining whether this is a propagated
 86 kumpf 1.20         qualifier.  This is an optional parameter with default = false
 87                */
 88 mike  1.12     CIMQualifier(
 89 kumpf 1.32 	const CIMName& name, 
 90 mike  1.12 	const CIMValue& value, 
 91 kumpf 1.35 	const CIMFlavor & flavor = CIMFlavor (CIMFlavor::NONE),
 92 kumpf 1.20 	Boolean propagated = false);
 93            
 94 kumpf 1.40     /// Destructor
 95 kumpf 1.20     ~CIMQualifier();
 96            
 97 kumpf 1.40     /// 
 98 kumpf 1.20     CIMQualifier& operator=(const CIMQualifier& x);
 99 mike  1.12 
100 kumpf 1.40     /**	Returns the name field from the qualifier.
101 kumpf 1.32         @return CIMName containing the qualifier name.
102 mike  1.12     */
103 kumpf 1.32     const CIMName& getName() const;
104 mike  1.12 
105 kumpf 1.40     /**	Sets the qualifier name field in the qualifier object.
106            	@param name - CIMName containing the name for the qualifier.
107 mike  1.12     */
108 kumpf 1.32     void setName(const CIMName& name);
109 mike  1.12 
110 kumpf 1.40     /** Gets the type field from the qualifier object.
111                    @return CIMType containing the type for this qualifier.
112 mike  1.12     */
113 kumpf 1.20     CIMType getType() const;
114 mike  1.12 
115 kumpf 1.40     /**	Return true if the qualifier is an array.
116            	@return true if the qualifier is an array, false otherwise.
117 mike  1.12     */
118 kumpf 1.20     Boolean isArray() const;
119 mike  1.12 
120 kumpf 1.40     /**	Gets the value component of the qualifier object.
121            	@return CIMValue containing the value component.
122 mike  1.12     */
123 kumpf 1.20     const CIMValue& getValue() const;
124 mike  1.12 
125 kumpf 1.40     /**	Puts a CIMValue object into a CIMQualifier object.
126            	@param value - The CIMValue object to install.
127 mike  1.12     */
128 kumpf 1.20     void setValue(const CIMValue& value);
129            
130 kumpf 1.40     /** Sets the bits defined on input into the Flavor variable
131 kumpf 1.20         for the Qualifier Object.
132 kumpf 1.35         @param flavor - CIMFlavor object defines the flavor bits to be set.
133 kumpf 1.20     */
134 kumpf 1.35     void setFlavor(const CIMFlavor & flavor);
135 kumpf 1.20 
136 kumpf 1.40     /** Resets the bits defined for the flavor 
137 kumpf 1.20         for the Qualifier Object with the input.
138 kumpf 1.40         @param flavor - CIMFlavor object defines the flavor bits to be unset.
139 kumpf 1.20     */
140 kumpf 1.36     void unsetFlavor(const CIMFlavor & flavor);
141 karl  1.16 
142 kumpf 1.40     /**	Gets the Flavor field from the Qualifier.
143            	@return CIMFlavor object from this qualifier.
144 mike  1.12     */
145 kumpf 1.35     const CIMFlavor & getFlavor() const;
146 kumpf 1.20 
147 kumpf 1.42     /** Gets the Propagated flag for the qualifier.
148                    (Note: Although this method is intended to return a Boolean value,
149                    changing the return type would break interface compatibility.)
150                    @return non-zero if qualifier is propagated, zero otherwise.
151 marek 1.41      */
152 kumpf 1.42     const Uint32 getPropagated() const;
153 mike  1.12 
154 kumpf 1.42     /**	Sets the Propagated flag for the qualifier.
155 kumpf 1.40         @param propagated - Flag indicating propagation.
156 mike  1.12     */
157 kumpf 1.20     void setPropagated(Boolean propagated);
158 mike  1.12 
159 kumpf 1.40     /** Determines if the object has not been initialized.
160                    @return  true if the object has not been initialized,
161                             false otherwise.
162 kumpf 1.34      */
163                Boolean isUninitialized() const;
164 mike  1.12 
165 kumpf 1.40     /**	Compares two CIMQualifier objects.
166                    @return  true if the objects are identical, false otherwise.
167 kumpf 1.20     */
168 mike  1.12     Boolean identical(const CIMConstQualifier& x) const;
169            
170 kumpf 1.40     /**	Creates an exact copy of the qualifier and returns the
171 karl  1.18 	new object.
172 kumpf 1.40 	@return copy of CIMQualifier object.
173 mike  1.12     */
174 kumpf 1.20     CIMQualifier clone() const;
175 mike  1.12 
176            private:
177            
178 kumpf 1.20     CIMQualifier(CIMQualifierRep* rep);
179            
180                void _checkRep() const;
181 mike  1.12 
182                CIMQualifierRep* _rep;
183 kumpf 1.22 
184 mike  1.12     friend class CIMConstQualifier;
185                friend class CIMClassRep;
186 kumpf 1.30     friend class Resolver;
187 kumpf 1.22     friend class XmlWriter;
188 kumpf 1.23     friend class MofWriter;
189 schuur 1.44     friend class BinaryStreamer;
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 kumpf  1.42     const Uint32 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 */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2