diff options
Diffstat (limited to 'src/CommonAPI/Runtime.cpp')
-rw-r--r-- | src/CommonAPI/Runtime.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/CommonAPI/Runtime.cpp b/src/CommonAPI/Runtime.cpp index d7185df..f930db9 100644 --- a/src/CommonAPI/Runtime.cpp +++ b/src/CommonAPI/Runtime.cpp @@ -57,5 +57,14 @@ std::shared_ptr<MainLoopContext> Runtime::getNewMainLoopContext() const { return std::make_shared<MainLoopContext>(); } +std::shared_ptr<Factory> Runtime::createFactory(std::shared_ptr<MainLoopContext> mainLoopContext, + const std::string factoryName, + const bool nullOnInvalidName) { + if(mainLoopContext && !mainLoopContext->isInitialized()) { + return std::shared_ptr<Factory>(NULL); + } + return doCreateFactory(mainLoopContext, factoryName, nullOnInvalidName); +} + } // namespace CommonAPI |