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

  1 martin 1.30 //%LICENSE////////////////////////////////////////////////////////////////
  2 martin 1.31 //
  3 martin 1.30 // Licensed to The Open Group (TOG) under one or more contributor license
  4             // agreements.  Refer to the OpenPegasusNOTICE.txt file distributed with
  5             // this work for additional information regarding copyright ownership.
  6             // Each contributor licenses this file to you under the OpenPegasus Open
  7             // Source License; you may not use this file except in compliance with the
  8             // License.
  9 martin 1.31 //
 10 martin 1.30 // Permission is hereby granted, free of charge, to any person obtaining a
 11             // copy of this software and associated documentation files (the "Software"),
 12             // to deal in the Software without restriction, including without limitation
 13             // the rights to use, copy, modify, merge, publish, distribute, sublicense,
 14             // and/or sell copies of the Software, and to permit persons to whom the
 15             // Software is furnished to do so, subject to the following conditions:
 16 martin 1.31 //
 17 martin 1.30 // The above copyright notice and this permission notice shall be included
 18             // in all copies or substantial portions of the Software.
 19 martin 1.31 //
 20 martin 1.30 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 21 martin 1.31 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 22 martin 1.30 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 23             // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
 24             // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
 25             // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 26             // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 27 martin 1.31 //
 28 martin 1.30 //////////////////////////////////////////////////////////////////////////
 29 mike   1.9  //
 30             //%/////////////////////////////////////////////////////////////////////////////
 31             
 32             #include "CIMQualifierDecl.h"
 33 kumpf  1.10 #include "CIMQualifierDeclRep.h"
 34 mike   1.9  
 35             PEGASUS_NAMESPACE_BEGIN
 36             
 37             #define PEGASUS_ARRAY_T CIMQualifierDecl
 38             # include "ArrayImpl.h"
 39             #undef PEGASUS_ARRAY_T
 40             
 41 kumpf  1.10 ////////////////////////////////////////////////////////////////////////////////
 42             //
 43             // CIMQualifierDecl
 44             //
 45             ////////////////////////////////////////////////////////////////////////////////
 46             
 47             CIMQualifierDecl::CIMQualifierDecl()
 48                 : _rep(0)
 49             {
 50             }
 51             
 52             CIMQualifierDecl::CIMQualifierDecl(const CIMQualifierDecl& x)
 53             {
 54 thilo.boehm 1.29     _rep = x._rep;
 55                       if (_rep)
 56                           _rep->Inc();
 57 kumpf       1.10 }
 58                  
 59                  CIMQualifierDecl::CIMQualifierDecl(
 60 kumpf       1.16     const CIMName& name,
 61 kumpf       1.10     const CIMValue& value,
 62 kumpf       1.19     const CIMScope & scope,
 63                      const CIMFlavor & flavor,
 64 kumpf       1.10     Uint32 arraySize)
 65                  {
 66                      _rep = new CIMQualifierDeclRep(name, value, scope, flavor, arraySize);
 67                  }
 68                  
 69                  CIMQualifierDecl::CIMQualifierDecl(CIMQualifierDeclRep* rep)
 70                      : _rep(rep)
 71                  {
 72                  }
 73                  
 74                  CIMQualifierDecl::~CIMQualifierDecl()
 75                  {
 76 thilo.boehm 1.29     if (_rep)
 77                          _rep->Dec();
 78 kumpf       1.10 }
 79                  
 80                  CIMQualifierDecl& CIMQualifierDecl::operator=(const CIMQualifierDecl& x)
 81                  {
 82                      if (x._rep != _rep)
 83                      {
 84 thilo.boehm 1.29         if (_rep)
 85                              _rep->Dec();
 86                          _rep = x._rep;
 87                           if (_rep)
 88                               _rep->Inc();
 89 kumpf       1.10     }
 90                  
 91                      return *this;
 92                  }
 93                  
 94 kumpf       1.16 const CIMName& CIMQualifierDecl::getName() const
 95 kumpf       1.10 {
 96 marek       1.27     CheckRep(_rep);
 97 kumpf       1.10     return _rep->getName();
 98                  }
 99                  
100 kumpf       1.16 void CIMQualifierDecl::setName(const CIMName& name)
101 kumpf       1.10 {
102 marek       1.27     CheckRep(_rep);
103 kumpf       1.10     _rep->setName(name);
104                  }
105                  
106                  CIMType CIMQualifierDecl::getType() const
107                  {
108 marek       1.27     CheckRep(_rep);
109 kumpf       1.10     return _rep->getType();
110                  }
111                  
112                  Boolean CIMQualifierDecl::isArray() const
113                  {
114 marek       1.27     CheckRep(_rep);
115 kumpf       1.10     return _rep->isArray();
116                  }
117                  
118                  const CIMValue& CIMQualifierDecl::getValue() const
119                  {
120 marek       1.27     CheckRep(_rep);
121 kumpf       1.10     return _rep->getValue();
122                  }
123                  
124                  void CIMQualifierDecl::setValue(const CIMValue& value)
125                  {
126 marek       1.27     CheckRep(_rep);
127 kumpf       1.10     _rep->setValue(value);
128                  }
129                  
130 kumpf       1.18 const CIMScope & CIMQualifierDecl::getScope() const
131 kumpf       1.10 {
132 marek       1.27     CheckRep(_rep);
133 kumpf       1.10     return _rep->getScope();
134                  }
135                  
136 kumpf       1.19 const CIMFlavor & CIMQualifierDecl::getFlavor() const
137 kumpf       1.10 {
138 marek       1.27     CheckRep(_rep);
139 kumpf       1.10     return _rep->getFlavor();
140                  }
141                  
142                  Uint32 CIMQualifierDecl::getArraySize() const
143                  {
144 marek       1.27     CheckRep(_rep);
145 kumpf       1.10     return _rep->getArraySize();
146                  }
147                  
148 kumpf       1.17 Boolean CIMQualifierDecl::isUninitialized() const
149 kumpf       1.10 {
150 kumpf       1.26     return _rep == 0;
151 kumpf       1.10 }
152                  
153 mike        1.9  Boolean CIMQualifierDecl::identical(const CIMConstQualifierDecl& x) const
154                  {
155 marek       1.27     CheckRep(x._rep);
156                      CheckRep(_rep);
157 mike        1.9      return _rep->identical(x._rep);
158 kumpf       1.10 }
159                  
160                  CIMQualifierDecl CIMQualifierDecl::clone() const
161                  {
162                      return CIMQualifierDecl(_rep->clone());
163                  }
164                  
165                  
166                  ////////////////////////////////////////////////////////////////////////////////
167                  //
168                  // CIMConstQualifierDecl
169                  //
170                  ////////////////////////////////////////////////////////////////////////////////
171                  
172                  CIMConstQualifierDecl::CIMConstQualifierDecl()
173                      : _rep(0)
174                  {
175                  }
176                  
177                  CIMConstQualifierDecl::CIMConstQualifierDecl(const CIMConstQualifierDecl& x)
178                  {
179 thilo.boehm 1.29     _rep = x._rep;
180                       if (_rep)
181                           _rep->Inc();
182 kumpf       1.10 }
183                  
184                  CIMConstQualifierDecl::CIMConstQualifierDecl(const CIMQualifierDecl& x)
185                  {
186 thilo.boehm 1.29     _rep = x._rep;
187                       if (_rep)
188                           _rep->Inc();
189 kumpf       1.10 }
190                  
191                  CIMConstQualifierDecl::CIMConstQualifierDecl(
192 kumpf       1.16     const CIMName& name,
193 kumpf       1.10     const CIMValue& value,
194 kumpf       1.19     const CIMScope & scope,
195                      const CIMFlavor & flavor,
196 kumpf       1.10     Uint32 arraySize)
197                  {
198                      _rep = new CIMQualifierDeclRep(name, value, scope, flavor, arraySize);
199                  }
200                  
201                  CIMConstQualifierDecl::~CIMConstQualifierDecl()
202                  {
203 thilo.boehm 1.29     if (_rep)
204                          _rep->Dec();
205 kumpf       1.10 }
206                  
207                  CIMConstQualifierDecl& CIMConstQualifierDecl::operator=(
208                      const CIMConstQualifierDecl& x)
209                  {
210                      if (x._rep != _rep)
211                      {
212 thilo.boehm 1.29         if (_rep)
213                              _rep->Dec();
214                          _rep = x._rep;
215                           if (_rep)
216                               _rep->Inc();
217 kumpf       1.10     }
218                  
219                      return *this;
220                  }
221                  
222                  CIMConstQualifierDecl& CIMConstQualifierDecl::operator=(
223                      const CIMQualifierDecl& x)
224                  {
225                      if (x._rep != _rep)
226                      {
227 thilo.boehm 1.29         if (_rep)
228                              _rep->Dec();
229                          _rep = x._rep;
230                           if (_rep)
231                               _rep->Inc();
232 kumpf       1.10     }
233                  
234                      return *this;
235                  }
236                  
237 kumpf       1.16 const CIMName& CIMConstQualifierDecl::getName() const
238 kumpf       1.10 {
239 marek       1.27     CheckRep(_rep);
240 kumpf       1.10     return _rep->getName();
241                  }
242                  
243                  CIMType CIMConstQualifierDecl::getType() const
244                  {
245 marek       1.27     CheckRep(_rep);
246 kumpf       1.10     return _rep->getType();
247                  }
248                  
249                  Boolean CIMConstQualifierDecl::isArray() const
250                  {
251 marek       1.27     CheckRep(_rep);
252 kumpf       1.10     return _rep->isArray();
253                  }
254                  
255                  const CIMValue& CIMConstQualifierDecl::getValue() const
256                  {
257 marek       1.27     CheckRep(_rep);
258 kumpf       1.10     return _rep->getValue();
259                  }
260                  
261 kumpf       1.18 const CIMScope & CIMConstQualifierDecl::getScope() const
262 kumpf       1.10 {
263 marek       1.27     CheckRep(_rep);
264 kumpf       1.10     return _rep->getScope();
265                  }
266                  
267 kumpf       1.19 const CIMFlavor & CIMConstQualifierDecl::getFlavor() const
268 kumpf       1.10 {
269 marek       1.27     CheckRep(_rep);
270 kumpf       1.10     return _rep->getFlavor();
271                  }
272                  
273                  Uint32 CIMConstQualifierDecl::getArraySize() const
274                  {
275 marek       1.27     CheckRep(_rep);
276 kumpf       1.10     return _rep->getArraySize();
277                  }
278                  
279 kumpf       1.17 Boolean CIMConstQualifierDecl::isUninitialized() const
280 kumpf       1.10 {
281 kumpf       1.26     return _rep == 0;
282 kumpf       1.10 }
283                  
284                  Boolean CIMConstQualifierDecl::identical(const CIMConstQualifierDecl& x) const
285                  {
286 marek       1.27     CheckRep(x._rep);
287                      CheckRep(_rep);
288 kumpf       1.10     return _rep->identical(x._rep);
289                  }
290                  
291                  CIMQualifierDecl CIMConstQualifierDecl::clone() const
292                  {
293                      return CIMQualifierDecl(_rep->clone());
294                  }
295                  
296 mike        1.9  PEGASUS_NAMESPACE_END

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2