ulxr_signature.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002          ulxr_signature.cpp  -  handle method signatures
00003                              -------------------
00004     begin                : Sat Mar 23 2002
00005     copyright            : (C) 2002-2007 by Ewald Arnold
00006     email                : ulxmlrpcpp@ewald-arnold.de
00007 
00008     $Id: ulxr_signature.cpp 940 2006-12-30 18:22:05Z ewald-arnold $
00009 
00010  ***************************************************************************/
00011 
00012 /**************************************************************************
00013  *
00014  * This program is free software; you can redistribute it and/or modify
00015  * it under the terms of the GNU Lesser General Public License as
00016  * published by the Free Software Foundation; either version 2 of the License,
00017  * or (at your option) any later version.
00018  *
00019  * This program is distributed in the hope that it will be useful,
00020  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00021  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00022  * GNU General Public License for more details.
00023  *
00024  * You should have received a copy of the GNU Lesser General Public License
00025  * along with this program; if not, write to the Free Software
00026  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00027  *
00028  ***************************************************************************/
00029 
00030 
00031 #define ULXR_NEED_EXPORTS
00032 #include <ulxmlrpcpp/ulxmlrpcpp.h>  // always first header
00033 
00034 #include <ulxmlrpcpp/ulxr_signature.h>
00035 #include <ulxmlrpcpp/ulxr_value.h>
00036 
00037 namespace ulxr {
00038 
00039 
00040 ULXR_API_IMPL0 Signature::Signature()
00041 {
00042 }
00043 
00044 
00045 ULXR_API_IMPL0 Signature::Signature(const Void & /* v */)
00046 {
00047 }
00048 
00049 
00050 ULXR_API_IMPL0 Signature::Signature(const CppString &s)
00051 {
00052   sig = s;
00053 }
00054 
00055 
00056 ULXR_API_IMPL0 Signature::Signature(const ValueBase &v)
00057 {
00058   sig = v.getSignature();
00059 }
00060 
00061 
00062 ULXR_API_IMPL(Signature) & Signature::addParam(const Value &v)
00063 {
00064   if (sig.length() != 0)
00065     sig += ULXR_PCHAR(",");
00066   sig += v.getSignature();
00067   return *this;
00068 }
00069 
00070 
00071 ULXR_API_IMPL(Signature) & Signature::addParam(const CppString &s)
00072 {
00073   if (sig.length() != 0)
00074     sig += ULXR_PCHAR(",");
00075   sig += s;
00076   return *this;
00077 }
00078 
00079 
00080 ULXR_API_IMPL(CppString) Signature::getString() const
00081 {
00082   return sig;
00083 }
00084 
00085 
00086 ULXR_API_IMPL(Signature) & Signature::operator<<(const Value &v)
00087 {
00088   addParam(v);
00089   return *this;
00090 }
00091 
00092 
00093 ULXR_API_IMPL(Signature) & Signature::operator<<(const CppString &s)
00094 {
00095   addParam(s);
00096   return *this;
00097 }
00098 
00099 }  // namespace ulxr

Generated on Sun Aug 19 20:08:57 2007 for ulxmlrpcpp by  doxygen 1.5.1