| Leonetienne/Hazelnupp Simple, easy to use, command line parameter interface

DataType.h
Go to the documentation of this file.
1 #pragma once
2 #include <string>
3
4 namespace Hazelnp
5 {
6 /** The different data types a paramater can be
7 */
8 enum class DATA_TYPE
9 {
10 VOID,
11 INT,
12 FLOAT,
13 STRING,
14 LIST
15 };
16
17 static inline std::string DataTypeToString(DATA_TYPE type)
18 {
19 switch (type)
20 {
21 case DATA_TYPE::VOID:
22 return "VOID";
23
24 case DATA_TYPE::INT:
25 return "INT";
26
27 case DATA_TYPE::FLOAT:
28 return "FLOAT";
29
30 case DATA_TYPE::STRING:
31 return "STRING";
32
33 case DATA_TYPE::LIST:
34 return "LIST";
35 }
36
37 return "";
38 }
39 }
Hazelnp
Definition: CmdArgsInterface.h:9
Hazelnp::DATA_TYPE::VOID
@ VOID
Hazelnp::DATA_TYPE::LIST
@ LIST
Hazelnp::DATA_TYPE::FLOAT
@ FLOAT
Hazelnp::DATA_TYPE::INT
@ INT
Hazelnp::DATA_TYPE
DATA_TYPE
The different data types a paramater can be.
Definition: DataType.h:8
Hazelnp::DATA_TYPE::STRING
@ STRING
Hazelnp::DataTypeToString
static std::string DataTypeToString(DATA_TYPE type)
Definition: DataType.h:17