Conversation
|
Я решил добавить |
…erting data from index map to actual
Mr-Ravil
left a comment
There was a problem hiding this comment.
Первый взгляд на решение. Подробрее гляну на выходных. А так же посмотрю по поводу garbage, и отпишусь по нему отдельно
There was a problem hiding this comment.
было бы ещё неплохо добавить пример с DataMap
There was a problem hiding this comment.
Было бы неплохо добавить информацию о DataMap в toString
There was a problem hiding this comment.
кажется этого не должно быть в дифе, тк схема жсона не меняется, а меняются только значения
| #ifdef USE_STRING | ||
| #include "string_data_map.h" | ||
| return new StringDataMap(1); | ||
| #endif | ||
| } else if constexpr (std::is_same_v<KEY_TYPE, long long>) { | ||
| #ifdef USE_LONG_LONG | ||
| #include "int_data_map.h" | ||
| return new IntDataMap(1); | ||
| #endif |
There was a problem hiding this comment.
зачем инклюдить тут? не надо так делать, заинклюдь как обычно выше
| typedef long long test_type; | ||
| #include "global_types.h" | ||
|
|
||
| #ifdef REDIS | ||
| #define VALUE_TYPE test_type | ||
| #define KEY_TO_VALUE(key) key | ||
| #define GET_FUNC executeContains | ||
| #else | ||
| #define VALUE_TYPE void * | ||
| #define KEY_TO_VALUE(key) &key /* note: hack to turn a key into a pointer */ | ||
| #define GET_FUNC executeGet | ||
| #endif | ||
|
|
||
| #define DS_ADAPTER_T ds_adapter<test_type, VALUE_TYPE, RECLAIM<>, ALLOC<>, POOL<> > | ||
| #define DS_ADAPTER_T ds_adapter<KEY_TYPE, VALUE_TYPE, RECLAIM<>, ALLOC<>, POOL<> > |
There was a problem hiding this comment.
так может все это в целом перенести в global types? зачем размазывать по разным файлам
No description provided.