Molybden API
Loading...
Searching...
No Matches
field_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_FIELD_CONTAINER_DETAIL_HPP
6#define MOLYBDEN_FIELD_CONTAINER_DETAIL_HPP
7
8namespace molybden {
9namespace internal {
10
11template <class C, class T>
12int FieldContainer::addField(Field<C, T> field, const char* name) {
13 std::lock_guard lock{mutex_};
14 fields_.emplace(
15 name,
16 new internal::JsAccessibleFieldImpl<C, T>(static_cast<C*>(this), field));
17 return 0;
18}
19
20} // namespace internal
21} // namespace molybden
22
23#endif // MOLYBDEN_FIELD_CONTAINER_DETAIL_HPP