diff --git a/preprocessor/DynareMain.cc b/preprocessor/DynareMain.cc index 633f5f97b..1f99d8746 100644 --- a/preprocessor/DynareMain.cc +++ b/preprocessor/DynareMain.cc @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2013 Dynare Team + * Copyright (C) 2003-2014 Dynare Team * * This file is part of Dynare. * @@ -29,7 +29,7 @@ #include "macro/MacroDriver.hh" #include -#include "DynareOutput.hh" +#include "FileOutputType.hh" /* Prototype for second part of main function Splitting main() in two parts was necessary because ParsingDriver.h and MacroDriver.h can't be @@ -37,7 +37,7 @@ */ void main2(stringstream &in, string &basename, bool debug, bool clear_all, bool no_tmp_terms, bool no_log, bool no_warn, bool warn_uninit, bool console, bool nograph, bool nointeractive, bool parallel, const string ¶llel_config_file, const string &cluster_name, bool parallel_slave_open_mode, - bool parallel_test, bool nostrict, OutputType output_mode, bool cuda + bool parallel_test, bool nostrict, FileOutputType output_mode, bool cuda #if defined(_WIN32) || defined(__CYGWIN32__) , bool cygwin, bool msvc #endif @@ -96,7 +96,7 @@ main(int argc, char **argv) bool parallel_test = false; bool nostrict = false; map defines; - OutputType output_mode = none; + FileOutputType output_mode = none; bool cuda = false; // Parse options diff --git a/preprocessor/DynareMain2.cc b/preprocessor/DynareMain2.cc index 44416b32c..208f1e401 100644 --- a/preprocessor/DynareMain2.cc +++ b/preprocessor/DynareMain2.cc @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 Dynare Team + * Copyright (C) 2008-2014 Dynare Team * * This file is part of Dynare. * @@ -22,12 +22,12 @@ #include "ParsingDriver.hh" #include "ModFile.hh" #include "ConfigFile.hh" -#include "DynareOutput.hh" +#include "FileOutputType.hh" void main2(stringstream &in, string &basename, bool debug, bool clear_all, bool no_tmp_terms, bool no_log, bool no_warn, bool warn_uninit, bool console, bool nograph, bool nointeractive, bool parallel, const string ¶llel_config_file, const string &cluster_name, bool parallel_slave_open_mode, - bool parallel_test, bool nostrict, OutputType output_mode, bool cuda + bool parallel_test, bool nostrict, FileOutputType output_mode, bool cuda #if defined(_WIN32) || defined(__CYGWIN32__) , bool cygwin, bool msvc #endif diff --git a/preprocessor/DynareOutput.hh b/preprocessor/DynareOutput.hh deleted file mode 100644 index 4e884f6b5..000000000 --- a/preprocessor/DynareOutput.hh +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef _DYNARE_OUTPUT_HH -#define _DYNARE_OUTPUT_HH - -enum OutputType - { - none, // outputs files for Matlab/Octave processing - dynamic, // outputs _dynamic.cc and related files - first, // outputs _first_derivatives and related files - second, // outputs _first_derivatives, _second_derivatives.cc and related files - third, // outputs _first_derivatives, _second_derivatives.cc, _third_derivatives.cc and related files - }; -#endif diff --git a/preprocessor/FileOutputType.hh b/preprocessor/FileOutputType.hh new file mode 100644 index 000000000..8f4e681f3 --- /dev/null +++ b/preprocessor/FileOutputType.hh @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2014 Dynare Team + * + * This file is part of Dynare. + * + * Dynare is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Dynare is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Dynare. If not, see . + */ + +#ifndef _FILE_OUTPUT_TYPE_HH +#define _FILE_OUTPUT_TYPE_HH + +enum FileOutputType + { + none, // outputs files for Matlab/Octave processing + dynamic, // outputs _dynamic.cc and related files + first, // outputs _first_derivatives and related files + second, // outputs _first_derivatives, _second_derivatives.cc and related files + third, // outputs _first_derivatives, _second_derivatives.cc, _third_derivatives.cc and related files + }; +#endif diff --git a/preprocessor/Makefile.am b/preprocessor/Makefile.am index a9cecac8f..91112aefe 100644 --- a/preprocessor/Makefile.am +++ b/preprocessor/Makefile.am @@ -52,7 +52,8 @@ dynare_m_SOURCES = \ SteadyStateModel.hh \ SteadyStateModel.cc \ WarningConsolidation.hh \ - WarningConsolidation.cc + WarningConsolidation.cc \ + FileOutputType.hh # The -I. is for dynare_m_CPPFLAGS = $(BOOST_CPPFLAGS) -I. diff --git a/preprocessor/ModFile.cc b/preprocessor/ModFile.cc index 51b855329..ff352c620 100644 --- a/preprocessor/ModFile.cc +++ b/preprocessor/ModFile.cc @@ -447,7 +447,7 @@ ModFile::transformPass(bool nostrict) } void -ModFile::computingPass(bool no_tmp_terms, OutputType output) +ModFile::computingPass(bool no_tmp_terms, FileOutputType output) { // Mod file may have no equation (for example in a standalone BVAR estimation) if (dynamic_model.equation_number() > 0) @@ -881,7 +881,7 @@ ModFile::writeModelCC(const string &basename, bool cuda) const } void -ModFile::writeExternalFiles(const string &basename, OutputType output, bool cuda) const +ModFile::writeExternalFiles(const string &basename, FileOutputType output, bool cuda) const { writeModelCC(basename, cuda); steady_state_model.writeSteadyStateFileCC(basename, mod_file_struct.ramsey_policy_present, cuda); diff --git a/preprocessor/ModFile.hh b/preprocessor/ModFile.hh index 6616ae26c..387fda178 100644 --- a/preprocessor/ModFile.hh +++ b/preprocessor/ModFile.hh @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006-2013 Dynare Team + * Copyright (C) 2006-2014 Dynare Team * * This file is part of Dynare. * @@ -35,7 +35,7 @@ using namespace std; #include "ExternalFunctionsTable.hh" #include "ConfigFile.hh" #include "WarningConsolidation.hh" -#include "DynareOutput.hh" +#include "FileOutputType.hh" //! The abstract representation of a "mod" file class ModFile @@ -122,7 +122,7 @@ public: void transformPass(bool nostrict); //! Execute computations /*! \param no_tmp_terms if true, no temporary terms will be computed in the static and dynamic files */ - void computingPass(bool no_tmp_terms, OutputType output); + void computingPass(bool no_tmp_terms, FileOutputType output); //! Writes Matlab/Octave output files /*! \param basename The base name used for writing output files. Should be the name of the mod file without its extension @@ -141,7 +141,7 @@ public: //! Writes C output files only => No further Matlab processing void writeCOutputFiles(const string &basename) const; void writeModelCC(const string &basename, bool cuda) const; - void writeExternalFiles(const string &basename, OutputType output, bool cuda) const; + void writeExternalFiles(const string &basename, FileOutputType output, bool cuda) const; }; #endif // ! MOD_FILE_HH