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

Diff for /pegasus/src/Pegasus/Common/CIMParameterRep.cpp between version 1.7 and 1.16

version 1.7, 2001/06/16 23:10:00 version 1.16, 2002/05/07 00:00:35
Line 26 
Line 26 
 // //
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
   #include <Pegasus/Common/Config.h>
 #include <cstdio> #include <cstdio>
 #include "CIMParameter.h" #include "CIMParameter.h"
   #include "CIMParameterRep.h"
 #include "Indentor.h" #include "Indentor.h"
 #include "CIMName.h" #include "CIMName.h"
 #include "CIMScope.h" #include "CIMScope.h"
Line 103 
Line 105 
         nameSpace,         nameSpace,
         CIMScope::PARAMETER,         CIMScope::PARAMETER,
         false,         false,
         dummy);          dummy,
           true);
 } }
  
 void CIMParameterRep::toXml(Array<Sint8>& out) const void CIMParameterRep::toXml(Array<Sint8>& out) const
Line 129 
Line 132 
  
         out << "</PARAMETER.ARRAY>\n";         out << "</PARAMETER.ARRAY>\n";
     }     }
       else if (_type == CIMType::REFERENCE)
       {
           out << "<PARAMETER.REFERENCE";
           out << " NAME=\"" << _name << "\" ";
           out << " REFERENCECLASS=\"" << _referenceClassName << "\"";
           out << ">\n";
   
           _qualifiers.toXml(out);
   
           out << "</PARAMETER.REFERENCE>\n";
       }
     else     else
     {     {
         out << "<PARAMETER";         out << "<PARAMETER";
   
         out << " NAME=\"" << _name << "\" ";         out << " NAME=\"" << _name << "\" ";
   
         out << " TYPE=\"" << TypeToString(_type) << "\"";         out << " TYPE=\"" << TypeToString(_type) << "\"";
   
         out << ">\n";         out << ">\n";
  
         _qualifiers.toXml(out);         _qualifiers.toXml(out);
Line 145 
Line 156 
     }     }
 } }
  
   /** toMof - puts the Mof representation of teh Parameter object to
       the output parameter array
       The BNF for this conversion is:
       parameterList    =  parameter *( "," parameter )
   
           parameter    =  [ qualifierList ] (dataType|objectRef) parameterName
                                   [ array ]
   
           parameterName=  IDENTIFIER
   
           array        =  "[" [positiveDecimalValue] "]"
   
       Format on a single line.
       */
   void CIMParameterRep::toMof(Array<Sint8>& out) const
   {
       // Output the qualifiers for the parameter
       _qualifiers.toMof(out);
   
       if (_qualifiers.getCount())
           out << " ";
   
       // Output the data type and name
       out << TypeToString(_type) << " " <<  _name;
   
       if (_isArray)
       {
           //Output the array indicator "[ [arraysize] ]"
           if (_arraySize)
           {
               char buffer[32];
               sprintf(buffer, "[%d]", _arraySize);
               out << buffer;
           }
           else
               out << "[]";
       }
   }
   
   
 void CIMParameterRep::print(PEGASUS_STD(ostream) &os) const void CIMParameterRep::print(PEGASUS_STD(ostream) &os) const
 { {
     Array<Sint8> tmp;     Array<Sint8> tmp;
Line 186 
Line 237 
     x._qualifiers.cloneTo(_qualifiers);     x._qualifiers.cloneTo(_qualifiers);
 } }
  
 CIMParameterRep& CIMParameterRep::operator=(const CIMParameterRep& x)  
 {  
     return *this;  
 }  
   
 void CIMParameterRep::setType(CIMType type) void CIMParameterRep::setType(CIMType type)
 { {
     _type = type;     _type = type;


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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2