2022-09-11 02:48:30 +02:00
|
|
|
|
|
|
|
#ifndef __cxz_to_string_h__
|
|
|
|
#define __cxz_to_string_h__
|
|
|
|
|
|
|
|
#include "types.h"
|
|
|
|
|
|
|
|
namespace CNORXZ
|
|
|
|
{
|
|
|
|
template <typename T>
|
2022-09-13 00:31:12 +02:00
|
|
|
struct ToString
|
|
|
|
{
|
|
|
|
static String func(const T& a);
|
|
|
|
};
|
2022-09-11 02:48:30 +02:00
|
|
|
|
2022-09-15 16:45:45 +02:00
|
|
|
template <>
|
|
|
|
struct ToString<String>
|
|
|
|
{
|
|
|
|
static String func(const String& a);
|
|
|
|
};
|
|
|
|
|
2022-09-11 02:48:30 +02:00
|
|
|
template <typename T>
|
2022-09-13 00:31:12 +02:00
|
|
|
struct ToString<Vector<T>>
|
|
|
|
{
|
|
|
|
static String func(const Vector<T>& a);
|
|
|
|
};
|
2022-09-11 02:48:30 +02:00
|
|
|
|
2022-09-13 00:31:12 +02:00
|
|
|
template <typename T, SizeT N>
|
|
|
|
struct ToString<Arr<T,N>>
|
|
|
|
{
|
|
|
|
static String func(const Arr<T,N>& a);
|
|
|
|
};
|
2022-09-11 02:48:30 +02:00
|
|
|
|
2022-11-14 00:35:05 +01:00
|
|
|
template <typename... Ts>
|
|
|
|
struct ToString<Tuple<Ts...>>
|
|
|
|
{
|
|
|
|
static String func(const Tuple<Ts...>& t);
|
|
|
|
};
|
|
|
|
|
2022-09-11 02:48:30 +02:00
|
|
|
template <>
|
2022-09-13 00:31:12 +02:00
|
|
|
struct ToString<DType>
|
|
|
|
{
|
|
|
|
static String func(const DType& a);
|
|
|
|
};
|
|
|
|
|
|
|
|
template <typename T>
|
|
|
|
String toString(const T& a);
|
|
|
|
|
2022-09-11 02:48:30 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|