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

  1 karl  1.39 //%2005////////////////////////////////////////////////////////////////////////
  2 mike  1.12 //
  3 karl  1.38 // 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.36 // IBM Corp.; EMC Corporation, The Open Group.
  7 karl  1.38 // 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.39 // 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.22 // 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.22 // 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.22 // 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_QualifierDecl_h
 33            #define Pegasus_QualifierDecl_h
 34            
 35            #include <Pegasus/Common/Config.h>
 36 kumpf 1.28 #include <Pegasus/Common/Linkage.h>
 37            #include <Pegasus/Common/CIMName.h>
 38 kumpf 1.17 #include <Pegasus/Common/Array.h>
 39            #include <Pegasus/Common/CIMQualifierDecl.h>
 40            #include <Pegasus/Common/CIMFlavor.h>
 41            #include <Pegasus/Common/CIMScope.h>
 42            #include <Pegasus/Common/CIMType.h>
 43            #include <Pegasus/Common/CIMValue.h>
 44 mike  1.12 
 45            PEGASUS_NAMESPACE_BEGIN
 46            
 47            ////////////////////////////////////////////////////////////////////////////////
 48            //
 49            // CIMQualifierDecl
 50            //
 51            ////////////////////////////////////////////////////////////////////////////////
 52            
 53            class CIMConstQualifierDecl;
 54            class CIMClassRep;
 55 sage  1.24 class CIMQualifierDeclRep;
 56 kumpf 1.34 
 57 kumpf 1.35 /** The CIMQualifierDecl class is used to represent CIM qualifier
 58                declarations in Pegasus.
 59                Note that the Declarations
 60                are not the same as CIM Qualiifers as seen on Classes, properties, etc.
 61                These are the original declarations of qualifiers (i.e. input from the compiler
 62                qualifier Declarations).
 63 mike  1.12 */
 64            class PEGASUS_COMMON_LINKAGE CIMQualifierDecl
 65            {
 66            public:
 67 kumpf 1.35     /// Constructor.
 68 kumpf 1.17     CIMQualifierDecl();
 69 mike  1.12 
 70 kumpf 1.35     /// Constructor - Creates a CIMQualifierDecl from another CIMQualifierDecl.
 71 kumpf 1.17     CIMQualifierDecl(const CIMQualifierDecl& x);
 72 mike  1.12 
 73 kumpf 1.35     /** Constructor - Constructs a single CIMQualifierDecl object.
 74                    @param name - CIMName containing the name of the Qualifier being created.
 75                    @param value - CIMValue for the qualifier.
 76                    @param scope - CIMScope containing the scope of the qualifier.
 77                    @param flavor - Optional definition of the flavor for the qualifier.  
 78                    CIMFlavor::DEFAULTS is used if no value supplied.  
 79                    @param arraySize - Optional integer defining the arraysize if the
 80 kumpf 1.17         qualifier is an array type with fixed value array. The default is
 81                    zero indicating that the qualifier declaration is not a fixed size
 82                    array.
 83 mike  1.12     */
 84                CIMQualifierDecl(
 85 kumpf 1.28         const CIMName& name, 
 86 kumpf 1.17         const CIMValue& value, 
 87 kumpf 1.32         const CIMScope & scope,
 88                    const CIMFlavor & flavor = CIMFlavor (CIMFlavor::DEFAULTS),
 89 kumpf 1.17         Uint32 arraySize = 0);
 90            
 91 kumpf 1.35     /// Destructor.
 92 kumpf 1.17     ~CIMQualifierDecl();
 93            
 94 kumpf 1.35     /// Operator.
 95 kumpf 1.17     CIMQualifierDecl& operator=(const CIMQualifierDecl& x);
 96 mike  1.12 
 97 kumpf 1.35     /** Get the name of the CIMQualifierDecl object.
 98                    @return CIMName containing the name of the CIMQualifierDecl object.
 99 kumpf 1.17     */
100 kumpf 1.28     const CIMName& getName() const;
101 mike  1.12 
102 kumpf 1.35     /** Sets the name in the CIMQualifierDecl object.
103                    @param name CIMName containing name to be set on this qualifier.
104 mike  1.12     */
105 kumpf 1.28     void setName(const CIMName& name);
106 mike  1.12 
107 kumpf 1.35     /** Gets the Qualifier Declaration type which is the
108                    value type (boolean, etc. for this qualifier).
109                    @return the type as CIMType.
110 mike  1.12     */
111 kumpf 1.17     CIMType getType() const;
112            
113 kumpf 1.35     /** Determines if this qualifier declaration is an array type.
114                    @return true if this is an array type, false otherwise.
115 mike  1.12     */
116 kumpf 1.17     Boolean isArray() const;
117            
118 kumpf 1.35     ///
119 kumpf 1.17     const CIMValue& getValue() const;
120            
121 kumpf 1.35     ///
122 kumpf 1.17     void setValue(const CIMValue& value);
123            
124 kumpf 1.35     ///
125 kumpf 1.31     const CIMScope & getScope() const;
126 kumpf 1.17 
127 kumpf 1.35     /** Gets the Flavor definition from the qualifier declaration.
128                    @return CIMFlavor object containing the flavor flags.  The 
129 kumpf 1.32         CIMFlavor hasFlavor method can be used to test against the flavor 
130                    constants defined in CIMFlavor.
131 kumpf 1.35         @See CIMFlavor
132 kumpf 1.17     */
133 kumpf 1.32     const CIMFlavor & getFlavor() const;
134 karl  1.14 
135 kumpf 1.35     ///
136 kumpf 1.17     Uint32 getArraySize() const;
137 mike  1.12 
138 kumpf 1.35     /** Determines if the object has not been initialized.
139                    @return  true if the object has not been initialized,
140                             false otherwise.
141                */
142 kumpf 1.30     Boolean isUninitialized() const;
143 mike  1.13     
144 kumpf 1.35     /** Compares two qualifier declarations.
145                    @return true if they are identical, false otherwise.
146 mike  1.13     */ 
147 mike  1.12     Boolean identical(const CIMConstQualifierDecl& x) const;
148 kumpf 1.17 
149 kumpf 1.35     ///
150 kumpf 1.17     CIMQualifierDecl clone() const;
151 mike  1.12 
152 kumpf 1.17 private:
153 mike  1.12 
154 kumpf 1.17     CIMQualifierDecl(CIMQualifierDeclRep* rep);
155 mike  1.12 
156 kumpf 1.17     void _checkRep() const;
157 mike  1.12 
158                CIMQualifierDeclRep* _rep;
159 kumpf 1.19 
160 mike  1.12     friend class CIMConstQualifierDecl;
161                friend class CIMClassRep;
162 kumpf 1.19     friend class XmlWriter;
163 kumpf 1.20     friend class MofWriter;
164 mike  1.12 };
165            
166            ////////////////////////////////////////////////////////////////////////////////
167            //
168            // CIMConstQualifierDecl
169            //
170            ////////////////////////////////////////////////////////////////////////////////
171            
172 kumpf 1.35 ///
173 mike  1.12 class PEGASUS_COMMON_LINKAGE CIMConstQualifierDecl
174            {
175            public:
176 kumpf 1.17     ///
177                CIMConstQualifierDecl();
178            
179                ///
180                CIMConstQualifierDecl(const CIMConstQualifierDecl& x);
181            
182                ///
183                CIMConstQualifierDecl(const CIMQualifierDecl& x);
184            
185 kumpf 1.35     /** Constructor - Creates a CIMConstQualiferDecl.
186                    @param name - CIMName containing the name of the Qualifier declaration.
187                    @param value - CIMValue for the qualifier.
188                    @param scope - CIMScope containing the scope of the qualifier.
189                    @param flavor - Optional definition of the flavor for the qualifier.  
190                    CIMFlavor::DEFAULTS is used if no value supplied.  
191                    @param arraySize - Optional integer defining the arraysize if the
192                    qualifier is an array type with fixed value array. The default is
193                    zero indicating that the qualifier declaration is not a fixed size
194                    array.
195 kumpf 1.17     */
196 mike  1.12     CIMConstQualifierDecl(
197 kumpf 1.28         const CIMName& name, 
198 kumpf 1.17         const CIMValue& value, 
199 kumpf 1.32         const CIMScope & scope,
200                    const CIMFlavor & flavor = CIMFlavor (CIMFlavor::DEFAULTS),
201 kumpf 1.17         Uint32 arraySize = 0);
202            
203 kumpf 1.35     ///
204 kumpf 1.17     ~CIMConstQualifierDecl();
205            
206                ///
207                CIMConstQualifierDecl& operator=(const CIMConstQualifierDecl& x);
208            
209                ///
210                CIMConstQualifierDecl& operator=(const CIMQualifierDecl& x);
211            
212                ///
213 kumpf 1.28     const CIMName& getName() const;
214 kumpf 1.17 
215                ///
216                CIMType getType() const;
217            
218                ///
219                Boolean isArray() const;
220            
221                ///
222                const CIMValue& getValue() const;
223            
224                ///
225 kumpf 1.31     const CIMScope & getScope() const;
226 kumpf 1.17 
227                ///
228 kumpf 1.32     const CIMFlavor & getFlavor() const;
229 kumpf 1.17 
230                ///
231                Uint32 getArraySize() const;
232            
233 kumpf 1.35     ///
234 kumpf 1.30     Boolean isUninitialized() const;
235 kumpf 1.17 
236                ///
237                Boolean identical(const CIMConstQualifierDecl& x) const;
238            
239                ///
240                CIMQualifierDecl clone() const;
241 mike  1.12 
242            private:
243            
244 kumpf 1.17     void _checkRep() const;
245 mike  1.12 
246                CIMQualifierDeclRep* _rep;
247 kumpf 1.19 
248 mike  1.12     friend class CIMQualifierDecl;
249 kumpf 1.19     friend class XmlWriter;
250 kumpf 1.20     friend class MofWriter;
251 mike  1.12 };
252            
253            #define PEGASUS_ARRAY_T CIMQualifierDecl
254 kumpf 1.21 # include <Pegasus/Common/ArrayInter.h>
255 mike  1.12 #undef PEGASUS_ARRAY_T
256            
257            PEGASUS_NAMESPACE_END
258            
259            #endif /* Pegasus_QualifierDecl_h */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2