From 546512f3be33640a3098716c7a4e0aaa9f0de86d Mon Sep 17 00:00:00 2001 From: Relintai Date: Sat, 5 Feb 2022 18:41:51 +0100 Subject: [PATCH] Added convenience initialize variant. --- rcpp_framework.cpp | 5 +++++ rcpp_framework.h | 1 + 2 files changed, 6 insertions(+) diff --git a/rcpp_framework.cpp b/rcpp_framework.cpp index 095f037..9c6c9cf 100644 --- a/rcpp_framework.cpp +++ b/rcpp_framework.cpp @@ -48,6 +48,11 @@ void RCPPFramework::initialize() { _do_initialize(); } +void RCPPFramework::initialize(int argc, char **argv, char **envp) { + initialize(); + setup_args(argc, argv, envp); +} + void RCPPFramework::setup_args(int argc, char **argv, char **envp) { // Don't use the error macros here, they might not work before initialization if (!_initialized) { diff --git a/rcpp_framework.h b/rcpp_framework.h index 557ffa8..f353d76 100644 --- a/rcpp_framework.h +++ b/rcpp_framework.h @@ -19,6 +19,7 @@ public: static void create_and_init(int argc, char **argv, char **envp); void initialize(); + void initialize(int argc, char **argv, char **envp); void uninitialize(); void setup_args(int argc, char **argv, char **envp);