SWC-DB  v0.5.12 C++ documentations
SWC-DB© (Super Wide Column Database) - High Performance Scalable Database (https://github.com/kashirin-alex/swc-db)
Commands.cc
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 
8 
9 
10 namespace SWC { namespace Comm { namespace Protocol { namespace FsBroker {
11 
12 
13 const char* Commands::to_string(uint8_t cmd) noexcept {
14  switch(cmd) {
15  case FUNCTION_OPEN:
16  return "OPEN";
17  case FUNCTION_CREATE:
18  return "CREATE";
19  case FUNCTION_CLOSE:
20  return "CLOSE";
21  case FUNCTION_READ:
22  return "READ";
23  case FUNCTION_APPEND:
24  return "APPEND";
25  case FUNCTION_SEEK:
26  return "SEEK";
27  case FUNCTION_REMOVE:
28  return "REMOVE";
29  case FUNCTION_LENGTH:
30  return "LENGTH";
31  case FUNCTION_PREAD:
32  return "PREAD";
33  case FUNCTION_MKDIRS:
34  return "MKDIRS";
35  case FUNCTION_FLUSH:
36  return "FLUSH";
37  case FUNCTION_RMDIR:
38  return "RMDIR";
39  case FUNCTION_READDIR:
40  return "READDIR";
41  case FUNCTION_EXISTS:
42  return "EXISTS";
43  case FUNCTION_RENAME:
44  return "RENAME";
45  case FUNCTION_SYNC:
46  return "SYNC";
47  case FUNCTION_WRITE:
48  return "WRITE";
49  case FUNCTION_READ_ALL:
50  return "READ_ALL";
52  return "COMBI_PREAD";
53  default:
54  return "NOIMPL";
55  }
56 }
57 
58 }}}}
SWC::Comm::Protocol::FsBroker::FUNCTION_PREAD
@ FUNCTION_PREAD
Pread.
Definition: Commands.h:35
SWC::Comm::Protocol::FsBroker::FUNCTION_SEEK
@ FUNCTION_SEEK
Seek.
Definition: Commands.h:32
SWC::Comm::Protocol::FsBroker::FUNCTION_REMOVE
@ FUNCTION_REMOVE
Remove.
Definition: Commands.h:33
SWC::Comm::Protocol::FsBroker::FUNCTION_CREATE
@ FUNCTION_CREATE
Create.
Definition: Commands.h:28
SWC::Comm::Protocol::FsBroker::FUNCTION_SYNC
@ FUNCTION_SYNC
Sync.
Definition: Commands.h:42
SWC::Comm::Protocol::FsBroker::FUNCTION_READDIR
@ FUNCTION_READDIR
Readdir.
Definition: Commands.h:39
SWC::Comm::Protocol::FsBroker::FUNCTION_WRITE
@ FUNCTION_WRITE
Write.
Definition: Commands.h:43
SWC::Comm::Protocol::FsBroker::FUNCTION_READ
@ FUNCTION_READ
Read.
Definition: Commands.h:30
SWC::Comm::Protocol::FsBroker::FUNCTION_RMDIR
@ FUNCTION_RMDIR
Rmdir.
Definition: Commands.h:38
SWC::Comm::Protocol::FsBroker::FUNCTION_APPEND
@ FUNCTION_APPEND
Append.
Definition: Commands.h:31
SWC
The SWC-DB C++ namespace 'SWC'.
Definition: main.cc:12
SWC::Comm::Protocol::FsBroker::FUNCTION_OPEN
@ FUNCTION_OPEN
Open.
Definition: Commands.h:27
SWC::Comm::Protocol::FsBroker::FUNCTION_LENGTH
@ FUNCTION_LENGTH
Length.
Definition: Commands.h:34
SWC::Comm::Protocol::FsBroker::FUNCTION_MKDIRS
@ FUNCTION_MKDIRS
Mkdirs.
Definition: Commands.h:36
SWC::Comm::Protocol::FsBroker::FUNCTION_FLUSH
@ FUNCTION_FLUSH
Flush.
Definition: Commands.h:37
SWC::Comm::Protocol::FsBroker::Commands::to_string
static const char *SWC_CONST_FUNC to_string(uint8_t cmd) noexcept
Definition: Commands.cc:13
Commands.h
SWC::Comm::Protocol::FsBroker::FUNCTION_READ_ALL
@ FUNCTION_READ_ALL
ReadAll.
Definition: Commands.h:44
SWC::Comm::Protocol::FsBroker::FUNCTION_CLOSE
@ FUNCTION_CLOSE
Close.
Definition: Commands.h:29
SWC::Comm::Protocol::FsBroker::FUNCTION_EXISTS
@ FUNCTION_EXISTS
Exists.
Definition: Commands.h:40
SWC::Comm::Protocol::FsBroker::FUNCTION_COMBI_PREAD
@ FUNCTION_COMBI_PREAD
CombiPread open+pread+close.
Definition: Commands.h:45
SWC::Comm::Protocol::FsBroker::FUNCTION_RENAME
@ FUNCTION_RENAME
Rename.
Definition: Commands.h:41