omni::application::run
NAME

omni::application::run

A static function of omni::application

#include <omni/application.hpp>
int omni::application::run()

OVERLOADS

int omni::application::run(const omni::sync::parameterized_thread_start& start_func)
int omni::application::run(const omni::sync::parameterized_thread_start& start_func, omni::generic_ptr targs)
int omni::application::run(const omni::sync::parameterized_thread_start& start_func, omni::generic_ptr targs, bool exit_with_work_thread)
int omni::application::run(const omni::sync::parameterized_thread_start& start_func, omni::generic_ptr targs, bool exit_with_work_thread, bool kill_worker_on_signal)
int omni::application::run(const int& argc, const char** argv)
int omni::application::run(const int& argc, const char** argv, const omni::sync::parameterized_thread_start& start_func, omni::generic_ptr targs, bool exit_with_work_thread)
int omni::application::run(const int& argc, const char** argv, const omni::sync::parameterized_thread_start& start_func, omni::generic_ptr targs, bool exit_with_work_thread, bool kill_worker_on_signal)
int omni::application::run(const int& argc, const wchar_t** argv)
int omni::application::run(const int& argc, const wchar_t** argv, const omni::sync::parameterized_thread_start& start_func, omni::generic_ptr targs, bool exit_with_work_thread)
int omni::application::run(const int& argc, const wchar_t** argv, const omni::sync::parameterized_thread_start& start_func, omni::generic_ptr targs, bool exit_with_work_thread, bool kill_worker_on_signal)
int omni::application::run(const int& argc, const char** argv, const omni::sync::thread_start& start_func, bool exit_with_work_thread)
int omni::application::run(const int& argc, const char** argv, const omni::sync::thread_start& start_func, bool exit_with_work_thread, bool kill_worker_on_signal)
int omni::application::run(const int& argc, const wchar_t** argv, const omni::sync::thread_start& start_func, bool exit_with_work_thread)
int omni::application::run(const int& argc, const wchar_t** argv, const omni::sync::thread_start& start_func, bool exit_with_work_thread, bool kill_worker_on_signal)
int omni::application::run(const omni::sync::thread_start& start_func, bool exit_with_work_thread)
int omni::application::run(const omni::sync::thread_start& start_func, bool exit_with_work_thread, bool kill_worker_on_signal)
int omni::application::run(const omni::sync::thread_start& start_func)

SYNOPSIS

Brief description.

top

DESCRIPTION

A more detailed description of the function.

top

RETURN VALUES

[optional] A return value if any.

top

PARAMETERS

[name] - [optional] Each parameter should be marked with this. [name] - [optional] Each template parameter should be marked with this.

top

ERRORS

[optional] Any errors (or error conditions) specific to this context.

top

CONSIDERATIONS

[optional] Any extra considerations to be aware of.

top

PLATFORM SPECIFIC

[optional] Any platform specific notes.

top

NOTES

[optional] Any notes to be aware of (like system calls, order of operations, etc.).

top

COMPLEXITY



top

EXAMPLE
#include <omni/application>

void app_exit()
{
    std::cout << "Application exiting" << std::endl;
}

void app_run()
{
    std::cout << "Leaving, waiting for CTRL+C" << std::endl;
}

int main(int argc, const char* argv[])
{
    omni::application::exit_handler::attach(&app_exit);
    return omni::application::run(&app_run);
}
Visit the examples page for more.

top