Commit 9a0dddef authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Rename OutputType to FileOutputType (to distinguish it from ExprOutputType).

Also rename DynareOutput.hh to FileOutputType.hh. Include the latter in dist
tarball, and add copyright/license header.
parent d9f78ae3
/* /*
* Copyright (C) 2003-2013 Dynare Team * Copyright (C) 2003-2014 Dynare Team
* *
* This file is part of Dynare. * This file is part of Dynare.
* *
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#include "macro/MacroDriver.hh" #include "macro/MacroDriver.hh"
#include <unistd.h> #include <unistd.h>
#include "DynareOutput.hh" #include "FileOutputType.hh"
/* Prototype for second part of main function /* Prototype for second part of main function
Splitting main() in two parts was necessary because ParsingDriver.h and MacroDriver.h can't be Splitting main() in two parts was necessary because ParsingDriver.h and MacroDriver.h can't be
...@@ -37,7 +37,7 @@ ...@@ -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, 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 &parallel_config_file, const string &cluster_name, bool parallel_slave_open_mode, bool parallel, const string &parallel_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__) #if defined(_WIN32) || defined(__CYGWIN32__)
, bool cygwin, bool msvc , bool cygwin, bool msvc
#endif #endif
...@@ -96,7 +96,7 @@ main(int argc, char **argv) ...@@ -96,7 +96,7 @@ main(int argc, char **argv)
bool parallel_test = false; bool parallel_test = false;
bool nostrict = false; bool nostrict = false;
map<string, string> defines; map<string, string> defines;
OutputType output_mode = none; FileOutputType output_mode = none;
bool cuda = false; bool cuda = false;
// Parse options // Parse options
......
/* /*
* Copyright (C) 2008-2013 Dynare Team * Copyright (C) 2008-2014 Dynare Team
* *
* This file is part of Dynare. * This file is part of Dynare.
* *
...@@ -22,12 +22,12 @@ ...@@ -22,12 +22,12 @@
#include "ParsingDriver.hh" #include "ParsingDriver.hh"
#include "ModFile.hh" #include "ModFile.hh"
#include "ConfigFile.hh" #include "ConfigFile.hh"
#include "DynareOutput.hh" #include "FileOutputType.hh"
void 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, 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 &parallel_config_file, const string &cluster_name, bool parallel_slave_open_mode, bool parallel, const string &parallel_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__) #if defined(_WIN32) || defined(__CYGWIN32__)
, bool cygwin, bool msvc , bool cygwin, bool msvc
#endif #endif
......
#ifndef _DYNARE_OUTPUT_HH /*
#define _DYNARE_OUTPUT_HH * 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 <http://www.gnu.org/licenses/>.
*/
enum OutputType #ifndef _FILE_OUTPUT_TYPE_HH
#define _FILE_OUTPUT_TYPE_HH
enum FileOutputType
{ {
none, // outputs files for Matlab/Octave processing none, // outputs files for Matlab/Octave processing
dynamic, // outputs <fname>_dynamic.cc and related files dynamic, // outputs <fname>_dynamic.cc and related files
......
...@@ -52,7 +52,8 @@ dynare_m_SOURCES = \ ...@@ -52,7 +52,8 @@ dynare_m_SOURCES = \
SteadyStateModel.hh \ SteadyStateModel.hh \
SteadyStateModel.cc \ SteadyStateModel.cc \
WarningConsolidation.hh \ WarningConsolidation.hh \
WarningConsolidation.cc WarningConsolidation.cc \
FileOutputType.hh
# The -I. is for <FlexLexer.h> # The -I. is for <FlexLexer.h>
dynare_m_CPPFLAGS = $(BOOST_CPPFLAGS) -I. dynare_m_CPPFLAGS = $(BOOST_CPPFLAGS) -I.
......
...@@ -447,7 +447,7 @@ ModFile::transformPass(bool nostrict) ...@@ -447,7 +447,7 @@ ModFile::transformPass(bool nostrict)
} }
void 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) // Mod file may have no equation (for example in a standalone BVAR estimation)
if (dynamic_model.equation_number() > 0) if (dynamic_model.equation_number() > 0)
...@@ -881,7 +881,7 @@ ModFile::writeModelCC(const string &basename, bool cuda) const ...@@ -881,7 +881,7 @@ ModFile::writeModelCC(const string &basename, bool cuda) const
} }
void void
ModFile::writeExternalFiles(const string &basename, OutputType output, bool cuda) const ModFile::writeExternalFiles(const string &basename, FileOutputType output, bool cuda) const
{ {
writeModelCC(basename, cuda); writeModelCC(basename, cuda);
steady_state_model.writeSteadyStateFileCC(basename, mod_file_struct.ramsey_policy_present, cuda); steady_state_model.writeSteadyStateFileCC(basename, mod_file_struct.ramsey_policy_present, cuda);
......
/* /*
* Copyright (C) 2006-2013 Dynare Team * Copyright (C) 2006-2014 Dynare Team
* *
* This file is part of Dynare. * This file is part of Dynare.
* *
...@@ -35,7 +35,7 @@ using namespace std; ...@@ -35,7 +35,7 @@ using namespace std;
#include "ExternalFunctionsTable.hh" #include "ExternalFunctionsTable.hh"
#include "ConfigFile.hh" #include "ConfigFile.hh"
#include "WarningConsolidation.hh" #include "WarningConsolidation.hh"
#include "DynareOutput.hh" #include "FileOutputType.hh"
//! The abstract representation of a "mod" file //! The abstract representation of a "mod" file
class ModFile class ModFile
...@@ -122,7 +122,7 @@ public: ...@@ -122,7 +122,7 @@ public:
void transformPass(bool nostrict); void transformPass(bool nostrict);
//! Execute computations //! Execute computations
/*! \param no_tmp_terms if true, no temporary terms will be computed in the static and dynamic files */ /*! \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 //! 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 \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: ...@@ -141,7 +141,7 @@ public:
//! Writes C output files only => No further Matlab processing //! Writes C output files only => No further Matlab processing
void writeCOutputFiles(const string &basename) const; void writeCOutputFiles(const string &basename) const;
void writeModelCC(const string &basename, bool cuda) 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 #endif // ! MOD_FILE_HH
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment