1 /* 2 * This file is part of the Code::Blocks IDE and licensed under the GNU Lesser General Public License, version 3 3 * http://www.gnu.org/licenses/lgpl-3.0.html 4 */ 5 6 #ifndef IMPORTERS_GLOBALS_H 7 #define IMPORTERS_GLOBALS_H 8 9 #include "settings.h" 10 11 /** 12 * This namespace holds some global flags for project/workspace importers 13 * to inter-communicate.\n 14 * Basically, workspace importers set/unset these flags so that project 15 * importers know how to behave. 16 * 17 * To explain this a bit further, imagine a MS Visual Studio solution (workspace) 18 * file containing 50 projects (yes, I have in mind one!). 19 * Without this class, for each project being imported, the user would be asked 20 * which compiler to use (one dialog) and which targets to import (another dialog). 21 * Imagine the user's frustration having to answer to 100 dialogs (50 x 2)! 22 * 23 * Using these flags, the workspace importer can notify the project importer 24 * what to do, without asking the user each and every import. 25 * 26 * After the workspace importer is done, it should call the ResetDefaults() function 27 * to revert everything to defaults. 28 */ 29 namespace ImportersGlobals 30 { 31 // reset all flags to defaults 32 extern DLLIMPORT void ResetDefaults(); 33 // ask which compiler to use for the imported project? 34 extern DLLIMPORT bool UseDefaultCompiler; 35 // ask which targets to import? 36 extern DLLIMPORT bool ImportAllTargets; 37 } 38 39 #endif // IMPORTERS_GLOBALS_H 40