Statement.cc 2.18 KB
Newer Older
sebastien's avatar
sebastien committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/*
 * Copyright (C) 2006-2008 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/>.
 */

sebastien's avatar
sebastien committed
20
21
#include "Statement.hh"

sebastien's avatar
sebastien committed
22
ModFileStructure::ModFileStructure() :
23
  check_present(false),
sebastien's avatar
sebastien committed
24
  simul_present(false),
sebastien's avatar
sebastien committed
25
26
  stoch_simul_or_similar_present(false),
  order_option(2)
sebastien's avatar
sebastien committed
27
28
29
{
}

sebastien's avatar
sebastien committed
30
31
32
33
Statement::~Statement()
{
}

sebastien's avatar
sebastien committed
34
35
36
37
38
void
Statement::checkPass(ModFileStructure &mod_file_struct)
{
}

sebastien's avatar
sebastien committed
39
40
41
42
43
void
Statement::computingPass()
{
}

sebastien's avatar
sebastien committed
44
45
46
47
48
49
NativeStatement::NativeStatement(const string &native_statement_arg) :
  native_statement(native_statement_arg)
{
}

void
sebastien's avatar
sebastien committed
50
NativeStatement::writeOutput(ostream &output, const string &basename) const
sebastien's avatar
sebastien committed
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
{
  output << native_statement << endl;
}

void
OptionsList::writeOutput(ostream &output) const
{
  for(num_options_type::const_iterator it = num_options.begin();
      it != num_options.end(); it++)
    output << "options_." << it->first << " = " << it->second << ";" << endl;

  for(paired_num_options_type::const_iterator it = paired_num_options.begin();
      it != paired_num_options.end(); it++)
    output << "options_." << it->first << " = [" << it->second.first << "; "
           << it->second.second << "];" << endl;

  for(string_options_type::const_iterator it = string_options.begin();
      it != string_options.end(); it++)
    output << "options_." << it->first << " = '" << it->second << "';" << endl;
70
71
72
73

  for(string_list_options_type::const_iterator it = string_list_options.begin();
      it != string_list_options.end(); it++)
    it->second->writeOutput("options_."+it->first,output);
sebastien's avatar
sebastien committed
74
75
76
77
78
79
80
81
82
}

void
OptionsList::clear()
{
  num_options.clear();
  paired_num_options.clear();
  string_options.clear();
}