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

Diff for /pegasus/src/Pegasus/Common/CIMMethodRep.cpp between version 1.45 and 1.52

version 1.45, 2005/05/17 14:55:08 version 1.52, 2007/10/23 17:38:45
Line 1 
Line 1 
 //%2005////////////////////////////////////////////////////////////////////////  //%2006////////////////////////////////////////////////////////////////////////
 // //
 // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
 // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems. // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
Line 8 
Line 8 
 // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group. // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.; // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 // EMC Corporation; VERITAS Software Corporation; The Open Group. // 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 27 
Line 29 
 // //
 //============================================================================== //==============================================================================
 // //
 // Author: Mike Brasher (mbrasher@bmc.com)  
 //  
 // Modified By: Carol Ann Krug Graves, Hewlett-Packard Company  
 //                  (carolann_graves@hp.com)  
 //              David Dillard, VERITAS Software Corp.  
 //                  (david.dillard@veritas.com)  
 //  
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
 #include <Pegasus/Common/Config.h> #include <Pegasus/Common/Config.h>
Line 45 
Line 40 
 #include "CIMScope.h" #include "CIMScope.h"
 #include "XmlWriter.h" #include "XmlWriter.h"
 #include "MofWriter.h" #include "MofWriter.h"
 #include <Pegasus/Common/MessageLoader.h> //l10n  #include <Pegasus/Common/MessageLoader.h>
   #include "StrLit.h"
  
 PEGASUS_NAMESPACE_BEGIN PEGASUS_NAMESPACE_BEGIN
  
Line 60 
Line 56 
     _classOrigin(x._classOrigin),     _classOrigin(x._classOrigin),
     _propagated(x._propagated)     _propagated(x._propagated)
 { {
     // ensure name is not null  
     if(name.isNull())  
     {  
         throw UninitializedObjectException();  
     }  
   
     x._qualifiers.cloneTo(_qualifiers);     x._qualifiers.cloneTo(_qualifiers);
  
     _parameters.reserveCapacity(x._parameters.size());     _parameters.reserveCapacity(x._parameters.size());
Line 116 
Line 106 
     if (x.isUninitialized())     if (x.isUninitialized())
         throw UninitializedObjectException();         throw UninitializedObjectException();
  
     if (findParameter(x.getName()) != PEG_NOT_FOUND){      if (findParameter(x.getName()) != PEG_NOT_FOUND)
         //l10n      {
                 //throw AlreadyExistsException  
             //("parameter \"" + x.getName().getString () + "\"");  
         MessageLoaderParms parms("Common.CIMMethodRep.PARAMETER",         MessageLoaderParms parms("Common.CIMMethodRep.PARAMETER",
                                                          "parameter \"$0\"",                                                          "parameter \"$0\"",
                                                          x.getName().getString());                                                          x.getName().getString());
Line 220 
Line 208 
     return x ? "true" : "false";     return x ? "true" : "false";
 } }
  
 void CIMMethodRep::toXml(Array<char>& out) const  void CIMMethodRep::toXml(Buffer& out) const
 { {
     out << "<METHOD";      out << STRLIT("<METHOD NAME=\"") << _name;
       out.append('"');
  
     out << " NAME=\"" << _name << "\"";      out << STRLIT(" TYPE=\"") << cimTypeToString(_type);
       out.append('"');
     out << " TYPE=\"" << cimTypeToString (_type) << "\"";  
  
     if (!_classOrigin.isNull())     if (!_classOrigin.isNull())
         out << " CLASSORIGIN=\"" << _classOrigin << "\"";      {
           out << STRLIT(" CLASSORIGIN=\"") << _classOrigin;
           out.append('"');
       }
  
     if (_propagated != false)     if (_propagated != false)
         out << " PROPAGATED=\"" << _toString(_propagated) << "\"";      {
           out << STRLIT(" PROPAGATED=\"") << _toString(_propagated);
           out.append('"');
       }
  
     out << ">\n";      out << STRLIT(">\n");
  
     _qualifiers.toXml(out);     _qualifiers.toXml(out);
  
     for (Uint32 i = 0, n = _parameters.size(); i < n; i++)     for (Uint32 i = 0, n = _parameters.size(); i < n; i++)
         XmlWriter::appendParameterElement(out, _parameters[i]);         XmlWriter::appendParameterElement(out, _parameters[i]);
  
     out << "</METHOD>\n";      out << STRLIT("</METHOD>\n");
 } }
  
 /** /**
Line 253 
Line 247 
     Format with qualifiers on one line and declaration on another. Start     Format with qualifiers on one line and declaration on another. Start
     with newline but none at the end.     with newline but none at the end.
 */ */
 void CIMMethodRep::toMof(Array<char>& out) const   //ATTNKS:  void CIMMethodRep::toMof(Buffer& out) const   //ATTNKS:
 { {
     // Output the qualifier list starting on new line     // Output the qualifier list starting on new line
     if (_qualifiers.getCount())     if (_qualifiers.getCount())
         out << "\n";          out.append('\n');
  
     _qualifiers.toMof(out);     _qualifiers.toMof(out);
  
     // output the type, MethodName and ParmeterList left enclosure     // output the type, MethodName and ParmeterList left enclosure
     out << "\n" << cimTypeToString (_type) << " " << _name << "(";      out.append('\n');
       out << cimTypeToString(_type);
       out.append(' ');
       out << _name;
       out.append('(');
  
     // output the param list separated by commas.     // output the param list separated by commas.
  
Line 270 
Line 268 
     {     {
         // If not first, output comma separator         // If not first, output comma separator
         if (i)         if (i)
             out << ", ";              out << STRLIT(", ");
  
         MofWriter::appendParameterElement(out, _parameters[i]);         MofWriter::appendParameterElement(out, _parameters[i]);
     }     }
  
     // output the parameterlist and method terminator     // output the parameterlist and method terminator
     out << ");";      out << STRLIT(");");
 } }
  
  
 Boolean CIMMethodRep::identical(const CIMMethodRep* x) const Boolean CIMMethodRep::identical(const CIMMethodRep* x) const
 { {
       // If the pointers are the same, the objects must be identical
       if (this == x)
       {
           return true;
       }
   
     if (!_name.equal (x->_name))     if (!_name.equal (x->_name))
         return false;         return false;
  


Legend:
Removed from v.1.45  
changed lines
  Added in v.1.52

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2