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.time-shift
parent
12440a9280
commit
18e81ab22a
|
@ -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 <unistd.h>
|
||||
#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<string, string> defines;
|
||||
OutputType output_mode = none;
|
||||
FileOutputType output_mode = none;
|
||||
bool cuda = false;
|
||||
|
||||
// Parse options
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
#ifndef _DYNARE_OUTPUT_HH
|
||||
#define _DYNARE_OUTPUT_HH
|
||||
|
||||
enum OutputType
|
||||
{
|
||||
none, // outputs files for Matlab/Octave processing
|
||||
dynamic, // outputs <fname>_dynamic.cc and related files
|
||||
first, // outputs <fname>_first_derivatives and related files
|
||||
second, // outputs <fname>_first_derivatives, <fname>_second_derivatives.cc and related files
|
||||
third, // outputs <fname>_first_derivatives, <fname>_second_derivatives.cc, <fname>_third_derivatives.cc and related files
|
||||
};
|
||||
#endif
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _FILE_OUTPUT_TYPE_HH
|
||||
#define _FILE_OUTPUT_TYPE_HH
|
||||
|
||||
enum FileOutputType
|
||||
{
|
||||
none, // outputs files for Matlab/Octave processing
|
||||
dynamic, // outputs <fname>_dynamic.cc and related files
|
||||
first, // outputs <fname>_first_derivatives and related files
|
||||
second, // outputs <fname>_first_derivatives, <fname>_second_derivatives.cc and related files
|
||||
third, // outputs <fname>_first_derivatives, <fname>_second_derivatives.cc, <fname>_third_derivatives.cc and related files
|
||||
};
|
||||
#endif
|
|
@ -52,7 +52,8 @@ dynare_m_SOURCES = \
|
|||
SteadyStateModel.hh \
|
||||
SteadyStateModel.cc \
|
||||
WarningConsolidation.hh \
|
||||
WarningConsolidation.cc
|
||||
WarningConsolidation.cc \
|
||||
FileOutputType.hh
|
||||
|
||||
# The -I. is for <FlexLexer.h>
|
||||
dynare_m_CPPFLAGS = $(BOOST_CPPFLAGS) -I.
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue