SWC-DB  v0.5.12 C++ documentations
SWC-DB© (Super Wide Column Database) - High Performance Scalable Database (https://github.com/kashirin-alex/swc-db)
KeySeq.h
Go to the documentation of this file.
1 /*
2  * SWC-DB© Copyright since 2019 Alex Kashirin <kashirin.alex@gmail.com>
3  * License details at <https://github.com/kashirin-alex/swc-db/#license>
4  */
5 
6 #ifndef swcdb_db_types_KeySeq_h
7 #define swcdb_db_types_KeySeq_h
8 
9 #include "swcdb/core/Compat.h"
10 
11 namespace SWC { namespace DB { namespace Types {
12 
13 enum class KeySeq : uint8_t {
14  UNKNOWN = 0,
15  LEXIC = 1,
16  VOLUME = 2,
17  FC_LEXIC = 3,
18  FC_VOLUME = 4
19 };
20 
21 bool SWC_CONST_FUNC is_fc(KeySeq typ) noexcept;
22 
23 const char* SWC_CONST_FUNC to_string(KeySeq typ) noexcept;
24 
25 KeySeq SWC_PURE_FUNC range_seq_from(const std::string& typ) noexcept;
26 
27 
29 std::string repr_range_seq(int typ) {
30  return to_string(KeySeq(typ));
31 }
32 
34 int from_string_range_seq(const std::string& typ) noexcept {
35  return int(range_seq_from(typ));
36 }
37 
38 
39 }}}
40 
41 
42 #ifdef SWC_IMPL_SOURCE
43 #include "swcdb/db/Types/KeySeq.cc"
44 #endif
45 
46 #endif // swcdb_db_types_KeySeq_h
SWC::DB::Types::is_fc
bool SWC_CONST_FUNC is_fc(KeySeq typ) noexcept
Definition: KeySeq.cc:22
SWC::DB::Types::from_string_range_seq
SWC_CAN_INLINE int from_string_range_seq(const std::string &typ) noexcept
Definition: KeySeq.h:34
SWC::DB::Types::to_string
const char *SWC_CONST_FUNC to_string(Column typ) noexcept
Definition: Column.cc:38
SWC::DB::Types::range_seq_from
KeySeq SWC_PURE_FUNC range_seq_from(const std::string &typ) noexcept
Definition: KeySeq.cc:48
SWC::DB::Types::KeySeq
KeySeq
Definition: KeySeq.h:13
SWC::DB::Types::KeySeq::UNKNOWN
@ UNKNOWN
SWC_CONST_FUNC
#define SWC_CONST_FUNC
Definition: Compat.h:107
SWC_CAN_INLINE
#define SWC_CAN_INLINE
Definition: Compat.h:102
SWC
The SWC-DB C++ namespace 'SWC'.
Definition: main.cc:12
SWC_PURE_FUNC
#define SWC_PURE_FUNC
Definition: Compat.h:108
Compat.h
SWC::DB::Types::repr_range_seq
SWC_CAN_INLINE std::string repr_range_seq(int typ)
Definition: KeySeq.h:29
KeySeq.cc