43 template <
typename Char,
typename CharTraits,
typename Allocator>
44 void CoherentBindInternal(Binder* binder, std::basic_string<Char, CharTraits, Allocator>& value)
46 binder->Bind(value.c_str());
49 template <
typename Char,
typename CharTraits,
typename Allocator>
50 void CoherentBindInternal(Binder* binder,
const std::basic_string<Char, CharTraits, Allocator>& value)
52 binder->Bind(value.c_str());
55 template <
typename Char,
typename CharTraits,
typename Allocator>
56 void CoherentReadInternal(Binder* binder, std::basic_string<Char, CharTraits, Allocator>& value)
59 const Char* buffer =
nullptr;
60 binder->Read(buffer, size);
61 value.assign(buffer, size);
64 template <
typename CharTraits,
typename Allocator>
65 struct CoherentToString<std::basic_string<char, CharTraits, Allocator>>
67 static bool Invoke(
const std::basic_string<char, CharTraits, Allocator>& value,
char* buffer,
size_t* length)
71 const size_t toCopy = (*length < value.size()) ? *length : value.size();
72 std::memcpy(buffer, value.data(), toCopy);
74 *length = value.size();
79 template<
typename CharTraits,
typename Allocator>
80 struct TypeToElementType<const std::basic_string<char, CharTraits, Allocator>>
82 static const ElementType value = ElementType::ET_String;
85 template<
typename CharTraits,
typename Allocator>
86 struct TypeToElementType<const std::basic_string<char, CharTraits, Allocator>&>
88 static const ElementType value = ElementType::ET_String;
91 template<
typename CharTraits,
typename Allocator>
92 struct TypeToElementType<std::basic_string<char, CharTraits, Allocator>>
94 static const ElementType value = ElementType::ET_String;
97 template<
typename CharTraits,
typename Allocator>
98 struct TypeToElementType<std::basic_string<char, CharTraits, Allocator>&>
100 static const ElementType value = ElementType::ET_String;
Contains almost all Coherent namespaces, classes and functions.
Definition: DataStorage.h:38