⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xml-rpc-io.cpp

📁 linux下简单对象应用协议的开发库
💻 CPP
字号:
/*XML-RPC io stream operations on XML-RPC values--------------------------------------------------------------------------------gSOAP XML Web services toolsCopyright (C) 2001-2004, Robert van Engelen, Genivia, Inc. All Rights Reserved.This software is released under one of the following two licenses:GPL or Genivia's license for commercial use.--------------------------------------------------------------------------------GPL license.This program is free software; you can redistribute it and/or modify it underthe terms of the GNU General Public License as published by the Free SoftwareFoundation; either version 2 of the License, or (at your option) any laterversion.This program is distributed in the hope that it will be useful, but WITHOUT ANYWARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR APARTICULAR PURPOSE. See the GNU General Public License for more details.You should have received a copy of the GNU General Public License along withthis program; if not, write to the Free Software Foundation, Inc., 59 TemplePlace, Suite 330, Boston, MA 02111-1307 USAAuthor contact information:engelen@genivia.com / engelen@acm.org--------------------------------------------------------------------------------A commercial use license is available from Genivia, Inc., contact@genivia.com--------------------------------------------------------------------------------*/#include "soapH.h"#include "xml-rpc-io.h"std::ostream& operator<<(std::ostream& o, const struct value& v){ switch (v.__type)  { case SOAP_TYPE__array:       o << "{array" << std::endl;      for (_array::iterator i = ((struct _array)v).begin(); i != ((struct _array)v).end(); ++i)	  o << "[" << i.index() << "]=" << *i << std::endl;      o << "}";      break;    case SOAP_TYPE__base64:       o << "{base64 " << ((struct _base64)v).size() << " bytes}";      break;    case SOAP_TYPE__boolean:       if (v.is_true())        o << "TRUE";      else	o << "FALSE";      break;    case SOAP_TYPE__dateTime_DOTiso8601:       o << (const char*)v;      break;    case SOAP_TYPE__double:       o << (double)v;      break;    case SOAP_TYPE__i4:     case SOAP_TYPE__int:       o << (int)v;      break;    case SOAP_TYPE__string:       o << (const char*)v;      break;    case SOAP_TYPE__struct:       o << "{struct" << std::endl;      for (_struct::iterator i = ((struct _struct)v).begin(); i != ((struct _struct)v).end(); ++i)        o << "[" << i.index() << "]=" << *i << std::endl;      o << "}";      break;    default:      if (v.__any)        o << v.__any;      else        o << "{?}";  }  return o;}std::istream& operator>>(std::istream& i, struct value& v){ // TODO  return i;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -