Molybden API
Loading...
Searching...
No Matches
js_array_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_JS_ARRAY_DETAIL_HPP
6#define MOLYBDEN_JS_ARRAY_DETAIL_HPP
7
8namespace molybden {
9
10template <>
11std::shared_ptr<JsArray> JsObject::as();
12
13template <class T>
14void JsArray::set(uint32_t index, T&& value) {
15 setValue(index, JsValue::from(std::forward<T>(value)));
16}
17
18} // namespace molybden
19
20#endif // MOLYBDEN_JS_ARRAY_DETAIL_HPP
void set(uint32_t index, T &&value)
Inserts the specified element into the array at the specified index.
Definition js_array_detail.hpp:14
std::shared_ptr< T > as()
Returns the shared pointer of type T to this object if it represents one, or nullptr otherwise.
Definition js_object_detail.hpp:13
static JsValue from(T &&value)
Constructs a JavaScript value from the convertible C++ one.
Definition js_value_detail.hpp:51