September 2016
Intermediate to advanced
588 pages
12h 22m
English
The Converter class is a template class intended to be specialized by type. Its task is to convert values between the template type and the String objects. The Check variable takes a string and returns true if it holds a valid value, TextToValue converts a text to a value, and ValueToText converts a value to a text.
Converter.h
namespace SmallWindows {
template <class Type>
class Converter {
public:
static bool Check(String& text, int base);
static Type TextToValue(String& text, int base);
static String ValueToText(Type& value, int base);
};
Small Windows comes equipped with a set of predefined converters, which are specializations of Converter. One of these handles signed integer values of the type int.
Converter.h
Read now
Unlock full access