Makefile.h

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 #ifndef MAKEFILE_H_
00026 #define MAKEFILE_H_
00027 
00028 #include "char_type.h"
00029 #include <vector>
00030 #include <iostream>
00031 #include <stdexcept>
00032 #include <locale>
00033 
00034 #include <hugin_shared.h>
00035 
00039 namespace makefile
00040 {
00041 class MakefileItem;
00046 class MAKEIMPEX Makefile
00047 {
00049         std::vector<MakefileItem*> items;
00051         bool written;
00052         Makefile() : written(false) {}
00053         static Makefile* instance;
00054 public:
00055         virtual ~Makefile() {}
00056         static Makefile& getSingleton();
00057         static void clean();
00058 
00064         static const std::locale locale;
00065 
00069         enum QuoteMode {MAKE, SHELL, NONE};
00070         static string quote(const string& in, Makefile::QuoteMode mode);
00071 #ifdef WIN32
00072 
00073     static string quoteEnvironment(const string& in);
00074 #endif
00075 
00082         void add(MakefileItem* item)
00083         {
00084                 items.push_back(item);
00085         }
00086 
00099         static void remove(MakefileItem* item);
00100 
00106         int writeMakefile(ostream& out);
00107 };
00108 
00109 MAKEIMPEX const std::locale GetMakefileLocale();
00110 
00111 }
00112 
00113 #endif /* MAKEFILE_H_ */

Generated on 5 Dec 2014 for Hugintrunk by  doxygen 1.4.7