Molybden API
Loading...
Searching...
No Matches
method_container_detail.hpp
1// Copyright (c) 2000-2024 TeamDev. All rights reserved.
2// TeamDev PROPRIETARY and CONFIDENTIAL.
3// Use is subject to license terms.
4
5#ifndef MOLYBDEN_METHOD_CONTAINER_DETAIL_HPP
6#define MOLYBDEN_METHOD_CONTAINER_DETAIL_HPP
7
8namespace molybden {
9namespace internal {
10
11template <class C, class R, class... T>
12int MethodContainer::addMethod(MethodSignature<C, R, T...> signature,
13 const char* name) {
14 std::lock_guard lock{mutex_};
15 methods_.emplace(
16 name,
17 new internal::JsAccessibleMethodImpl<C, R, T...>(static_cast<C*>(this),
18 signature));
19 return 0;
20}
21
22} // namespace internal
23} // namespace molybden
24
25#endif // MOLYBDEN_METHOD_CONTAINER_DETAIL_HPP