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

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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2