(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.9 and 1.23

version 1.9, 2002/05/11 21:36:29 version 1.23, 2005/10/31 17:39:11
Line 1 
Line 1 
 //%/////////////////////////////////////////////////////////////////////////////  //%2005////////////////////////////////////////////////////////////////////////
 // //
 // 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.
 // //
 // 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 24 
Line 30 
 // Author: Nitin Upasani, Hewlett-Packard Company (Nitin_Upasani@hp.com) // Author: Nitin Upasani, Hewlett-Packard Company (Nitin_Upasani@hp.com)
 // //
 // Modified By: Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com) // Modified By: Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
   //              Carol Ann Krug Graves, Hewlett-Packard Company
   //                  (carolann_graves@hp.com)
   //              David Dillard, VERITAS Software Corp.
   //                  (david.dillard@veritas.com)
 // //
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
Line 40 
Line 50 
     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)
       {
           throw UninitializedObjectException();
       }
 } }
  
 CIMParamValueRep::~CIMParamValueRep() CIMParamValueRep::~CIMParamValueRep()
 { {
   
 } }
  
 //------------------------------------------------------------------------------ //------------------------------------------------------------------------------
Line 52 
Line 66 
 //     <!ELEMENT PARAMVALUE (VALUE|VALUE.REFERENCE|VALUE.ARRAY|VALUE.REFARRAY)?> //     <!ELEMENT PARAMVALUE (VALUE|VALUE.REFERENCE|VALUE.ARRAY|VALUE.REFARRAY)?>
 //     <!ATTLIST PARAMVALUE //     <!ATTLIST PARAMVALUE
 //         %CIMName; //         %CIMName;
   //         %EmbeddedObject; #IMPLIED
 //         %ParamType;> //         %ParamType;>
 // //
 //------------------------------------------------------------------------------ //------------------------------------------------------------------------------
 void CIMParamValueRep::toXml(Array<Sint8>& out) const  void CIMParamValueRep::toXml(Buffer& out) const
 { {
     out << "<PARAMVALUE NAME=\"" << _parameterName << "\"";     out << "<PARAMVALUE NAME=\"" << _parameterName << "\"";
  
     CIMType type = _value.getType();     CIMType type = _value.getType();
  
     if (_isTyped && (type != CIMType::NONE))      if (_isTyped)
     {     {
         out << " PARAMTYPE=\"" << TypeToString(type) << "\"";          // If the property type is CIMObject, then
     }          //   encode the property in CIM-XML as a string with the EMBEDDEDOBJECT attribute
           //   (there is not currently a CIM-XML "object" datatype)
     out << ">\n";          // else
     _value.toXml(out);          //   output the real type
           if (type == CIMTYPE_OBJECT)
     out << "</PARAMVALUE>\n";  
 }  
   
 void CIMParamValueRep::print(PEGASUS_STD(ostream) &os) const  
 { {
     Array<Sint8> tmp;              out << " PARAMTYPE=\"string\"";
     toXml(tmp);              out << " EMBEDDEDOBJECT=\"object\"";
     tmp.append('\0');  
     os << tmp.getData() << PEGASUS_STD(endl);  
 } }
           else
 Boolean CIMParamValueRep::identical(const CIMParamValueRep* x) const  
 { {
     if (_parameterName != x->_parameterName)              out << " PARAMTYPE=\"" << cimTypeToString (type) << "\"";
         return false;          }
       }
     if (_value != x->_value)  
         return false;  
  
     if (_isTyped != x->_isTyped)      out << ">\n";
         return false;      XmlWriter::appendValueElement(out, _value);
  
     return true;      out << "</PARAMVALUE>\n";
 } }
  
 CIMParamValueRep::CIMParamValueRep() CIMParamValueRep::CIMParamValueRep()
 { {
   
 } }
  
 CIMParamValueRep::CIMParamValueRep(const CIMParamValueRep& x) : CIMParamValueRep::CIMParamValueRep(const CIMParamValueRep& x) :
Line 109 
Line 114 
  
 void CIMParamValueRep::setParameterName(String& parameterName) void CIMParamValueRep::setParameterName(String& parameterName)
 { {
       // ensure parameterName is not null
       if(parameterName.size() == 0)
       {
           throw UninitializedObjectException();
       }
   
     _parameterName = parameterName;     _parameterName = parameterName;
 } }
  


Legend:
Removed from v.1.9  
changed lines
  Added in v.1.23

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2