1 /*************************************************************************** 2 GenClientMethod.h - generate class with client methods 3 ------------------- 4 begin : Thu Juk 19 2007 5 copyright : (C) 2002-2007 by Ewald Arnold 6 email : ulxmlrpcpp@ewald-arnold.de 7 8 $Id: GenClientFunction.h 1164 2010-01-06 10:03:51Z ewald-arnold $ 9 10 ***************************************************************************/ 11 12 /************************************************************************** 13 * 14 * This program is free software; you can redistribute it and/or modify 15 * it under the terms of the GNU Lesser General Public License as 16 * published by the Free Software Foundation; either version 2 of the License, 17 * or (at your option) any later version. 18 * 19 * This program is distributed in the hope that it will be useful, 20 * but WITHOUT ANY WARRANTY; without even the implied warranty of 21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 * GNU General Public License for more details. 23 * 24 * You should have received a copy of the GNU Lesser General Public License 25 * along with this program; if not, write to the Free Software 26 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 27 * 28 ***************************************************************************/ 29 30 #ifndef GENCLIENTFUNCTION_H 31 #define GENCLIENTFUNCTION_H 32 33 #include <string> 34 35 #include "GenerateMethod.h" 36 37 class GenerateClientFunctions : public GenerateMethod 38 { 39 public: 40 41 GenerateClientFunctions(const std::vector<Method> &methods); 42 43 void generate(const std::string &destdir, const std::string &name); 44 45 private: 46 47 void generate_H(const std::string &destdir, const std::string &name); 48 49 void generate_CPP(const std::string &destdir, const std::string &name); 50 51 void generate_CPP_USER(const std::string &destdir, const std::string &name); 52 53 void generateHeaderMethods(std::ostream & h_file, 54 const std::string &name); 55 56 void generateSourceMethods(const std::string &destdir, 57 std::ostream & cpp_file, 58 const std::string &name); 59 60 private: 61 62 std::vector<Method> theMethods; 63 }; 64 65 66 #endif // GENCLIENTFUNCTION_H 67 68