v4 preprocessor: added provision for local options; used by dynare_sensitivity.m
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1784 ac1d8469-bf42-47a9-8791-bf33cf982152issue#70
parent
9059f5946e
commit
f63c2c091b
|
@ -256,8 +256,8 @@ DynareSensitivityStatement::DynareSensitivityStatement(const OptionsList &option
|
||||||
void
|
void
|
||||||
DynareSensitivityStatement::writeOutput(ostream &output, const string &basename) const
|
DynareSensitivityStatement::writeOutput(ostream &output, const string &basename) const
|
||||||
{
|
{
|
||||||
options_list.writeOutput(output);
|
options_list.writeOutput(output,"options_gsa");
|
||||||
output << "dynare_sensitivity;" << endl;
|
output << "dynare_sensitivity(options_gsa);" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
RplotStatement::RplotStatement(const TmpSymbolTable &tmp_symbol_table_arg,
|
RplotStatement::RplotStatement(const TmpSymbolTable &tmp_symbol_table_arg,
|
||||||
|
|
23
Statement.cc
23
Statement.cc
|
@ -73,6 +73,29 @@ OptionsList::writeOutput(ostream &output) const
|
||||||
it->second->writeOutput("options_."+it->first,output);
|
it->second->writeOutput("options_."+it->first,output);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
OptionsList::writeOutput(ostream &output, const string &option_group) const
|
||||||
|
{
|
||||||
|
output << option_group << " = struct();" << endl;
|
||||||
|
|
||||||
|
for(num_options_type::const_iterator it = num_options.begin();
|
||||||
|
it != num_options.end(); it++)
|
||||||
|
output << option_group << "." << it->first << " = " << it->second << ";" << endl;
|
||||||
|
|
||||||
|
for(paired_num_options_type::const_iterator it = paired_num_options.begin();
|
||||||
|
it != paired_num_options.end(); it++)
|
||||||
|
output << option_group << "." << 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 << option_group << "." << it->first << " = '" << it->second << "';" << endl;
|
||||||
|
|
||||||
|
for(string_list_options_type::const_iterator it = string_list_options.begin();
|
||||||
|
it != string_list_options.end(); it++)
|
||||||
|
it->second->writeOutput(option_group+"."+it->first,output);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
OptionsList::clear()
|
OptionsList::clear()
|
||||||
{
|
{
|
||||||
|
|
|
@ -78,6 +78,7 @@ public:
|
||||||
string_options_type string_options;
|
string_options_type string_options;
|
||||||
string_list_options_type string_list_options;
|
string_list_options_type string_list_options;
|
||||||
void writeOutput(ostream &output) const;
|
void writeOutput(ostream &output) const;
|
||||||
|
void writeOutput(ostream &output, const string &option_group) const;
|
||||||
void clear();
|
void clear();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue