diff options
Diffstat (limited to 'src/ctx.cpp')
| -rw-r--r-- | src/ctx.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/ctx.cpp b/src/ctx.cpp index 930ae9ea..c2b30644 100644 --- a/src/ctx.cpp +++ b/src/ctx.cpp @@ -113,6 +113,30 @@ projCtx_t projCtx_t::createDefault() return ctx; } +/**************************************************************************/ +/* get_cpp_context() */ +/**************************************************************************/ + +projCppContext* projCtx_t::get_cpp_context() +{ + if (cpp_context == nullptr) { + cpp_context = new projCppContext(this); + } + return cpp_context; +} + + +/**************************************************************************/ +/* safeAutoCloseDbIfNeeded() */ +/**************************************************************************/ + +void projCtx_t::safeAutoCloseDbIfNeeded() +{ + if (cpp_context) { + cpp_context->autoCloseDbIfNeeded(); + } +} + /************************************************************************/ /* set_search_paths() */ /************************************************************************/ |
