blob: 060ff12f73ab52063e3d699b1c719298f8caf13e [file] [log] [blame]
Thomas Psotaab779072019-09-04 15:49:39 +02001/* ************************************************************************************************
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 Wendeled007a12019-11-25 17:09:45 +010014#include <memory>
Thomas Psotaab779072019-09-04 15:49:39 +020015
16namespace basyx {
Thomas Psotab49d8df2019-11-27 15:55:41 +010017
Johannes Wendeled007a12019-11-25 17:09:45 +010018 template<typename T>
19 using specificCollection_t = std::vector<std::shared_ptr<T>>;
Thomas Psotab49d8df2019-11-27 15:55:41 +010020
Johannes Wendeled007a12019-11-25 17:09:45 +010021 template<typename T>
22 using specificMap_t = std::unordered_map<std::string, std::shared_ptr<T >> ;
Johannes Wendel46df9d02019-10-23 16:42:26 +020023
Thomas Psota79a97d62019-11-25 15:33:10 +010024 enum class BaseType
25 {
26 Primitive,
27 HashMap,
28 Set,
29 List
30 };
Johannes Wendel46df9d02019-10-23 16:42:26 +020031
Thomas Psota79a97d62019-11-25 15:33:10 +010032 enum class ValueType
33 {
34 Bool,
35 Int,
36 Float,
37 String
38 };
Thomas Psotaab779072019-09-04 15:49:39 +020039};
40
41enum 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 */