Optika GUI Toolik
Version of the Day
|
#include "Teuchos_ParameterList.hpp"
#include "Teuchos_StandardParameterEntryValidators.hpp"
#include "Teuchos_Array.hpp"
#include "Teuchos_Version.hpp"
#include "Optika_GUI.hpp"
#include "Teuchos_XMLParameterListHelpers.hpp"
#include "Teuchos_FancyOStream.hpp"
#include "Teuchos_VerboseObject.hpp"
Go to the source code of this file.
Functions | |
void | customFunction (Teuchos::RCP< const Teuchos::ParameterList > currentParams) |
int | main (int argc, char *argv[]) |
void customFunction | ( | Teuchos::RCP< const Teuchos::ParameterList > | currentParams | ) |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!! ATTENTION !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!! PLEASE VIEW THE BASIC EXAMPLE FIRST BEFORE READING THIS !!!!!!!! !!!! EXAMPLE. IT PROVIDES FUNDAMENTAL KNOWLEDGE THAT WILL BE !!!!!!!! !!!! VERY HELPFUL IN UNDERSTANDING THIS EXAMPLE !!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Don't worry about this little guy right now. We'll come back to him later. We just needed to prototype it.
The custom function must always have this signature (returning void and taking a single RCP<const ParameterList> parameter). When the user clicks action button the function will be called. The current values for the parameter list are what will be given as the argument. Here we simply read what some of the settings the user has selected and print them out. But in theory, you could do anything you want with the parameters at this point. The GUI will terminate once the user exits (by some means of closing the GUI window), and control will be returned back to what ever function called getInput() (in this case the main()).
Definition at line 157 of file example/CustomFunctionExample/main.cpp.
int main | ( | int | argc, |
char * | argv[] | ||
) |
Sometimes, you would rather have a slightly different workflow than the one Optika offers by default. This is why Optika also offers a second, tighter workflow that goes like this:
We start off like normal. I'm actually just going to repeat what we did in the BasicExample
Here is where things get switched up a bit. Along with the list, we pass along the address of the "customFunction" (the Teuchos::null is there because we don't want to specify any dependencies for this GUI). Let's skip down a bit and take a look at the function.
Definition at line 66 of file example/CustomFunctionExample/main.cpp.