Andreas Huber | c9410c7 | 2016-07-28 12:18:40 -0700 | [diff] [blame^] | 1 | #include "ScalarType.h" |
2 | |||||
3 | #include "Formatter.h" | ||||
4 | |||||
5 | namespace android { | ||||
6 | |||||
7 | ScalarType::ScalarType(Kind kind) | ||||
8 | : mKind(kind) { | ||||
9 | } | ||||
10 | |||||
11 | void ScalarType::dump(Formatter &out) const { | ||||
12 | static const char *const kName[] = { | ||||
13 | "char", "bool", "opaque", "int8_t", "uint8_t", "int16_t", "uint16_t", | ||||
14 | "int32_t", "uint32_t", "int64_t", "uint64_t", "float", "double" | ||||
15 | }; | ||||
16 | out << kName[mKind]; | ||||
17 | } | ||||
18 | |||||
19 | } // namespace android | ||||
20 |