Rule.cpp

Go to the documentation of this file.
00001 /*
00002 This file is part of hugin.
00003 
00004 hugin is free software: you can redistribute it and/or modify
00005 it under the terms of the GNU General Public License as published by
00006 the Free Software Foundation, either version 2 of the License, or
00007 (at your option) any later version.
00008 
00009 hugin is distributed in the hope that it will be useful,
00010 but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012 GNU General Public License for more details.
00013 
00014 You should have received a copy of the GNU General Public License
00015 along with hugin.  If not, see <http://www.gnu.org/licenses/>.
00016 */
00017 
00025 #include "Rule.h"
00026 
00027 namespace makefile
00028 {
00029 string Rule::toString()
00030 {
00031         string str(cstr("\n"));
00032         std::vector<string>::iterator i;
00033         for(i = targets.begin(); i != targets.end(); i++)
00034         {
00035                 str.append(*i + cstr(" "));
00036         }
00037         str.append(cstr(": "));
00038 
00039         for(i = prerequisites.begin(); i != prerequisites.end(); i++)
00040         {
00041                 str.append(*i + cstr(" "));
00042         }
00043         str.append(cstr("\n"));
00044 
00045         for(i = commands.begin(); i != commands.end(); i++)
00046         {
00047                 str.append(cstr("\t") +*i + cstr("\n"));
00048         }
00049 
00050         return str;
00051 }
00052 
00053 }

Generated on Wed Jul 30 01:25:44 2014 for Hugintrunk by  doxygen 1.3.9.1