Comment.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 "Comment.h"
00026 
00027 namespace makefile
00028 {
00029 
00030 static const string prefix(cstr("\n# "));
00031 
00033 
00034 string Comment::toString()
00035 {
00036         static const regex newline(cstr("\\R"));
00037         return string(prefix + boost::regex_replace(text, newline, prefix) + cstr('\n'));
00038 }
00039 }

Generated on 5 Dec 2014 for Hugintrunk by  doxygen 1.4.7