Add C functions for setting MC slave output dir

Refs #763
This commit is contained in:
Derek Bankieris 2019-05-06 12:02:06 -05:00
parent 7d7b461b38
commit 4368d412b2
2 changed files with 12 additions and 0 deletions

View File

@ -101,6 +101,12 @@ void mc_set_user_cmd_string(const char *user_cmd_string);
*/
void mc_set_slave_sim_options(const char *slave_sim_options);
/**
* @relates Trick::MonteCarlo
* set #Trick::MonteCarlo::slave_output_directory
*/
void mc_set_slave_output_directory(const char *slave_output_directory);
/**
* @relates Trick::MonteCarlo
* get #Trick::MonteCarlo::slave_sim_options

View File

@ -110,6 +110,12 @@ extern "C" void mc_set_slave_sim_options(const char *slave_sim_options) {
}
}
extern "C" void mc_set_slave_output_directory(const char *slave_output_directory) {
if ( the_mc != NULL ) {
the_mc->slave_output_directory = std::string(slave_output_directory ? slave_output_directory : "");
}
}
extern "C" const char *mc_get_slave_sim_options(void) {
if ( the_mc != NULL ) {
return the_mc->slave_sim_options.c_str();