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

Diff for /pegasus/src/Pegasus/Common/XmlWriter.h between version 1.2 and 1.21.2.3

version 1.2, 2001/01/29 02:23:44 version 1.21.2.3, 2001/09/27 21:57:25
Line 1 
Line 1 
 //BEGIN_LICENSE  //%/////////////////////////////////////////////////////////////////////////////
 // //
 // Copyright (c) 2000 The Open Group, BMC Software, Tivoli Systems, IBM  // Copyright (c) 2000, 2001 BMC Software, Hewlett-Packard Company, IBM,
   // The Open Group, Tivoli Systems
 // //
 // Permission is hereby granted, free of charge, to any person obtaining a  // Permission is hereby granted, free of charge, to any person obtaining a copy
 // copy of this software and associated documentation files (the "Software"),  // of this software and associated documentation files (the "Software"), to
 // to deal in the Software without restriction, including without limitation  // deal in the Software without restriction, including without limitation the
 // the rights to use, copy, modify, merge, publish, distribute, sublicense,  // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 // and/or sell copies of the Software, and to permit persons to whom the  // sell copies of the Software, and to permit persons to whom the Software is
 // Software is furnished to do so, subject to the following conditions:  // furnished to do so, subject to the following conditions:
   //
   // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
   // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
   // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
   // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
   // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
   // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
   // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
   // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 // //
 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR  //==============================================================================
 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,  
 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL  
 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER  
 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING  
 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER  
 // DEALINGS IN THE SOFTWARE.  
 // //
 //END_LICENSE  // Author: Mike Brasher (mbrasher@bmc.com)
 //BEGIN_HISTORY  
 // //
 // Author:  // Modified By:
   //         Nitin Upasani, Hewlett-Packard Company (Nitin_Upasani@hp.com)
 // //
 // $Log$  //%/////////////////////////////////////////////////////////////////////////////
 // Revision 1.2  2001/01/29 02:23:44  mike  
 // Added support for GetInstance operation  
 //  
 // Revision 1.1.1.1  2001/01/14 19:53:36  mike  
 // Pegasus import  
 //  
 //  
 //END_HISTORY  
   
 ////////////////////////////////////////////////////////////////////////////////  
 //  
 // XmlWriter.h  
 //  
 ////////////////////////////////////////////////////////////////////////////////  
  
 #ifndef Pegasus_XmlWriter_h #ifndef Pegasus_XmlWriter_h
 #define Pegasus_XmlWriter_h #define Pegasus_XmlWriter_h
Line 47 
Line 37 
 #include <Pegasus/Common/Array.h> #include <Pegasus/Common/Array.h>
 #include <Pegasus/Common/String.h> #include <Pegasus/Common/String.h>
 #include <Pegasus/Common/Indentor.h> #include <Pegasus/Common/Indentor.h>
 #include <Pegasus/Common/Reference.h>  #include <Pegasus/Common/CIMReference.h>
  
 PEGASUS_NAMESPACE_BEGIN PEGASUS_NAMESPACE_BEGIN
  
 class ConstQualifierDecl;  class CIMConstQualifierDecl;
 class ConstClassDecl;  class CIMConstClass;
   class CIMConstInstance;
  
 class PEGASUS_COMMON_LINKAGE XmlWriter class PEGASUS_COMMON_LINKAGE XmlWriter
 { {
Line 103 
Line 94 
         const Array<Sint8>& content);         const Array<Sint8>& content);
  
     static Array<Sint8> formatMessageElement(     static Array<Sint8> formatMessageElement(
         Uint32 messageId,          const String& messageId,
         const Array<Sint8>& body);         const Array<Sint8>& body);
  
     static Array<Sint8> formatSimpleReqElement(     static Array<Sint8> formatSimpleReqElement(
Line 130 
Line 121 
         const Array<Sint8>& body);         const Array<Sint8>& body);
  
     static Array<Sint8> formatErrorElement(     static Array<Sint8> formatErrorElement(
         CimException::Code code,          CIMStatusCode code,
         const char* description);         const char* description);
  
     static Array<Sint8>& appendBooleanParameter(     static Array<Sint8>& appendBooleanParameter(
Line 138 
Line 129 
         const char* parameterName,         const char* parameterName,
         Boolean flag);         Boolean flag);
  
       static Array<Sint8>& appendStringParameter(
           Array<Sint8>& out,
           const char* parameterName,
           const String& str);
   
     static Array<Sint8>& appendClassNameParameter(     static Array<Sint8>& appendClassNameParameter(
         Array<Sint8>& out,         Array<Sint8>& out,
         const char* parameterName,         const char* parameterName,
Line 151 
Line 147 
     static Array<Sint8>& appendClassParameter(     static Array<Sint8>& appendClassParameter(
         Array<Sint8>& out,         Array<Sint8>& out,
         const char* parameterName,         const char* parameterName,
         const ConstClassDecl& classDecl);          const CIMConstClass& cimClass);
  
     static Array<Sint8>& appendInstanceNameParameter(     static Array<Sint8>& appendInstanceNameParameter(
         Array<Sint8>& out,         Array<Sint8>& out,
         const char* parameterName,         const char* parameterName,
         const Reference& instanceName);          const CIMReference& instanceName);
   
       static Array<Sint8>& appendInstanceParameter(
           Array<Sint8>& out,
           const char* parameterName,
           const CIMConstInstance& instance);
  
     static Array<Sint8>& appendQualifierDeclarationParameter(     static Array<Sint8>& appendQualifierDeclarationParameter(
         Array<Sint8>& out,         Array<Sint8>& out,
         const char* parameterName,         const char* parameterName,
         const ConstQualifierDecl& qualifierDecl);          const CIMConstQualifierDecl& qualifierDecl);
  
     static Array<Sint8>& appendClassNameElement(     static Array<Sint8>& appendClassNameElement(
         Array<Sint8>& out,         Array<Sint8>& out,
         const String& className);         const String& className);
  
       static Array<Sint8>& appendInstanceNameElement(
           Array<Sint8>& out,
           const CIMReference& instanceName);
   
       static Array<Sint8>& appendPropertyNameParameter(
           Array<Sint8>& out,
           const String& propertyName);
   
       static Array<Sint8>& appendObjectNameParameter(
           Array<Sint8>& out,
           const char* name,
           const CIMReference& objectName);
   
     static void indentedPrint(     static void indentedPrint(
         std::ostream& os,          PEGASUS_STD(ostream)& os,
         const char* text,         const char* text,
         Uint32 indentChars = 2);         Uint32 indentChars = 2);
  
Line 176 
Line 190 
         const char* host,         const char* host,
         const String& nameSpace,         const String& nameSpace,
         const char* iMethodName,         const char* iMethodName,
           const String& messageId,
         const Array<Sint8>& body);         const Array<Sint8>& body);
  
     static Array<Sint8> formatSimpleRspMessage(     static Array<Sint8> formatSimpleRspMessage(
         const char* iMethodName,         const char* iMethodName,
           const String& messageId,
           const Array<Sint8>& body);
   
       static String getNextMessageId();
   
       static Array<Sint8> formatSimpleIndicationReqMessage(
           const char* host,
           const char* iMethodName,
           const String& messageId,
           const Array<Sint8>& body);
   
       static Array<Sint8> formatEMethodCallElement(
           const char* name,
           const Array<Sint8>& iParamValues);
   
       static Array<Sint8> formatMPostIndicationHeader(
           const char* host,
           const char* cimOperation,
           const char* cimMethod,
           const Array<Sint8>& content);
   
       static Array<Sint8> formatSimpleExportReqElement(
           const Array<Sint8>& body);
   
       static Array<Sint8> formatSimpleExportRspElement(
           const Array<Sint8>& body);
   
       static Array<Sint8> formatSimpleIndicationRspMessage(
           const char* iMethodName,
           const String& messageId,
         const Array<Sint8>& body);         const Array<Sint8>& body);
  
     static Uint32 getNextMessageId();      static Array<Sint8> formatEMethodResponseElement(
           const char* name,
           const Array<Sint8>& iParamValues);
   
       static Array<Sint8> formatEMethodResponseHeader(
           const Array<Sint8>& content);
  
 private: private:
  
     XmlWriter() { }     XmlWriter() { }
 }; };
  
 inline Array<Sint8>& operator<<(Array<Sint8>& out, const char* x)  PEGASUS_COMMON_LINKAGE Array<Sint8>& operator<<(
 {      Array<Sint8>& out,
     XmlWriter::append(out, x);      const char* x);
     return out;  
 }  
  
 inline Array<Sint8>& operator<<(Array<Sint8>& out, char x)  PEGASUS_COMMON_LINKAGE Array<Sint8>& operator<<(Array<Sint8>& out, char x);
 {  
     XmlWriter::append(out, x);  
     return out;  
 }  
  
 inline Array<Sint8>& operator<<(Array<Sint8>& out, Char16 x)  PEGASUS_COMMON_LINKAGE Array<Sint8>& operator<<(Array<Sint8>& out, Char16 x);
 {  
     XmlWriter::append(out, x);  
     return out;  
 }  
  
 inline Array<Sint8>& operator<<(Array<Sint8>& out, const String& x)  PEGASUS_COMMON_LINKAGE Array<Sint8>& operator<<(
 {      Array<Sint8>& out,
     XmlWriter::append(out, x);      const String& x);
     return out;  
 }  
  
 inline Array<Sint8>& operator<<(Array<Sint8>& out, const Indentor& x)  PEGASUS_COMMON_LINKAGE Array<Sint8>& operator<<(
 {      Array<Sint8>& out,
     XmlWriter::append(out, x);      const Indentor& x);
     return out;  
 }  
  
 inline Array<Sint8>& operator<<(Array<Sint8>& out, const Array<Sint8>& x)  PEGASUS_COMMON_LINKAGE Array<Sint8>& operator<<(
 {      Array<Sint8>& out,
     out.appendArray(x);      const Array<Sint8>& x);
     return out;  
 }  
  
 inline Array<Sint8>& operator<<(Array<Sint8>& out, Uint32 x)  PEGASUS_COMMON_LINKAGE Array<Sint8>& operator<<(
 {      Array<Sint8>& out,
     XmlWriter::append(out, x);      Uint32 x);
     return out;  
 }  
  
 PEGASUS_NAMESPACE_END PEGASUS_NAMESPACE_END
  


Legend:
Removed from v.1.2  
changed lines
  Added in v.1.21.2.3

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2