From b5042500c8bd32039c62ea31f229af90d191010f Mon Sep 17 00:00:00 2001 From: Houtan Bastani Date: Tue, 14 Apr 2015 14:47:26 +0200 Subject: [PATCH] preprocessor: method out of order --- ComputingTasks.cc | 54 +++++++++++++++++++++++------------------------ 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/ComputingTasks.cc b/ComputingTasks.cc index 88969472..76ed6faa 100644 --- a/ComputingTasks.cc +++ b/ComputingTasks.cc @@ -2818,6 +2818,33 @@ CorrOptionsStatement::writeOutput(ostream &output, const string &basename) const writeOptionsOutput(output, lhs_field, name1); } +void +CorrOptionsStatement::writeCOutput(ostream &output, const string &basename) +{ + output << endl + << "index = "; + if (is_structural_innovation(symbol_table.getType(name))) + output << "exo_names"; + else + output << "endo_names"; + output << "[\""<< name << "\"];" << endl; + + output << "index1 = "; + if (is_structural_innovation(symbol_table.getType(name1))) + output << "exo_names"; + else + output << "endo_names"; + output << "[\""<< name1 << "\"];" << endl; + + writeCOutputHelper(output, "init"); + + if (is_structural_innovation(symbol_table.getType(name))) + output << "msdsgeinfo->addStructuralInnovationCorrOption(new ModFileStructuralInnovationCorrOption("; + else + output << "msdsgeinfo->addMeasurementErrorCorrOption(new ModFileMeasurementErrorCorrOption("; + output << "index, index1, init));" << endl; +} + OptionsEqualStatement::OptionsEqualStatement(const string &to_declaration_type_arg, const string &to_name1_arg, const string &to_name2_arg, @@ -2985,33 +3012,6 @@ ModelDiagnosticsStatement::writeOutput(ostream &output, const string &basename) output << "model_diagnostics(M_,options_,oo_);" << endl; } -void -CorrOptionsStatement::writeCOutput(ostream &output, const string &basename) -{ - output << endl - << "index = "; - if (is_structural_innovation(symbol_table.getType(name))) - output << "exo_names"; - else - output << "endo_names"; - output << "[\""<< name << "\"];" << endl; - - output << "index1 = "; - if (is_structural_innovation(symbol_table.getType(name1))) - output << "exo_names"; - else - output << "endo_names"; - output << "[\""<< name1 << "\"];" << endl; - - writeCOutputHelper(output, "init"); - - if (is_structural_innovation(symbol_table.getType(name))) - output << "msdsgeinfo->addStructuralInnovationCorrOption(new ModFileStructuralInnovationCorrOption("; - else - output << "msdsgeinfo->addMeasurementErrorCorrOption(new ModFileMeasurementErrorCorrOption("; - output << "index, index1, init));" << endl; -} - Smoother2histvalStatement::Smoother2histvalStatement(const OptionsList &options_list_arg) : options_list(options_list_arg) {