mirror of
https://github.com/nasa/trick.git
synced 2024-12-18 20:57:55 +00:00
parent
049485eeae
commit
0394867dfd
@ -17,6 +17,8 @@
|
||||
#ifdef SWIG
|
||||
// This instructs SWIG to use dynamic_cast and return one of the derived type for the get_variable function.
|
||||
%factory(Trick::MonteVar * Trick::MonteCarlo::get_variable, Trick::MonteVarCalculated, Trick::MonteVarFile, Trick::MonteVarFixed, Trick::MonteVarRandom) ;
|
||||
// This, paired with get_variables, allows access to the variables from the input file.
|
||||
%template(MonteVarVector) std::vector<Trick::MonteVar*>;
|
||||
#endif
|
||||
|
||||
namespace Trick {
|
||||
@ -625,6 +627,13 @@ namespace Trick {
|
||||
*/
|
||||
Trick::MonteVar * get_variable(std::string variable_name);
|
||||
|
||||
/**
|
||||
* Gets the list of added variables.
|
||||
*
|
||||
* @return the current list of variables
|
||||
*/
|
||||
const std::vector<Trick::MonteVar*>& get_variables();
|
||||
|
||||
/**
|
||||
* Adds a new slave with the specified machine name.
|
||||
*
|
||||
|
@ -178,6 +178,10 @@ Trick::MonteVar * Trick::MonteCarlo::get_variable(std::string variable_name) {
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
const std::vector<Trick::MonteVar*>& Trick::MonteCarlo::get_variables() {
|
||||
return variables;
|
||||
}
|
||||
|
||||
void Trick::MonteCarlo::add_slave(std::string in_machine_name) {
|
||||
add_slave(new MonteSlave(in_machine_name));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user