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

  1 karl  1.12 //%2005////////////////////////////////////////////////////////////////////////
  2 mike  1.2  //
  3 karl  1.11 // 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.8  // IBM Corp.; EMC Corporation, The Open Group.
  7 karl  1.11 // 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.12 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 10            // EMC Corporation; VERITAS Software Corporation; The Open Group.
 11 mike  1.2  //
 12            // Permission is hereby granted, free of charge, to any person obtaining a copy
 13 kumpf 1.4  // 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.2  // 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.4  // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
 20 mike  1.2  // 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.4  // 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.2  // 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            // Author: Mike Brasher (mbrasher@bmc.com)
 31            //
 32 kumpf 1.3  // Modified By: Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
 33 mike  1.2  //
 34            //%/////////////////////////////////////////////////////////////////////////////
 35            
 36            #include "CIMPropertyList.h"
 37            
 38            PEGASUS_NAMESPACE_BEGIN
 39            
 40 kumpf 1.3  class CIMPropertyListRep
 41 mike  1.2  {
 42 kumpf 1.3  public:
 43 kumpf 1.6      Array<CIMName> propertyNames;
 44 kumpf 1.3      Boolean isNull;
 45            };
 46 mike  1.2  
 47 kumpf 1.3  
 48 a.arora 1.10 CIMPropertyList::CIMPropertyList()
 49 kumpf   1.3  {
 50 a.arora 1.10     _rep = new CIMPropertyListRep();
 51                  _rep->isNull = true;
 52 mike    1.2  }
 53              
 54 a.arora 1.10 CIMPropertyList::CIMPropertyList(const CIMPropertyList& x)
 55 mike    1.2  {
 56 a.arora 1.10     _rep = new CIMPropertyListRep();
 57 kumpf   1.3      _rep->propertyNames = x._rep->propertyNames;
 58                  _rep->isNull = x._rep->isNull;
 59              }
 60 mike    1.2  
 61 a.arora 1.10 CIMPropertyList::CIMPropertyList(const Array<CIMName>& propertyNames)
 62 kumpf   1.3  {
 63 a.arora 1.10     _rep = new CIMPropertyListRep();
 64 kumpf   1.3      _rep->propertyNames = propertyNames;
 65                  _rep->isNull = false;
 66 mike    1.2  }
 67              
 68 kumpf   1.3  CIMPropertyList::~CIMPropertyList()
 69 mike    1.2  {
 70 a.arora 1.10     delete _rep;
 71 mike    1.2  }
 72              
 73 kumpf   1.6  void CIMPropertyList::set(const Array<CIMName>& propertyNames)
 74 mike    1.2  {
 75 kumpf   1.3      _rep->propertyNames = propertyNames;
 76                  _rep->isNull = false;
 77 mike    1.2  }
 78              
 79              CIMPropertyList& CIMPropertyList::operator=(const CIMPropertyList& x)
 80              {
 81                  if (&x != this)
 82                  {
 83 kumpf   1.3  	_rep->propertyNames = x._rep->propertyNames;
 84              	_rep->isNull = x._rep->isNull;
 85 mike    1.2      }
 86              
 87                  return *this;
 88              }
 89              
 90              void CIMPropertyList::clear()
 91              {
 92 kumpf   1.3      _rep->propertyNames.clear();
 93                  _rep->isNull = true;
 94              }
 95              
 96              Boolean CIMPropertyList::isNull() const
 97              {
 98                  return _rep->isNull;
 99              }
100              
101 kumpf   1.5  Uint32 CIMPropertyList::size() const
102 kumpf   1.3  {
103                  return _rep->propertyNames.size();
104              }
105              
106 kumpf   1.7  const CIMName& CIMPropertyList::operator[](Uint32 index) const
107 kumpf   1.3  {
108 kumpf   1.7      return _rep->propertyNames[index];
109 kumpf   1.3  }
110              
111 kumpf   1.6  Array<CIMName> CIMPropertyList::getPropertyNameArray() const
112 kumpf   1.3  {
113                  return _rep->propertyNames;
114 mike    1.2  }
115              
116              PEGASUS_NAMESPACE_END

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2