Optika GUI Toolik Version of the Day
example/BasicXMLExample/main.cpp File Reference
#include "Optika_GUI.hpp"
#include "Teuchos_XMLParameterListHelpers.hpp"
#include "Teuchos_VerboseObject.hpp"
Include dependency graph for example/BasicXMLExample/main.cpp:

Go to the source code of this file.


int main (int argc, char *argv[])

Function Documentation

int main ( int  argc,
char *  argv[] 

The end result of this example is exactly the same thing as we created in the BasicExample. The difference is this time, instead of building our GUI in source code, we're going to build it via XML. This approach has a number of advantages. 1. It's a lot cleaner. The source code approach can get pretty ugly especially when we get into some of the more complicated examples. 2. Going along with the same vein of thought above, cleaner code is code that's easier to maintain. 3. There's no need to recompile your GUI every time you change something. Since everything is loaded dynamically from the XML, there's no source code to recompile.

The first thing we've gotta do is read in the ParameterList from the XML so we can pass it to Optika. It's pretty easy to do.

Then we just call getInput! There's a little more to it, so let's head on over to the inputs.xml file to see what's going on there.

Definition at line 43 of file example/BasicXMLExample/main.cpp.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Defines