00001 #ifndef BUILD_DEFAULTS_CLASS 00002 #define BUILD_DEFAULTS_CLASS 00003 00004 /*****************************************************************************\ 00005 * * 00006 * Name : write_build_config * 00007 * Author : Chris Koeritz * 00008 * * 00009 * Purpose: * 00010 * * 00011 * This class creates a header file that will provide macros that govern * 00012 * how the build is created under win32 using visual studio project files. * 00013 * This file is not on other platforms, nor with the clam makefile system. * 00014 * * 00015 ******************************************************************************* 00016 * Copyright (c) 1995-$now By Author. This program is free software; you can * 00017 * redistribute it and/or modify it under the terms of the GNU General Public * 00018 * License as published by the Free Software Foundation; either version 2 of * 00019 * the License or (at your option) any later version. This is online at: * 00020 * http://www.fsf.org/copyleft/gpl.html * 00021 * Please send any updates to: fred@gruntose.com * 00022 \*****************************************************************************/ 00023 00024 #include <basis/istring.h> 00025 #include <opsystem/application_shell.h> 00026 00027 // forward. 00028 class string_set; 00029 class version; 00030 00031 class write_build_config : public application_shell 00032 { 00033 public: 00034 write_build_config(); 00035 ~write_build_config(); 00036 00037 IMPLEMENT_CLASS_NAME("write_build_config"); 00038 00039 int execute(); 00041 00042 const string_set &exclusions(); 00044 00045 outcome output_macro(const istring &symbol, const istring &value, 00046 istring &accumulator); 00048 00049 outcome output_decorated_macro(const istring &symbol, const istring &value, 00050 istring &cfg_accumulator, istring &ver_accumulator); 00052 00055 outcome output_definition_macro(const istring &embedded_value, 00056 istring &accumulator); 00058 00059 bool process_version_parts(const istring &symbol, const istring &value); 00061 00063 bool check_nesting(const istring &to_check); 00065 00068 bool write_output_file(const istring &filename, const istring &contents); 00070 00071 private: 00072 istring *_end_matter; // stuff that isn't part of the real file. 00073 version *_ver; // accumulated when we see the right parts. 00074 int _nesting; // how many levels of conditionals do we see? 00075 00076 // not provided. 00077 write_build_config(const write_build_config &); 00078 write_build_config &operator =(const write_build_config &); 00079 }; 00080 00081 #endif 00082
1.5.1