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

Diff for /pegasus/src/Pegasus/Common/CIMParamValueRep.cpp between version 1.7 and 1.31

version 1.7, 2002/03/04 15:10:05 version 1.31, 2008/03/05 21:31:45
Line 1 
Line 1 
 //%/////////////////////////////////////////////////////////////////////////////  //%2006////////////////////////////////////////////////////////////////////////
 // //
 // Copyright (c) 2000, 2001 BMC Software, Hewlett-Packard Company, IBM,  // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
 // The Open Group, Tivoli Systems  // 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 21 
Line 29 
 // //
 //============================================================================== //==============================================================================
 // //
 // Author: Nitin Upasani, Hewlett-Packard Company (Nitin_Upasani@hp.com)  
 //  
 // Modified By: Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)  
 //  
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
 #include <Pegasus/Common/Config.h> #include <Pegasus/Common/Config.h>
 #include <cstdio> #include <cstdio>
 #include "XmlWriter.h"  #include "CIMParamValueRep.h"
 #include "CIMParamValue.h"  #include "StrLit.h"
  
 PEGASUS_NAMESPACE_BEGIN PEGASUS_NAMESPACE_BEGIN
  
Line 40 
Line 44 
     Boolean isTyped)     Boolean isTyped)
     : _parameterName(parameterName), _value(value), _isTyped(isTyped)     : _parameterName(parameterName), _value(value), _isTyped(isTyped)
 { {
 }      // ensure parameterName is not null
       if (parameterName.size() == 0)
 CIMParamValueRep::~CIMParamValueRep()  
 {  
   
 }  
   
 //------------------------------------------------------------------------------  
 //  
 //     <!ELEMENT PARAMVALUE (VALUE|VALUE.REFERENCE|VALUE.ARRAY|VALUE.REFARRAY)?>  
 //     <!ATTLIST PARAMVALUE  
 //         %CIMName;  
 //         %ParamType;>  
 //  
 //------------------------------------------------------------------------------  
 void CIMParamValueRep::toXml(Array<Sint8>& out) const  
 {  
     out << "<PARAMVALUE NAME=\"" << _parameterName << "\"";  
   
     CIMType type = _value.getType();  
   
     if (_isTyped && (type != CIMType::NONE))  
     {  
         out << " PARAMTYPE=\"" << TypeToString(type) << "\"";  
     }  
   
     out << ">\n";  
     /*KSTEST*/  
     _value.toXml(out, false);  
   
     out << "</PARAMVALUE>\n";  
 }  
   
 void CIMParamValueRep::print(PEGASUS_STD(ostream) &os) const  
 { {
     Array<Sint8> tmp;          throw UninitializedObjectException();
     toXml(tmp);  
     tmp.append('\0');  
     os << tmp.getData() << PEGASUS_STD(endl);  
 } }
   
 Boolean CIMParamValueRep::identical(const CIMParamValueRep* x) const  
 {  
     if (_parameterName != x->_parameterName)  
         return false;  
   
     if (_value != x->_value)  
         return false;  
   
     if (_isTyped != x->_isTyped)  
         return false;  
   
     return true;  
 } }
  
 CIMParamValueRep::CIMParamValueRep()  CIMParamValueRep::~CIMParamValueRep()
 { {
   
 } }
  
 CIMParamValueRep::CIMParamValueRep(const CIMParamValueRep& x) : CIMParamValueRep::CIMParamValueRep(const CIMParamValueRep& x) :
Line 108 
Line 63 
 { {
 } }
  
 // ATTN-RK-P3-20010219: Is this correct?  (See also CIMMethodRep.cpp,  void CIMParamValueRep::setParameterName(String& parameterName)
 // CIMParameterRep.cpp, CIMPropertyRep.cpp, CIMQualifierDeclRep.cpp,  {
 // CIMQualifierRep.cpp)      // ensure parameterName is not null
 CIMParamValueRep& CIMParamValueRep::operator=(const CIMParamValueRep& x)      if (parameterName.size() == 0)
 { {
     return *this;          throw UninitializedObjectException();
 } }
  
 void CIMParamValueRep::setParameterName(String& parameterName)  
 {  
     _parameterName = parameterName;     _parameterName = parameterName;
 } }
  


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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2