This is a type-traits functor that allows to make custom types "appendable" to objects of type AString.
Specializations of this struct have to implement operator() , which is invoked by method AString::Append , when an instance of the type in question is passed.
For user defined string types that get adopted to ALib string system using a specialization of struct T_CharArray , no specialization of this functor is needed, because method AString::Append will accept such types likewise.
The third template parameter of this struct, TEnableIf , may be used to perform templated specializations based on a condition evaluated with std::enable_if
(or similar TMP mechanics).
TAppendable | The type that should be made compatible with method TAString::Append . |
TChar | The character type of the target AString. Defaults to character . |
TEnableIf | Optional TMP parameter to allow templated specializations. |
Definition at line 95 of file astring.hpp.
#include <astring.hpp>
Public Method Index: | |
void | operator() (TAString< TChar > &target, const TAppendable &src) |
template ALIB_API void operator() | ( | TAString< TChar > & | target, |
const TAppendable & | src ) |
This operator is invoked on a temporary object of this type by AString::Append , when an object of type TAppendable is passed.
Usually, specializations of this operator append a string representation of src to target . Special "appendable types" might modify target in other, arbitrary ways.
target | The target string. |
src | The source object. |
Definition at line 118 of file appendables.cpp.