2 * Copyright (c) 2023 Philippe Proulx <pproulx@efficios.com>
4 * SPDX-License-Identifier: MIT
7 #ifndef BABELTRACE_CPP_COMMON_BT2_RAW_VALUE_PROXY_HPP
8 #define BABELTRACE_CPP_COMMON_BT2_RAW_VALUE_PROXY_HPP
14 template <typename ObjT>
18 using _RawVal = typename ObjT::Value;
21 explicit RawValueProxy(const ObjT obj) : _mObj {obj}
25 RawValueProxy& operator=(const _RawVal& rawVal)
31 operator _RawVal() const noexcept
40 template <typename ObjT>
41 class RawStringValueProxy final : public RawValueProxy<ObjT>
44 explicit RawStringValueProxy(const ObjT obj) : RawValueProxy<ObjT> {obj}
48 RawStringValueProxy& operator=(const std::string& rawVal)
50 RawValueProxy<ObjT>::operator=(rawVal.data());
57 #endif /* BABELTRACE_CPP_COMMON_BT2_RAW_VALUE_PROXY_HPP */