14 template <Characters::IConvertibleToString STRINGISH_TYPE>
15 inline PointerType::PointerType (STRINGISH_TYPE&& s)
16 : PointerType{static_cast<const String&> (String{s})}
19 template <Common::IAnyOf<String> T>
20 inline T PointerType::As ()
const
22 if constexpr (same_as<T, String>) {
23 Characters::StringBuilder sb;
24 fComponents_.Apply ([&] (
const String& s) { sb <<
"/"sv << s.ReplaceAll (
"~"sv,
"~0"sv).ReplaceAll (
"/"sv,
"~1"sv); });
28 inline optional<VariantValue> PointerType::Apply (
const VariantValue& v)
const
30 return this->ApplyWithContext (v,
nullptr);
32 inline auto PointerType::ApplyWithContext (
const VariantValue& v)
const -> optional<tuple<Context, VariantValue>>
35 if (
auto o = this->ApplyWithContext (v, &c)) {
36 return make_tuple (c, *o);
44 *intoObj = PointerType{d.
As<
String> ()};
String is like std::u32string, except it is much easier to use, often much more space efficient,...
ObjectVariantMapper can be used to map C++ types to and from variant-union types, which can be transp...
nonvirtual void Add(const TypeMappingDetails &s)
Simple variant-value (case variant union) object, with (variant) basic types analogous to a value in ...
nonvirtual RETURNTYPE As() const