Conditional.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 "Conditional.h"
00026 
00027 namespace makefile
00028 {
00029 
00030 string Conditional::toString()
00031 {
00032         string str = printif();
00033         std::vector<MakefileItem*>::iterator i;
00034         for(i = ifblock.begin(); i != ifblock.end(); i++)
00035                 str.append((*i)->toString());
00036         str.append(cstr("\n"));
00037 
00038         // only if else block has contents.
00039         if(!elseblock.empty())
00040         {
00041                 str.append(cstr("else\n"));
00042                 for(i = elseblock.begin(); i != elseblock.end(); i++)
00043                         str.append((*i)->toString());
00044                 str.append(cstr("\n"));
00045         }
00046         str.append(cstr("endif\n"));
00047         return str;
00048 }
00049 
00050 }

Generated on 1 Nov 2014 for Hugintrunk by  doxygen 1.4.7