Go to the documentation of this file.
45 #ifndef __SERIALIZE_HANDLERS_HH__
46 #define __SERIALIZE_HANDLERS_HH__
50 #include <type_traits>
77 template <
class T,
class Enable=
void>
85 parse(
const std::string &
s, T &value)
95 parse(
const std::string &
s,
bool &value)
105 parse(
const std::string &
s, std::string &value)
124 template <
class T,
class Enabled=
void>
127 static void show(std::ostream &
os,
const T &value) {
os << value; }
134 std::is_same_v<unsigned char, T> ||
135 std::is_same_v<signed char, T>>>
140 if (std::is_signed_v<T>)
143 os << (
unsigned int)value;
151 show(std::ostream &
os,
const bool &value)
154 os << (value ?
"true" :
"false");
162 #endif // __SERIALIZE_HANDLERS_HH__
static bool parse(const std::string &s, std::string &value)
static void show(std::ostream &os, const T &value)
bool to_number(const std::string &value, Pixel &retval)
static bool parse(const std::string &s, bool &value)
static void show(std::ostream &os, const T &value)
bool to_bool(const std::string &value, bool &retval)
Turn a string representation of a boolean into a boolean value.
static bool parse(const std::string &s, T &value)
Overload hash function for BasicBlockRange type.
static void show(std::ostream &os, const bool &value)
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
Generated on Sun Jul 30 2023 01:57:00 for gem5 by doxygen 1.8.17