(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.15 and 1.92.4.4

version 1.15, 2001/06/11 23:11:26 version 1.92.4.4, 2012/02/21 17:22:10
Line 1 
Line 1 
 //%/////////////////////////////////////////////////////////////////////////////  //%LICENSE////////////////////////////////////////////////////////////////
 // //
 // Copyright (c) 2000 The Open Group, BMC Software, Tivoli Systems, IBM  // Licensed to The Open Group (TOG) under one or more contributor license
   // agreements.  Refer to the OpenPegasusNOTICE.txt file distributed with
   // this work for additional information regarding copyright ownership.
   // Each contributor licenses this file to you under the OpenPegasus Open
   // Source License; you may not use this file except in compliance with the
   // License.
 // //
 // 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 of this software and associated documentation files (the "Software"), // copy of this software and associated documentation files (the "Software"),
Line 9 
Line 14 
 // and/or sell copies of the Software, and to permit persons to whom the // and/or sell copies of the Software, and to permit persons to whom the
 // Software is furnished to do so, subject to the following conditions: // Software is furnished to do so, subject to the following conditions:
 // //
 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR  // The above copyright notice and this permission notice shall be included
 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,  // in all copies or substantial portions of the Software.
 // 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.  
 //  
 //==============================================================================  
 // //
 // Author: Mike Brasher (mbrasher@bmc.com)  // 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.
 // //
 // Modified By:  //////////////////////////////////////////////////////////////////////////
 // //
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
 ////////////////////////////////////////////////////////////////////////////////  
 //  
 // XmlWriter.h  
 //  
 ////////////////////////////////////////////////////////////////////////////////  
   
 #ifndef Pegasus_XmlWriter_h #ifndef Pegasus_XmlWriter_h
 #define Pegasus_XmlWriter_h #define Pegasus_XmlWriter_h
  
 #include <iostream> #include <iostream>
 #include <Pegasus/Common/Config.h> #include <Pegasus/Common/Config.h>
 #include <Pegasus/Common/Exception.h>  #include <Pegasus/Common/InternalException.h>
 #include <Pegasus/Common/Array.h>  #include <Pegasus/Common/ArrayInternal.h>
 #include <Pegasus/Common/String.h> #include <Pegasus/Common/String.h>
 #include <Pegasus/Common/Indentor.h>  #include <Pegasus/Common/CIMObject.h>
 #include <Pegasus/Common/CIMReference.h>  #include <Pegasus/Common/CIMClass.h>
   #include <Pegasus/Common/CIMInstance.h>
   #include <Pegasus/Common/CIMProperty.h>
   #include <Pegasus/Common/CIMMethod.h>
   #include <Pegasus/Common/CIMParameter.h>
   #include <Pegasus/Common/CIMQualifier.h>
   #include <Pegasus/Common/CIMQualifierDecl.h>
   #include <Pegasus/Common/CIMValue.h>
   #include <Pegasus/Common/CIMObjectPath.h>
   #include <Pegasus/Common/CIMPropertyList.h>
   #include <Pegasus/Common/CIMParamValue.h>
   #include <Pegasus/Common/CommonUTF.h>
   #include <Pegasus/Common/Message.h>
   #include <Pegasus/Common/Linkage.h>
   #include <Pegasus/Common/ContentLanguageList.h>
   #include <Pegasus/Common/AcceptLanguageList.h>
   #include <Pegasus/Common/Buffer.h>
   #include <Pegasus/Common/StrLit.h>
   #include <Pegasus/Common/XmlGenerator.h>
   #include <Pegasus/Common/NumericArg.h>
  
 PEGASUS_NAMESPACE_BEGIN PEGASUS_NAMESPACE_BEGIN
  
 class CIMConstQualifierDecl;  class PEGASUS_COMMON_LINKAGE XmlWriter : public XmlGenerator
 class CIMConstClass;  
 class CIMConstInstance;  
   
 class PEGASUS_COMMON_LINKAGE XmlWriter  
 { {
 public: public:
  
     static void append(Array<Sint8>& out, Char16 x);      static void appendLocalNameSpacePathElement(
           Buffer& out,
           const CIMNamespaceName& nameSpace);
   
       static void appendNameSpacePathElement(
           Buffer& out,
           const String& host,
           const CIMNamespaceName& nameSpace);
   
       static void appendClassNameElement(
           Buffer& out,
           const CIMName& className);
   
       static void appendInstanceNameElement(
           Buffer& out,
           const CIMObjectPath& instanceName);
   
       static void appendClassPathElement(
           Buffer& out,
           const CIMObjectPath& classPath);
   
       static void appendInstancePathElement(
           Buffer& out,
           const CIMObjectPath& instancePath);
   
       static void appendLocalClassPathElement(
           Buffer& out,
           const CIMObjectPath& classPath);
   
       static void appendLocalInstancePathElement(
           Buffer& out,
           const CIMObjectPath& instancePath);
   
       static void appendLocalObjectPathElement(
           Buffer& out,
           const CIMObjectPath& objectPath);
   
       static void appendValueElement(
           Buffer& out,
           const CIMValue& value);
   
       static void printValueElement(
           const CIMValue& value,
           PEGASUS_STD(ostream)& os=PEGASUS_STD(cout));
   
       static void appendValueObjectWithPathElement(
           Buffer& out,
           const CIMObject& objectWithPath,
           Boolean includeQualifiers = true,
           Boolean includeClassOrigin = true,
           const CIMPropertyList& propertyList = CIMPropertyList());
   
       static void appendValueReferenceElement(
           Buffer& out,
           const CIMObjectPath& reference,
           Boolean putValueWrapper);
   
       static void printValueReferenceElement(
           const CIMObjectPath& reference,
           PEGASUS_STD(ostream)& os=PEGASUS_STD(cout));
   
       static void appendValueNamedInstanceElement(
           Buffer& out,
           const CIMInstance& namedInstance,
           Boolean includeQualifiers = true,
           Boolean includeClassOrigin = true,
           const CIMPropertyList& propertyList = CIMPropertyList());
   
   //EXP_PULL_BEGIN
       static void appendValueInstanceWithPathElement(
           Buffer& out,
           const CIMInstance& namedInstance,
           Boolean includeQualifiers = true,
           Boolean includeClassOrigin = true,
           const CIMPropertyList& propertyList = CIMPropertyList());
   //EXP_PULL_END
   
       static void appendClassElement(
           Buffer& out,
           const CIMConstClass& cimclass);
   
       static void printClassElement(
           const CIMConstClass& cimclass,
           PEGASUS_STD(ostream)& os=PEGASUS_STD(cout));
   
       static void appendInstanceElement(
           Buffer& out,
           const CIMConstInstance& instance,
           Boolean includeQualifiers = true,
           Boolean includeClassOrigin = true,
           const CIMPropertyList& propertyList = CIMPropertyList());
   
   
       static void printInstanceElement(
           const CIMConstInstance& instance,
           PEGASUS_STD(ostream)& os=PEGASUS_STD(cout));
   
       static void appendObjectElement(
           Buffer& out,
           const CIMConstObject& object,
           Boolean includeQualifiers = true,
           Boolean includeClassOrigin = true,
           const CIMPropertyList& propertyList = CIMPropertyList());
   
       static void appendPropertyElement(
           Buffer& out,
           const CIMConstProperty& property,
           Boolean includeQualifiers = true,
           Boolean includeClassOrigin = true);
   
       static void printPropertyElement(
           const CIMConstProperty& property,
           PEGASUS_STD(ostream)& os=PEGASUS_STD(cout));
   
       static void appendMethodElement(
           Buffer& out,
           const CIMConstMethod& method);
   
       static void printMethodElement(
           const CIMConstMethod& method,
           PEGASUS_STD(ostream)& os=PEGASUS_STD(cout));
   
       static void appendParameterElement(
           Buffer& out,
           const CIMConstParameter& parameter);
   
       static void printParameterElement(
           const CIMConstParameter& parameter,
           PEGASUS_STD(ostream)& os=PEGASUS_STD(cout));
   
       static void appendParamValueElement(
           Buffer& out,
           const CIMParamValue& paramValue);
   
       static void printParamValueElement(
           const CIMParamValue& paramValue,
           PEGASUS_STD(ostream)& os=PEGASUS_STD(cout));
   
       static void appendQualifierElement(
           Buffer& out,
           const CIMConstQualifier& qualifier);
   
       static void printQualifierElement(
           const CIMConstQualifier& qualifier,
           PEGASUS_STD(ostream)& os=PEGASUS_STD(cout));
  
     static void append(Array<Sint8>& out, char x)      static void appendQualifierDeclElement(
     {          Buffer& out,
         append(out, Char16(x));          const CIMConstQualifierDecl& qualifierDecl);
     }  
  
     static void append(Array<Sint8>& out, const char* x);      static void printQualifierDeclElement(
           const CIMConstQualifierDecl& qualifierDecl,
           PEGASUS_STD(ostream)& os=PEGASUS_STD(cout));
   
       static void appendQualifierFlavorEntity(
           Buffer& out,
           const CIMFlavor & flavor);
   
       static void appendScopeElement(
           Buffer& out,
           const CIMScope & scope);
  
     static void append(Array<Sint8>& out, const String& x);      static void appendMethodCallHeader(
           Buffer& out,
           const char* host,
           const CIMName& cimMethod,
           const String& cimObject,
           const String& authenticationHeader,
           HttpMethod httpMethod,
           const AcceptLanguageList& acceptLanguages,
           const ContentLanguageList& contentLanguages,
           Uint32 contentLength,
           bool binaryRequest = false,
           bool binaryResponse = false);
   
       static void appendMethodResponseHeader(
           Buffer& out,
           HttpMethod httpMethod,
           const ContentLanguageList& contentLanguages,
           Uint32 contentLength,
           Uint64 serverResponseTime = 0,
           bool binaryResponse = false);
   
       static void appendHttpErrorResponseHeader(
           Buffer& out,
           const String& status,
           const String& cimError = String::EMPTY,
           const String& errorDetail = String::EMPTY);
   
       static void appendUnauthorizedResponseHeader(
           Buffer& out,
           const String& content);
   
   #ifdef PEGASUS_KERBEROS_AUTHENTICATION
       static void appendOKResponseHeader(
           Buffer& out,
           const String& content);
   #endif
   
       static void appendParamTypeAndEmbeddedObjAttrib(
           Buffer& out,
           const CIMType& type);
   
       static void appendReturnValueElement(
           Buffer& out,
           const CIMValue& value);
  
     static void append(Array<Sint8>& out, Uint32 x);      static void appendBooleanIParameter(
           Buffer& out,
           const char* name,
           Boolean flag);
   //EXP_PULL_BEGIN
       static void appendBooleanParameter(
           Buffer& out,
           const char* name,
           Boolean flag);
  
     static void appendSpecial(Array<Sint8>& out, Char16 x);      static void appendBooleanIReturnValue(
           Buffer& out,
           const char* name,
           Boolean flag);
  
     static void appendSpecial(Array<Sint8>& out, char x);      static void appendUint32IParameter(
           Buffer& out,
           const char* name,
           const Uint32Arg& val,
           const Boolean required);
   /* KS_PULL DELETE
       static void appendUint64Parameter(
           Buffer& out,
           const char* name,
           const Uint64 val);
   */
       static void appendUint64ReturnValue(
           Buffer& out,
           const char* name,
           const Uint64Arg& val);
   //EXP_PULL_END
  
     static void appendSpecial(Array<Sint8>& out, const char* x);      static void appendStringIParameter(
           Buffer& out,
           const char* name,
           const String& str);
  
     static void appendSpecial(Array<Sint8>& out, const String& x);  //EXP_PULL_BEGIN
       static void appendStringIParameterIfNotEmpty(
           Buffer& out,
           const char* name,
           const String& str);
  
     static void append(Array<Sint8>& out, const Indentor& x);      static void appendStringParameter(
           Buffer& out,
           const char* name,
           const String& str);
       static void appendStringIReturnValue(
           Buffer& out,
           const char* name,
           const String& str);
   //EXP_PULL_END
       static void appendClassNameIParameter(
           Buffer& out,
           const char* name,
           const CIMName& className);
  
     static void appendLocalNameSpaceElement(      static void appendInstanceNameIParameter(
         Array<Sint8>& out,          Buffer& out,
         const String& nameSpace);          const char* name,
           const CIMObjectPath& instanceName);
  
     static void appendNameSpaceElement(      static void appendObjectNameIParameter(
         Array<Sint8>& out,          Buffer& out,
         const String& nameSpace);          const char* name,
           const CIMObjectPath& objectName);
  
     static Array<Sint8> formatGetHeader(      static void appendClassIParameter(
         const char* documentPath);          Buffer& out,
           const char* name,
           const CIMConstClass& cimClass);
  
     static Array<Sint8> formatMPostHeader(      static void appendInstanceIParameter(
         const char* host,          Buffer& out,
         const char* cimOperation,          const char* name,
         const char* cimMethod,          const CIMConstInstance& instance);
         const String& cimObject,  
         const Array<Sint8>& content);  
  
     static Array<Sint8> formatMethodResponseHeader(      static void appendNamedInstanceIParameter(
         const Array<Sint8>& content);          Buffer& out,
           const char* name,
           const CIMInstance& namedInstance) ;
  
     static Array<Sint8> formatMessageElement(      static void appendPropertyNameIParameter(
         const String& messageId,          Buffer& out,
         const Array<Sint8>& body);          const CIMName& propertyName);
  
     static Array<Sint8> formatSimpleReqElement(      static void appendPropertyValueIParameter(
         const Array<Sint8>& body);          Buffer& out,
           const char* name,
           const CIMValue& value);
  
     static Array<Sint8> formatSimpleRspElement(      static void appendPropertyListIParameter(
         const Array<Sint8>& body);          Buffer& out,
           const CIMPropertyList& propertyList);
  
     static Array<Sint8> formatIMethodCallElement(      static void appendQualifierDeclarationIParameter(
           Buffer& out,
         const char* name,         const char* name,
         const String& nameSpace,          const CIMConstQualifierDecl& qualifierDecl);
         const Array<Sint8>& iParamValues);  
  
     static Array<Sint8> formatIReturnValueElement(      static Buffer formatHttpErrorRspMessage(
         const Array<Sint8>& body);          const String& status,
           const String& cimError = String::EMPTY,
           const String& errorDetail = String::EMPTY);
  
     static Array<Sint8> formatIMethodResponseElement(      static Buffer formatSimpleMethodReqMessage(
         const char* name,          const char* host,
         const Array<Sint8>& iParamValues);          const CIMNamespaceName& nameSpace,
           const CIMObjectPath& path,
           const CIMName& methodName,
           const Array<CIMParamValue>& parameters,
           const String& messageId,
           HttpMethod httpMethod,
           const String& authenticationHeader,
           const AcceptLanguageList& httpAcceptLanguages,
           const ContentLanguageList& httpContentLanguages,
           bool binaryResponse);
  
     static Array<Sint8>& formatIParamValueElement(      static Buffer formatSimpleMethodRspMessage(
         Array<Sint8>& out,          const CIMName& methodName,
         const char* name,          const String& messageId,
         const Array<Sint8>& body);          HttpMethod httpMethod,
           const ContentLanguageList& httpContentLanguages,
           const Buffer& bodyParams,
           const Buffer& body,
           Uint64 serverResponseTime,
           Boolean isFirst = true,
           Boolean isLast = true);
  
     static Array<Sint8> formatErrorElement(      static Buffer formatSimpleMethodErrorRspMessage(
         CIMException::Code code,          const CIMName& methodName,
         const char* description);          const String& messageId,
           HttpMethod httpMethod,
           const CIMException& cimException);
  
     static Array<Sint8>& appendBooleanParameter(      static Buffer formatSimpleIMethodReqMessage(
         Array<Sint8>& out,          const char* host,
         const char* parameterName,          const CIMNamespaceName& nameSpace,
         Boolean flag);          const CIMName& iMethodName,
           const String& messageId,
           HttpMethod httpMethod,
           const String& authenticationHeader,
           const AcceptLanguageList& httpAcceptLanguages,
           const ContentLanguageList& httpContentLanguages,
           const Buffer& body,
           bool binaryResponse);
  
     static Array<Sint8>& appendClassNameParameter(      static Buffer formatSimpleIMethodRspMessage(
         Array<Sint8>& out,          const CIMName& iMethodName,
         const char* parameterName,          const String& messageId,
         const String& className);          HttpMethod httpMethod,
           const ContentLanguageList& httpContentLanguages,
     static Array<Sint8>& appendQualifierNameParameter(          const Buffer& rtnParams,
         Array<Sint8>& out,          const Buffer& body,
         const char* parameterName,          Uint64 serverResponseTime,
         const String& qualifierName);          Boolean isFirst = true,
           Boolean isLast = true);
     static Array<Sint8>& appendClassParameter(  
         Array<Sint8>& out,  
         const char* parameterName,  
         const CIMConstClass& cimClass);  
  
     static Array<Sint8>& appendInstanceNameParameter(  
         Array<Sint8>& out,  
         const char* parameterName,  
         const CIMReference& instanceName);  
   
     static Array<Sint8>& appendInstanceParameter(  
         Array<Sint8>& out,  
         const char* parameterName,  
         const CIMConstInstance& instance);  
  
     static Array<Sint8>& appendQualifierDeclarationParameter(      static Buffer formatSimpleIMethodErrorRspMessage(
         Array<Sint8>& out,          const CIMName& iMethodName,
         const char* parameterName,          const String& messageId,
         const CIMConstQualifierDecl& qualifierDecl);          HttpMethod httpMethod,
           const CIMException& cimException);
  
     static Array<Sint8>& appendClassNameElement(      static void appendInstanceEParameter(
         Array<Sint8>& out,          Buffer& out,
         const String& className);          const char* name,
           const CIMInstance& instance);
     static Array<Sint8>& appendInstanceNameElement(  
         Array<Sint8>& out,      static void appendEMethodRequestHeader(
         const CIMReference& instanceName);          Buffer& out,
           const char* requestUri,
     static Array<Sint8>& appendPropertyNameParameter(          const char* host,
         Array<Sint8>& out,          const CIMName& cimMethod,
         const String& propertyName);          HttpMethod httpMethod,
           const String& authenticationHeader,
     static void indentedPrint(          const AcceptLanguageList& acceptLanguages,
         PEGASUS_STD(ostream)& os,          const ContentLanguageList& contentLanguages,
         const char* text,          Uint32 contentLength);
         Uint32 indentChars = 2);  
       static void appendEMethodResponseHeader(
           Buffer& out,
           HttpMethod httpMethod,
           const ContentLanguageList& contentLanguages,
           Uint32 contentLength);
  
     static Array<Sint8> formatSimpleReqMessage(      static Buffer formatSimpleEMethodReqMessage(
           const char* requestUri,
         const char* host,         const char* host,
         const String& nameSpace,          const CIMName& eMethodName,
         const char* iMethodName,          const String& messageId,
         const Array<Sint8>& body);          HttpMethod httpMethod,
           const String& authenticationHeader,
           const AcceptLanguageList& httpAcceptLanguages,
           const ContentLanguageList& httpContentLanguages,
           const Buffer& body);
  
     static Array<Sint8> formatSimpleRspMessage(      static Buffer formatSimpleEMethodRspMessage(
         const char* iMethodName,          const CIMName& eMethodName,
         const String& messageId,         const String& messageId,
         const Array<Sint8>& body);          HttpMethod httpMethod,
           const ContentLanguageList& httpContentLanguages,
           const Buffer& body);
   
       static Buffer formatSimpleEMethodErrorRspMessage(
           const CIMName& eMethodName,
           const String& messageId,
           HttpMethod httpMethod,
           const CIMException& cimException);
  
     static String getNextMessageId();     static String getNextMessageId();
  
       /** Converts the given CIMKeyBinding type to one of the following:
           "boolean", "string", or "numeric"
       */
       static const StrLit keyBindingTypeToString (CIMKeyBinding::Type type);
   
 private: private:
  
     XmlWriter() { }      static void _appendMessageElementBegin(
           Buffer& out,
           const String& messageId);
           static void _appendMessageElementEnd(
           Buffer& out);
   
       static void _appendSimpleReqElementBegin(Buffer& out);
       static void _appendSimpleReqElementEnd(Buffer& out);
   
       static void _appendMethodCallElementBegin(
           Buffer& out,
           const CIMName& name);
   
       static void _appendMethodCallElementEnd(
           Buffer& out);
   
       static void _appendIMethodCallElementBegin(
           Buffer& out,
           const CIMName& name);
           static void _appendIMethodCallElementEnd(
           Buffer& out);
   
   //EXP_PULL_BEGIN
       static void _appendParamValueElementBegin(
           Buffer& out,
           const char* name);
   
       static void _appendParamValueElementEnd(
           Buffer& out);
   //EXP_PULL_END
   
       static void _appendIParamValueElementBegin(
           Buffer& out,
           const char* name);
   
       static void _appendIParamValueElementEnd(
           Buffer& out);
   
       static void _appendSimpleRspElementBegin(Buffer& out);
       static void _appendSimpleRspElementEnd(Buffer& out);
   
       static void _appendMethodResponseElementBegin(
           Buffer& out,
           const CIMName& name);
           static void _appendMethodResponseElementEnd(
           Buffer& out);
   
       static void _appendIMethodResponseElementBegin(
           Buffer& out,
           const CIMName& name);
           static void _appendIMethodResponseElementEnd(
           Buffer& out);
   
       static void _appendErrorElement(
           Buffer& out,
           const CIMException& cimException);
   
       static void _appendIReturnValueElementBegin(Buffer& out);
       static void _appendIReturnValueElementEnd(Buffer& out);
   
   //EXP_PULL_BEGIN
       static void _appendIReturnValueElementWithNameBegin(
           Buffer& out,
           const char* name);
   // EXP_PULL_END
   
       static void _appendSimpleExportReqElementBegin(Buffer& out);
       static void _appendSimpleExportReqElementEnd(Buffer& out);
   
       static void _appendEMethodCallElementBegin(
           Buffer& out,
           const CIMName& name);
   
       static void _appendEMethodCallElementEnd(
           Buffer& out);
   
       static void _appendEParamValueElementBegin(
           Buffer& out,
           const char* name);
           static void _appendEParamValueElementEnd(
           Buffer& out);
   
       static void _appendSimpleExportRspElementBegin(Buffer& out);
       static void _appendSimpleExportRspElementEnd(Buffer& out);
   
       static void _appendEMethodResponseElementBegin(
           Buffer& out,
           const CIMName& name);
   
       static void _appendEMethodResponseElementEnd(
           Buffer& out);
   
       XmlWriter();
 }; };
  
 PEGASUS_COMMON_LINKAGE Array<Sint8>& operator<<(  //==============================================================================
     Array<Sint8>& out,  //
     const char* x);  // _toString() routines:
   //
   //==============================================================================
   
   inline void _toString(Buffer& out, Boolean x)
   {
       XmlWriter::append(out, x);
   }
   
   inline void _toString(Buffer& out, Uint8 x)
   {
       XmlWriter::append(out, Uint32(x));
   }
   
   inline void _toString(Buffer& out, Sint8 x)
   {
       XmlWriter::append(out, Sint32(x));
   }
   
   inline void _toString(Buffer& out, Uint16 x)
   {
       XmlWriter::append(out, Uint32(x));
   }
   
   inline void _toString(Buffer& out, Sint16 x)
   {
       XmlWriter::append(out, Sint32(x));
   }
   
   inline void _toString(Buffer& out, Uint32 x)
   {
       XmlWriter::append(out, x);
   }
   
   inline void _toString(Buffer& out, Sint32 x)
   {
       XmlWriter::append(out, x);
   }
   
   inline void _toString(Buffer& out, Uint64 x)
   {
       XmlWriter::append(out, x);
   }
   
   inline void _toString(Buffer& out, Sint64 x)
   {
       XmlWriter::append(out, x);
   }
  
 PEGASUS_COMMON_LINKAGE Array<Sint8>& operator<<(Array<Sint8>& out, char x);  inline void _toString(Buffer& out, Real32 x)
   {
       XmlWriter::append(out, Real64(x));
   }
  
 PEGASUS_COMMON_LINKAGE Array<Sint8>& operator<<(Array<Sint8>& out, Char16 x);  inline void _toString(Buffer& out, Real64 x)
   {
       XmlWriter::append(out, x);
   }
  
 PEGASUS_COMMON_LINKAGE Array<Sint8>& operator<<(  inline void _toString(Buffer& out, Char16 x)
     Array<Sint8>& out,  {
     const String& x);      // We need to convert the Char16 to UTF8 then append the UTF8
       // character into the array.
       // NOTE: The UTF8 character could be several bytes long.
       // WARNING: This function will put in replacement character for
       // all characters that have surogate pairs.
   
       char str[6];
       memset(str,0x00,sizeof(str));
       char* charIN = (char *)&x;
   
       const Uint16 *strsrc = (Uint16 *)charIN;
       Uint16 *endsrc = (Uint16 *)&charIN[1];
  
 PEGASUS_COMMON_LINKAGE Array<Sint8>& operator<<(      Uint8 *strtgt = (Uint8 *)str;
     Array<Sint8>& out,      Uint8 *endtgt = (Uint8 *)&str[5];
     const Indentor& x);  
  
 PEGASUS_COMMON_LINKAGE Array<Sint8>& operator<<(      UTF16toUTF8(&strsrc, endsrc, &strtgt, endtgt);
     Array<Sint8>& out,      out.append(str, UTF_8_COUNT_TRAIL_BYTES(str[0]) +1);
     const Array<Sint8>& x);  }
  
 PEGASUS_COMMON_LINKAGE Array<Sint8>& operator<<(  inline void _toString(Buffer& out, const String& x)
     Array<Sint8>& out,  {
     Uint32 x);      out << x;
   }
   
   inline void _toString(Buffer& out, const CIMDateTime& x)
   {
       out << x.toString();
   }
   
   inline void _toString(Buffer& out, const CIMObjectPath& x)
   {
       out << x.toString();
   }
   
   inline void _toString(Buffer& out, const CIMObject& x)
   {
       out << x.toString();
   }
   inline void _toString(Buffer& out, const CIMInstance& x)
   {
       out << CIMObject(x).toString();
   }
   
   template<class T>
   void _toString(Buffer& out, const T* p, Uint32 size)
   {
       while (size--)
       {
           _toString(out, *p++);
           out.append(' ');
       }
   }
  
 PEGASUS_NAMESPACE_END PEGASUS_NAMESPACE_END
  


Legend:
Removed from v.1.15  
changed lines
  Added in v.1.92.4.4

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2