|
AAO DRAMA/DRAMA2 C++ Interface
DRAMA C++11 and later interface
|
| void drama::CreateRunDramaTask | ( | ParamTypes... | taskPars | ) |
Create and run a DRAMA task, with standard exception handling.
A convenience function wrapping up task creation and exception handling for many common cases.
This function will create a DRAMA task with the specified constructor arguments and run that task. If exceptions are thrown they are caught and appropriate messages output.
For a drama::Exception or std::exception based exception, exit() will be invoked with an appropriate non-zero return value. For other exceptions, the exception will be re-thrown to ensure a core-dump happens.
This function will only return if the task completes without error.
This template function is a Variadic template - a template which accepts a variable number of parameters. This allows us to take as the TaskClass object a sub-class of drama::Task with any number of parameters.
| TaskClass | The class of the DRAMA task we are to create. |
| ParamTypes | The types of the parameters to be passed to the task constructor. |
| taskPars | The parameters to be passed to the task constructor. |
References CreateRunDramaTask().