function object which serializes type T to a BLOB (or BLOB like) object More...
#include <DefaultSerializer.h>
Public Member Functions | |
Memory::BLOB | operator() (const T &t) const |
function object which serializes type T to a BLOB (or BLOB like) object
This is (at least originally) intended to be used by Cryptography::Hash<T>, but will probably be useful for many operations that need to treat a type T as a sequence of bytes
NOTE - not always defined - since we dont know how to serialze everthing - callers may need to specialize this
For now, this works with T: o is_trivially_copy_constructible_v (e.g. int, float, uint32_t, etc) o const char* o std::string o Memory::BLOB (just passed throgh, not adpated)
ALSO, MANY other Stroika classes support this by providing their own specialization of DefaultSerializer<> For example: o Characters::String o IO::Network::InternetAddress ...
Definition at line 62 of file DefaultSerializer.h.
Memory::BLOB DataExchange::DefaultSerializer::operator() | ( | const T & | t | ) | const |
Convert the given t (of type T) to a Memory::BLOB; This should be as quick and efficient as practical.
Definition at line 2076 of file String.cpp.