MCPcopy Create free account
hub / github.com/TheRealMJP/DeferredTexturing / Parse

Function Parse

SampleFramework12/v1.00/Utility.h:68–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66
67// Parses a string into a number
68template<typename T> inline T Parse(const std::wstring& str)
69{
70 std::wistringstream stream(str);
71 wchar_t c;
72 T x;
73 if(!(str >> x) || stream.get(c))
74 throw Exception(L"Can't parse string \"" + str + L"\"");
75 return x;
76}
77
78// Converts a number to a string
79template<typename T> inline std::wstring ToString(const T& val)

Callers

nothing calls this directly

Calls 1

ExceptionClass · 0.85

Tested by

no test coverage detected