Thomas Psota | ab77907 | 2019-09-04 15:49:39 +0200 | [diff] [blame] | 1 | /* ************************************************************************************************ |
| 2 | * BaSys Type System |
| 3 | * |
| 4 | * Define type IDs |
| 5 | * ************************************************************************************************/ |
| 6 | |
| 7 | #ifndef BASYX_TYPES_H |
| 8 | #define BASYX_TYPES_H |
| 9 | |
| 10 | #include <set> |
| 11 | #include <unordered_map> |
| 12 | #include <unordered_set> |
| 13 | #include <vector> |
Johannes Wendel | ed007a1 | 2019-11-25 17:09:45 +0100 | [diff] [blame] | 14 | #include <memory> |
Thomas Psota | ab77907 | 2019-09-04 15:49:39 +0200 | [diff] [blame] | 15 | |
| 16 | namespace basyx { |
Thomas Psota | b49d8df | 2019-11-27 15:55:41 +0100 | [diff] [blame] | 17 | |
Johannes Wendel | ed007a1 | 2019-11-25 17:09:45 +0100 | [diff] [blame] | 18 | template<typename T> |
| 19 | using specificCollection_t = std::vector<std::shared_ptr<T>>; |
Thomas Psota | b49d8df | 2019-11-27 15:55:41 +0100 | [diff] [blame] | 20 | |
Johannes Wendel | ed007a1 | 2019-11-25 17:09:45 +0100 | [diff] [blame] | 21 | template<typename T> |
| 22 | using specificMap_t = std::unordered_map<std::string, std::shared_ptr<T >> ; |
Johannes Wendel | 46df9d0 | 2019-10-23 16:42:26 +0200 | [diff] [blame] | 23 | |
Thomas Psota | 79a97d6 | 2019-11-25 15:33:10 +0100 | [diff] [blame] | 24 | enum class BaseType |
| 25 | { |
| 26 | Primitive, |
| 27 | HashMap, |
| 28 | Set, |
| 29 | List |
| 30 | }; |
Johannes Wendel | 46df9d0 | 2019-10-23 16:42:26 +0200 | [diff] [blame] | 31 | |
Thomas Psota | 79a97d6 | 2019-11-25 15:33:10 +0100 | [diff] [blame] | 32 | enum class ValueType |
| 33 | { |
| 34 | Bool, |
| 35 | Int, |
| 36 | Float, |
| 37 | String |
| 38 | }; |
Thomas Psota | ab77907 | 2019-09-04 15:49:39 +0200 | [diff] [blame] | 39 | }; |
| 40 | |
| 41 | enum BaSyxCommand { |
| 42 | GET = 1, |
| 43 | SET = 2, |
| 44 | CREATE = 3, |
| 45 | DEL = 4, // DELETE is a reserved keyword |
| 46 | INVOKE = 5 |
| 47 | }; |
| 48 | |
| 49 | #define BASYX_FRAMESIZE_SIZE 4 |
| 50 | #define BASYX_STRINGSIZE_SIZE 4 |
| 51 | |
| 52 | #endif /* BASYX_TYPES_H */ |