1 // $Id: Cxx.hh,v 1.24 2001/10/11 14:07:23 christof Exp $ 2 /* glade--: C++ frontend for glade (Gtk+ User Interface Builder) 3 * Copyright (C) 1998 Christof Petig 4 * Copyright (C) 1999-2000 Adolf Petig GmbH & Co. KG, written by Christof Petig 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or 9 * (at your option) any later version. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 */ 20 21 #include <config.h> 22 #include <Tag.hh> 23 #include <MakeFile.hh> 24 #include <ShellFile.hh> 25 #include <Naming.hh> 26 #include "Cxx_Fileset.hh" 27 28 class Cxx : Naming 29 { CxxFile main; 30 MakeFile makefile_am,configure_in,makefile; 31 ShellFile autogen,potfiles; 32 CxxFile acconfig; 33 34 Tag *top; 35 Cxx_Fileset *current_set; 36 37 friend void Cxx_Fileset::WriteFiles(bool); 38 private: 39 // changes Tag tree 40 void ApplyPreferences(Tag &t,int level=0); 41 void WriteTags(Tag &t); 42 43 void CreateSupportFiles(); 44 void CreateSupportFiles_1_2(CxxFile &support_h,CxxFile &support_c); 45 46 // write a first header 47 void WriteHeader(CxxFile &f,File_type tp); // main, support 48 // void WriteHeader(MakeFile &f,File_type tp); 49 void WriteHeader(SystemFile &f,File_type tp); 50 51 void WriteFooter(CxxFile &f,File_type tp); // main 52 // void WriteFooter(MakeFile &f,File_type tp); 53 void WriteFooter(SystemFile &f,File_type tp); 54 55 // void WriteCreation(CxxFile &f,File_type tp); 56 // void WriteCreation(MakeFile &f,File_type tp); 57 58 public: 59 Cxx(Tag *top); 60 void WriteTags(); 61 62 // convenience wrapper Function 63 static const std::string FileNameByType(const File_type &tp,int flags=File_NOREPLACE); 64 static void WriteCreation(SystemFile &f,File_type tp); 65 }; 66