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

Diff for /pegasus/src/Pegasus/Common/CIMParameter.cpp between version 1.12 and 1.31

version 1.12, 2002/05/14 03:27:25 version 1.31, 2008/10/22 08:19:40
Line 1 
Line 1 
 //%/////////////////////////////////////////////////////////////////////////////  //%2006////////////////////////////////////////////////////////////////////////
 // //
 // Copyright (c) 2000, 2001 The Open group, BMC Software, Tivoli Systems, IBM  // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
   // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
   // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;
   // IBM Corp.; EMC Corporation, The Open Group.
   // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
   // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
   // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
   // EMC Corporation; VERITAS Software Corporation; The Open Group.
   // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
   // EMC Corporation; Symantec Corporation; The Open Group.
 // //
 // Permission is hereby granted, free of charge, to any person obtaining a copy // Permission is hereby granted, free of charge, to any person obtaining a copy
 // of this software and associated documentation files (the "Software"), to // of this software and associated documentation files (the "Software"), to
Line 20 
Line 29 
 // //
 //============================================================================== //==============================================================================
 // //
 // Author: Mike Brasher (mbrasher@bmc.com)  
 //  
 // Modified By: Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)  
 //  
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
 #include "CIMParameter.h" #include "CIMParameter.h"
Line 48 
Line 53 
  
 CIMParameter::CIMParameter(const CIMParameter& x) CIMParameter::CIMParameter(const CIMParameter& x)
 { {
     Inc(_rep = x._rep);      _rep = x._rep;
       if (_rep)
           _rep->Inc();
 } }
  
 CIMParameter::CIMParameter( CIMParameter::CIMParameter(
     const String& name,      const CIMName& name,
     CIMType type,     CIMType type,
     Boolean isArray,     Boolean isArray,
     Uint32 arraySize,     Uint32 arraySize,
     const String& referenceClassName)      const CIMName& referenceClassName)
 { {
     _rep = new CIMParameterRep(     _rep = new CIMParameterRep(
         name, type, isArray, arraySize, referenceClassName);         name, type, isArray, arraySize, referenceClassName);
Line 69 
Line 76 
  
 CIMParameter::~CIMParameter() CIMParameter::~CIMParameter()
 { {
     Dec(_rep);      if (_rep)
           _rep->Dec();
 } }
  
 CIMParameter& CIMParameter::operator=(const CIMParameter& x) CIMParameter& CIMParameter::operator=(const CIMParameter& x)
 { {
     if (x._rep != _rep)     if (x._rep != _rep)
     {     {
         Dec(_rep);          if (_rep)
         Inc(_rep = x._rep);              _rep->Dec();
           _rep = x._rep;
           if (_rep)
               _rep->Inc();
     }     }
     return *this;     return *this;
 } }
  
 const String& CIMParameter::getName() const  const CIMName& CIMParameter::getName() const
 { {
     _checkRep();      CheckRep(_rep);
     return _rep->getName();     return _rep->getName();
 } }
  
 void CIMParameter::setName(const String& name)  void CIMParameter::setName(const CIMName& name)
 { {
     _checkRep();      CheckRep(_rep);
     _rep->setName(name);     _rep->setName(name);
 } }
  
 Boolean CIMParameter::isArray() const Boolean CIMParameter::isArray() const
 { {
     _checkRep();      CheckRep(_rep);
     return _rep->isArray();     return _rep->isArray();
 } }
  
 Uint32 CIMParameter::getArraySize() const Uint32 CIMParameter::getArraySize() const
 { {
     _checkRep();      CheckRep(_rep);
     return _rep->getArraySize();     return _rep->getArraySize();
 } }
  
 const String& CIMParameter::getReferenceClassName() const  const CIMName& CIMParameter::getReferenceClassName() const
 { {
     _checkRep();      CheckRep(_rep);
     return _rep->getReferenceClassName();     return _rep->getReferenceClassName();
 } }
  
 CIMType CIMParameter::getType() const CIMType CIMParameter::getType() const
 { {
     _checkRep();      CheckRep(_rep);
     return _rep->getType();     return _rep->getType();
 } }
  
 void CIMParameter::setType(const CIMType type)  
 {  
     _checkRep();  
     _rep->setType(type);  
 }  
   
 CIMParameter& CIMParameter::addQualifier(const CIMQualifier& x) CIMParameter& CIMParameter::addQualifier(const CIMQualifier& x)
 { {
     _checkRep();      CheckRep(_rep);
     _rep->addQualifier(x);     _rep->addQualifier(x);
     return *this;     return *this;
 } }
  
 Uint32 CIMParameter::findQualifier(const String& name) const  Uint32 CIMParameter::findQualifier(const CIMName& name) const
 { {
     _checkRep();      CheckRep(_rep);
     return _rep->findQualifier(name);     return _rep->findQualifier(name);
 } }
  
 CIMQualifier CIMParameter::getQualifier(Uint32 pos)  CIMQualifier CIMParameter::getQualifier(Uint32 index)
 {  
     _checkRep();  
     return _rep->getQualifier(pos);  
 }  
   
 CIMConstQualifier CIMParameter::getQualifier(Uint32 pos) const  
 {  
     _checkRep();  
     return _rep->getQualifier(pos);  
 }  
   
 Uint32 CIMParameter::getQualifierCount() const  
 {  
     _checkRep();  
     return _rep->getQualifierCount();  
 }  
   
 void CIMParameter::resolve(DeclContext* declContext, const String& nameSpace)  
 { {
     _checkRep();      CheckRep(_rep);
     _rep->resolve(declContext, nameSpace);      return _rep->getQualifier(index);
 } }
  
 Boolean CIMParameter::isNull() const  CIMConstQualifier CIMParameter::getQualifier(Uint32 index) const
 { {
     return (_rep == 0)? true : false;      CheckRep(_rep);
       return _rep->getQualifier(index);
 } }
  
 void CIMParameter::toXml(Array<Sint8>& out) const  void CIMParameter::removeQualifier (Uint32 index)
 { {
     _checkRep();      CheckRep(_rep);
     _rep->toXml(out);      _rep->removeQualifier (index);
 } }
  
 void CIMParameter::toMof(Array<Sint8>& out) const  Uint32 CIMParameter::getQualifierCount() const
 { {
     _checkRep();      CheckRep(_rep);
     _rep->toMof(out);      return _rep->getQualifierCount();
 } }
  
 void CIMParameter::print(PEGASUS_STD(ostream)& o) const  Boolean CIMParameter::isUninitialized() const
 { {
     _checkRep();      return _rep == 0;
     _rep->print(o);  
 } }
  
 Boolean CIMParameter::identical(const CIMConstParameter& x) const Boolean CIMParameter::identical(const CIMConstParameter& x) const
 { {
     x._checkRep();      CheckRep(x._rep);
     _checkRep();      CheckRep(_rep);
     return _rep->identical(x._rep);     return _rep->identical(x._rep);
 } }
  
Line 196 
Line 183 
     return CIMParameter(_rep->clone());     return CIMParameter(_rep->clone());
 } }
  
 void CIMParameter::_checkRep() const  
 {  
     if (!_rep)  
         ThrowUninitializedHandle();  
 }  
   
  
 //////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
 // //
Line 216 
Line 197 
  
 CIMConstParameter::CIMConstParameter(const CIMConstParameter& x) CIMConstParameter::CIMConstParameter(const CIMConstParameter& x)
 { {
     Inc(_rep = x._rep);      _rep = x._rep;
       if (_rep)
           _rep->Inc();
 } }
  
 CIMConstParameter::CIMConstParameter(const CIMParameter& x) CIMConstParameter::CIMConstParameter(const CIMParameter& x)
 { {
     Inc(_rep = x._rep);      _rep = x._rep;
       if (_rep)
           _rep->Inc();
 } }
  
 CIMConstParameter::CIMConstParameter( CIMConstParameter::CIMConstParameter(
     const String& name,      const CIMName& name,
     CIMType type,     CIMType type,
     Boolean isArray,     Boolean isArray,
     Uint32 arraySize,     Uint32 arraySize,
     const String& referenceClassName)      const CIMName& referenceClassName)
 { {
     _rep = new CIMParameterRep(     _rep = new CIMParameterRep(
         name, type, isArray, arraySize, referenceClassName);         name, type, isArray, arraySize, referenceClassName);
Line 237 
Line 222 
  
 CIMConstParameter::~CIMConstParameter() CIMConstParameter::~CIMConstParameter()
 { {
     Dec(_rep);      if (_rep)
           _rep->Dec();
 } }
  
 CIMConstParameter& CIMConstParameter::operator=(const CIMConstParameter& x) CIMConstParameter& CIMConstParameter::operator=(const CIMConstParameter& x)
 { {
     if (x._rep != _rep)     if (x._rep != _rep)
     {     {
         Dec(_rep);          if (_rep)
         Inc(_rep = x._rep);              _rep->Dec();
           _rep = x._rep;
           if (_rep)
               _rep->Inc();
   
     }     }
     return *this;     return *this;
 } }
Line 254 
Line 244 
 { {
     if (x._rep != _rep)     if (x._rep != _rep)
     {     {
         Dec(_rep);          if (_rep)
         Inc(_rep = x._rep);              _rep->Dec();
           _rep = x._rep;
           if (_rep)
               _rep->Inc();
     }     }
     return *this;     return *this;
 } }
  
 const String& CIMConstParameter::getName() const  const CIMName& CIMConstParameter::getName() const
 { {
     _checkRep();      CheckRep(_rep);
     return _rep->getName();     return _rep->getName();
 } }
  
 Boolean CIMConstParameter::isArray() const Boolean CIMConstParameter::isArray() const
 { {
     _checkRep();      CheckRep(_rep);
     return _rep->isArray();     return _rep->isArray();
 } }
  
 Uint32 CIMConstParameter::getArraySize() const Uint32 CIMConstParameter::getArraySize() const
 { {
     _checkRep();      CheckRep(_rep);
     return _rep->getArraySize();     return _rep->getArraySize();
 } }
  
 const String& CIMConstParameter::getReferenceClassName() const  const CIMName& CIMConstParameter::getReferenceClassName() const
 { {
     _checkRep();      CheckRep(_rep);
     return _rep->getReferenceClassName();     return _rep->getReferenceClassName();
 } }
  
 CIMType CIMConstParameter::getType() const CIMType CIMConstParameter::getType() const
 { {
     _checkRep();      CheckRep(_rep);
     return _rep->getType();     return _rep->getType();
 } }
  
 Uint32 CIMConstParameter::findQualifier(const String& name) const  Uint32 CIMConstParameter::findQualifier(const CIMName& name) const
 { {
     _checkRep();      CheckRep(_rep);
     return _rep->findQualifier(name);     return _rep->findQualifier(name);
 } }
  
 CIMConstQualifier CIMConstParameter::getQualifier(Uint32 pos) const  CIMConstQualifier CIMConstParameter::getQualifier(Uint32 index) const
 { {
     _checkRep();      CheckRep(_rep);
     return _rep->getQualifier(pos);      return _rep->getQualifier(index);
 } }
  
 Uint32 CIMConstParameter::getQualifierCount() const Uint32 CIMConstParameter::getQualifierCount() const
 { {
     _checkRep();      CheckRep(_rep);
     return _rep->getQualifierCount();     return _rep->getQualifierCount();
 } }
  
 Boolean CIMConstParameter::isNull() const  Boolean CIMConstParameter::isUninitialized() const
 {  
     return (_rep == 0)? true : false;  
 }  
   
 void CIMConstParameter::toXml(Array<Sint8>& out) const  
 {  
     _checkRep();  
     _rep->toXml(out);  
 }  
   
 void CIMConstParameter::print(PEGASUS_STD(ostream)& o) const  
 { {
     _checkRep();      return _rep == 0;
     _rep->print(o);  
 } }
  
 Boolean CIMConstParameter::identical(const CIMConstParameter& x) const Boolean CIMConstParameter::identical(const CIMConstParameter& x) const
 { {
     x._checkRep();      CheckRep(x._rep);
     _checkRep();      CheckRep(_rep);
     return _rep->identical(x._rep);     return _rep->identical(x._rep);
 } }
  
Line 337 
Line 318 
     return CIMParameter(_rep->clone());     return CIMParameter(_rep->clone());
 } }
  
 void CIMConstParameter::_checkRep() const  
 {  
     if (!_rep)  
         ThrowUninitializedHandle();  
 }  
   
 PEGASUS_NAMESPACE_END PEGASUS_NAMESPACE_END


Legend:
Removed from v.1.12  
changed lines
  Added in v.1.31

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2