diff options
author | Diogo Pedrosa <diogo12pedrosa@gmail.com> | 2023-03-09 17:57:35 +0000 |
---|---|---|
committer | Diogo Pedrosa <diogo12pedrosa@gmail.com> | 2023-03-10 14:41:51 +0000 |
commit | 826ebb8d352245a36ecaec32b6af61e7abf4696e (patch) | |
tree | d4e984dd100f3257ce784c9e30aefb6e60a93ab5 /implementation/runtime/src/runtime_impl.cpp | |
parent | fc73f40fa1501dc53210c63cb7c0d7623d106370 (diff) | |
download | vSomeIP-826ebb8d352245a36ecaec32b6af61e7abf4696e.tar.gz |
vsomeip 3.3.0
Diffstat (limited to 'implementation/runtime/src/runtime_impl.cpp')
-rw-r--r-- | implementation/runtime/src/runtime_impl.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/implementation/runtime/src/runtime_impl.cpp b/implementation/runtime/src/runtime_impl.cpp index fc23ced..cf74b2f 100644 --- a/implementation/runtime/src/runtime_impl.cpp +++ b/implementation/runtime/src/runtime_impl.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +// Copyright (C) 2014-2021 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. @@ -35,15 +35,22 @@ runtime_impl::~runtime_impl() { std::shared_ptr<application> runtime_impl::create_application( const std::string &_name) { + + return (create_application(_name, "")); +} + +std::shared_ptr<application> runtime_impl::create_application( + const std::string &_name, const std::string &_path) { static std::uint32_t postfix_id = 0; std::lock_guard<std::mutex> its_lock(applications_mutex_); - std::string its_name_ = _name; + std::string its_name = _name; auto found_application = applications_.find(_name); if( found_application != applications_.end()) { - its_name_ += "_" + std::to_string(postfix_id++); + its_name += "_" + std::to_string(postfix_id++); } - std::shared_ptr<application> application = std::make_shared<application_impl>(its_name_); - applications_[its_name_] = application; + std::shared_ptr<application> application + = std::make_shared<application_impl>(its_name, _path); + applications_[its_name] = application; return application; } |