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

  1 karl  1.36 //%2003////////////////////////////////////////////////////////////////////////
  2 mike  1.12 //
  3 karl  1.36 // 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            // IBM Corp.; EMC Corporation, The Open Group.
  7 mike  1.12 //
  8            // Permission is hereby granted, free of charge, to any person obtaining a copy
  9 kumpf 1.22 // of this software and associated documentation files (the "Software"), to
 10            // deal in the Software without restriction, including without limitation the
 11            // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 12 mike  1.12 // sell copies of the Software, and to permit persons to whom the Software is
 13            // furnished to do so, subject to the following conditions:
 14            // 
 15 kumpf 1.22 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
 16 mike  1.12 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
 17            // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
 18 kumpf 1.22 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
 19            // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 20            // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 21 mike  1.12 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 22            // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 23            //
 24            //==============================================================================
 25            //
 26            // Author: Mike Brasher (mbrasher@bmc.com)
 27            //
 28 kumpf 1.17 // Modified By: Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
 29 kumpf 1.30 //              Carol Ann Krug Graves, Hewlett-Packard Company
 30            //                (carolann_graves@hp.com)
 31 mike  1.12 //
 32            //%/////////////////////////////////////////////////////////////////////////////
 33            
 34            #ifndef Pegasus_QualifierDecl_h
 35            #define Pegasus_QualifierDecl_h
 36            
 37            #include <Pegasus/Common/Config.h>
 38 kumpf 1.28 #include <Pegasus/Common/Linkage.h>
 39            #include <Pegasus/Common/CIMName.h>
 40 kumpf 1.17 #include <Pegasus/Common/Array.h>
 41            #include <Pegasus/Common/CIMQualifierDecl.h>
 42            #include <Pegasus/Common/CIMFlavor.h>
 43            #include <Pegasus/Common/CIMScope.h>
 44            #include <Pegasus/Common/CIMType.h>
 45            #include <Pegasus/Common/CIMValue.h>
 46 mike  1.12 
 47            PEGASUS_NAMESPACE_BEGIN
 48            
 49            ////////////////////////////////////////////////////////////////////////////////
 50            //
 51            // CIMQualifierDecl
 52            //
 53            ////////////////////////////////////////////////////////////////////////////////
 54            
 55            class CIMConstQualifierDecl;
 56            class CIMClassRep;
 57 sage  1.24 class CIMQualifierDeclRep;
 58 kumpf 1.34 
 59 kumpf 1.35 /** The CIMQualifierDecl class is used to represent CIM qualifier
 60                declarations in Pegasus.
 61                Note that the Declarations
 62                are not the same as CIM Qualiifers as seen on Classes, properties, etc.
 63                These are the original declarations of qualifiers (i.e. input from the compiler
 64                qualifier Declarations).
 65 mike  1.12 */
 66            class PEGASUS_COMMON_LINKAGE CIMQualifierDecl
 67            {
 68            public:
 69 kumpf 1.35     /// Constructor.
 70 kumpf 1.17     CIMQualifierDecl();
 71 mike  1.12 
 72 kumpf 1.35     /// Constructor - Creates a CIMQualifierDecl from another CIMQualifierDecl.
 73 kumpf 1.17     CIMQualifierDecl(const CIMQualifierDecl& x);
 74 mike  1.12 
 75 kumpf 1.35     /** Constructor - Constructs a single CIMQualifierDecl object.
 76                    @param name - CIMName containing the name of the Qualifier being created.
 77                    @param value - CIMValue for the qualifier.
 78                    @param scope - CIMScope containing the scope of the qualifier.
 79                    @param flavor - Optional definition of the flavor for the qualifier.  
 80                    CIMFlavor::DEFAULTS is used if no value supplied.  
 81                    @param arraySize - Optional integer defining the arraysize if the
 82 kumpf 1.17         qualifier is an array type with fixed value array. The default is
 83                    zero indicating that the qualifier declaration is not a fixed size
 84                    array.
 85 mike  1.12     */
 86                CIMQualifierDecl(
 87 kumpf 1.28         const CIMName& name, 
 88 kumpf 1.17         const CIMValue& value, 
 89 kumpf 1.32         const CIMScope & scope,
 90                    const CIMFlavor & flavor = CIMFlavor (CIMFlavor::DEFAULTS),
 91 kumpf 1.17         Uint32 arraySize = 0);
 92            
 93 kumpf 1.35     /// Destructor.
 94 kumpf 1.17     ~CIMQualifierDecl();
 95            
 96 kumpf 1.35     /// Operator.
 97 kumpf 1.17     CIMQualifierDecl& operator=(const CIMQualifierDecl& x);
 98 mike  1.12 
 99 kumpf 1.35     /** Get the name of the CIMQualifierDecl object.
100                    @return CIMName containing the name of the CIMQualifierDecl object.
101 kumpf 1.17     */
102 kumpf 1.28     const CIMName& getName() const;
103 mike  1.12 
104 kumpf 1.35     /** Sets the name in the CIMQualifierDecl object.
105                    @param name CIMName containing name to be set on this qualifier.
106 mike  1.12     */
107 kumpf 1.28     void setName(const CIMName& name);
108 mike  1.12 
109 kumpf 1.35     /** Gets the Qualifier Declaration type which is the
110                    value type (boolean, etc. for this qualifier).
111                    @return the type as CIMType.
112 mike  1.12     */
113 kumpf 1.17     CIMType getType() const;
114            
115 kumpf 1.35     /** Determines if this qualifier declaration is an array type.
116                    @return true if this is an array type, false otherwise.
117 mike  1.12     */
118 kumpf 1.17     Boolean isArray() const;
119            
120 kumpf 1.35     ///
121 kumpf 1.17     const CIMValue& getValue() const;
122            
123 kumpf 1.35     ///
124 kumpf 1.17     void setValue(const CIMValue& value);
125            
126 kumpf 1.35     ///
127 kumpf 1.31     const CIMScope & getScope() const;
128 kumpf 1.17 
129 kumpf 1.35     /** Gets the Flavor definition from the qualifier declaration.
130                    @return CIMFlavor object containing the flavor flags.  The 
131 kumpf 1.32         CIMFlavor hasFlavor method can be used to test against the flavor 
132                    constants defined in CIMFlavor.
133 kumpf 1.35         @See CIMFlavor
134 kumpf 1.17     */
135 kumpf 1.32     const CIMFlavor & getFlavor() const;
136 karl  1.14 
137 kumpf 1.35     ///
138 kumpf 1.17     Uint32 getArraySize() const;
139 mike  1.12 
140 kumpf 1.35     /** Determines if the object has not been initialized.
141                    @return  true if the object has not been initialized,
142                             false otherwise.
143                */
144 kumpf 1.30     Boolean isUninitialized() const;
145 mike  1.13     
146 kumpf 1.35     /** Compares two qualifier declarations.
147                    @return true if they are identical, false otherwise.
148 mike  1.13     */ 
149 mike  1.12     Boolean identical(const CIMConstQualifierDecl& x) const;
150 kumpf 1.17 
151 kumpf 1.35     ///
152 kumpf 1.17     CIMQualifierDecl clone() const;
153 mike  1.12 
154 kumpf 1.17 private:
155 mike  1.12 
156 kumpf 1.17     CIMQualifierDecl(CIMQualifierDeclRep* rep);
157 mike  1.12 
158 kumpf 1.17     void _checkRep() const;
159 mike  1.12 
160                CIMQualifierDeclRep* _rep;
161 kumpf 1.19 
162 mike  1.12     friend class CIMConstQualifierDecl;
163                friend class CIMClassRep;
164 kumpf 1.19     friend class XmlWriter;
165 kumpf 1.20     friend class MofWriter;
166 mike  1.12 };
167            
168            ////////////////////////////////////////////////////////////////////////////////
169            //
170            // CIMConstQualifierDecl
171            //
172            ////////////////////////////////////////////////////////////////////////////////
173            
174 kumpf 1.35 ///
175 mike  1.12 class PEGASUS_COMMON_LINKAGE CIMConstQualifierDecl
176            {
177            public:
178 kumpf 1.17     ///
179                CIMConstQualifierDecl();
180            
181                ///
182                CIMConstQualifierDecl(const CIMConstQualifierDecl& x);
183            
184                ///
185                CIMConstQualifierDecl(const CIMQualifierDecl& x);
186            
187 kumpf 1.35     /** Constructor - Creates a CIMConstQualiferDecl.
188                    @param name - CIMName containing the name of the Qualifier declaration.
189                    @param value - CIMValue for the qualifier.
190                    @param scope - CIMScope containing the scope of the qualifier.
191                    @param flavor - Optional definition of the flavor for the qualifier.  
192                    CIMFlavor::DEFAULTS is used if no value supplied.  
193                    @param arraySize - Optional integer defining the arraysize if the
194                    qualifier is an array type with fixed value array. The default is
195                    zero indicating that the qualifier declaration is not a fixed size
196                    array.
197 kumpf 1.17     */
198 mike  1.12     CIMConstQualifierDecl(
199 kumpf 1.28         const CIMName& name, 
200 kumpf 1.17         const CIMValue& value, 
201 kumpf 1.32         const CIMScope & scope,
202                    const CIMFlavor & flavor = CIMFlavor (CIMFlavor::DEFAULTS),
203 kumpf 1.17         Uint32 arraySize = 0);
204            
205 kumpf 1.35     ///
206 kumpf 1.17     ~CIMConstQualifierDecl();
207            
208                ///
209                CIMConstQualifierDecl& operator=(const CIMConstQualifierDecl& x);
210            
211                ///
212                CIMConstQualifierDecl& operator=(const CIMQualifierDecl& x);
213            
214                ///
215 kumpf 1.28     const CIMName& getName() const;
216 kumpf 1.17 
217                ///
218                CIMType getType() const;
219            
220                ///
221                Boolean isArray() const;
222            
223                ///
224                const CIMValue& getValue() const;
225            
226                ///
227 kumpf 1.31     const CIMScope & getScope() const;
228 kumpf 1.17 
229                ///
230 kumpf 1.32     const CIMFlavor & getFlavor() const;
231 kumpf 1.17 
232                ///
233                Uint32 getArraySize() const;
234            
235 kumpf 1.35     ///
236 kumpf 1.30     Boolean isUninitialized() const;
237 kumpf 1.17 
238                ///
239                Boolean identical(const CIMConstQualifierDecl& x) const;
240            
241                ///
242                CIMQualifierDecl clone() const;
243 mike  1.12 
244            private:
245            
246 kumpf 1.17     void _checkRep() const;
247 mike  1.12 
248                CIMQualifierDeclRep* _rep;
249 kumpf 1.19 
250 mike  1.12     friend class CIMQualifierDecl;
251 kumpf 1.19     friend class XmlWriter;
252 kumpf 1.20     friend class MofWriter;
253 mike  1.12 };
254            
255            #define PEGASUS_ARRAY_T CIMQualifierDecl
256 kumpf 1.21 # include <Pegasus/Common/ArrayInter.h>
257 mike  1.12 #undef PEGASUS_ARRAY_T
258            
259            PEGASUS_NAMESPACE_END
260            
261            #endif /* Pegasus_QualifierDecl_h */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2