m_stream << "\"" + value + "\"";
}
+ void operator()(const RCSByteString& value)
+ {
+ for (size_t i = 0; i < value.size(); ++i)
+ {
+ m_stream << "\\x" << std::hex << (int)value[i];
+ }
+ }
+
void operator()(const RCSResourceAttributes& attrs)
{
m_stream << "{";
};
template< >
+ struct TypeInfoConverter< RCSByteString >
+ {
+ static constexpr RCSResourceAttributes::TypeId typeId =
+ RCSResourceAttributes::TypeId::BYTESTRING;
+ };
+
+ template< >
struct TypeInfoConverter< RCSResourceAttributes >
{
static constexpr RCSResourceAttributes::TypeId typeId =
};
template< typename VARIANT, int POS >
- constexpr inline std::vector< TypeInfo > getTypeInfo(Int2Type< POS >) noexcept
+ inline std::vector< TypeInfo > getTypeInfo(Int2Type< POS >) noexcept
{
auto vec = getTypeInfo< VARIANT >(Int2Type< POS - 1 >{ });
vec.push_back(TypeInfo::get< VARIANT, POS >());
}
template< typename VARIANT >
- constexpr inline std::vector< TypeInfo > getTypeInfo(Int2Type< 0 >) noexcept
+ inline std::vector< TypeInfo > getTypeInfo(Int2Type< 0 >) noexcept
{
return { TypeInfo::get< VARIANT, 0 >() };
}
return typeInfos[which];
}
-
} // unnamed namespace
{
namespace Service
{
-
RCSResourceAttributes::Value::ComparisonHelper::ComparisonHelper(const Value& v) :
m_valueRef(v)
{
{
}
+ RCSResourceAttributes::iterator::iterator(const iterator& rhs) :
+ m_cur{ rhs.m_cur },
+ m_keyValuePair{ this }
+ {
+ }
+
+ auto RCSResourceAttributes::iterator::operator=(const iterator& rhs) -> iterator&
+ {
+ m_cur = rhs.m_cur;
+ return *this;
+ }
+
RCSResourceAttributes::iterator::iterator(base_iterator&& iter) :
m_cur{ std::move(iter) },
m_keyValuePair{ this }
{
}
+ RCSResourceAttributes::const_iterator::const_iterator(const const_iterator& rhs) :
+ m_cur{ rhs.m_cur }, m_keyValuePair{ this }
+ {
+ }
+
RCSResourceAttributes::const_iterator::const_iterator(
const RCSResourceAttributes::iterator& iter) :
m_cur{ iter.m_cur }, m_keyValuePair{ this }
}
auto RCSResourceAttributes::const_iterator::operator=(
+ const const_iterator& rhs) -> const_iterator&
+ {
+ m_cur = rhs.m_cur;
+ return *this;
+ }
+
+ auto RCSResourceAttributes::const_iterator::operator=(
const RCSResourceAttributes::iterator& iter) -> const_iterator&
{
m_cur = iter.m_cur;
return m_values.erase(key) == 1U;
}
+ auto RCSResourceAttributes::erase(const_iterator pos) -> iterator
+ {
+ return iterator{ m_values.erase(pos.m_cur) };
+ }
+
bool RCSResourceAttributes::contains(const std::string& key) const
{
return m_values.find(key) != m_values.end();