SWC-DB
v0.5.12 C++ documentations
SWC-DB© (Super Wide Column Database) - High Performance Scalable Database (https://github.com/kashirin-alex/swc-db)
Pread.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_fs_Broker_Protocol_params_Pread_h
7
#define swcdb_fs_Broker_Protocol_params_Pread_h
8
9
10
#include "
swcdb/core/comm/Serializable.h
"
11
12
13
namespace
SWC
{
namespace
Comm {
namespace
Protocol {
14
namespace
FsBroker {
namespace
Params {
15
16
17
class
PreadReq
final :
public
Serializable
{
18
public
:
19
20
SWC_CAN_INLINE
21
PreadReq
() noexcept :
fd
(-1),
offset
(),
amount
() { }
22
23
SWC_CAN_INLINE
24
PreadReq
(int32_t a_fd, uint64_t a_offset, uint32_t a_amount) noexcept
25
:
fd
(a_fd),
offset
(a_offset),
amount
(a_amount) { }
26
27
int32_t
fd
;
28
uint64_t
offset
;
29
uint32_t
amount
;
30
31
private
:
32
33
size_t
SWC_PURE_FUNC
internal_encoded_length
()
const override
;
34
35
void
internal_encode
(uint8_t** bufp)
const override
;
36
37
void
internal_decode
(
const
uint8_t** bufp,
size_t
* remainp)
override
;
38
39
};
40
41
42
}}}}}
43
44
45
#if defined(SWC_IMPL_SOURCE) or \
46
(defined(FS_BROKER_APP) and !defined(BUILTIN_FS_BROKER))
47
#include "
swcdb/fs/Broker/Protocol/params/Pread.cc
"
48
#endif
49
50
51
#endif // swcdb_fs_Broker_Protocol_params_Pread_h
SWC::Comm::Protocol::FsBroker::Params::PreadReq::internal_encoded_length
size_t SWC_PURE_FUNC internal_encoded_length() const override
Definition:
Pread.cc:14
SWC::Comm::Protocol::FsBroker::Params::PreadReq::PreadReq
SWC_CAN_INLINE PreadReq() noexcept
Definition:
Pread.h:21
SWC::Comm::Protocol::FsBroker::Params::PreadReq::PreadReq
SWC_CAN_INLINE PreadReq(int32_t a_fd, uint64_t a_offset, uint32_t a_amount) noexcept
Definition:
Pread.h:24
SWC::Comm::Protocol::FsBroker::Params::PreadReq::amount
uint32_t amount
Definition:
Pread.h:29
SWC::Comm::Protocol::FsBroker::Params::PreadReq
Definition:
Pread.h:17
Pread.cc
SWC_CAN_INLINE
#define SWC_CAN_INLINE
Definition:
Compat.h:102
SWC::Comm::Protocol::FsBroker::Params::PreadReq::internal_encode
void internal_encode(uint8_t **bufp) const override
Definition:
Pread.cc:20
SWC
The SWC-DB C++ namespace 'SWC'.
Definition:
main.cc:12
SWC_PURE_FUNC
#define SWC_PURE_FUNC
Definition:
Compat.h:108
SWC::Comm::Serializable
Definition:
Serializable.h:18
SWC::Comm::Protocol::FsBroker::Params::PreadReq::fd
int32_t fd
Definition:
Pread.h:27
SWC::Comm::Protocol::FsBroker::Params::PreadReq::offset
uint64_t offset
Definition:
Pread.h:28
Serializable.h
SWC::Comm::Protocol::FsBroker::Params::PreadReq::internal_decode
void internal_decode(const uint8_t **bufp, size_t *remainp) override
Definition:
Pread.cc:26
include
swcdb
fs
Broker
Protocol
params
Pread.h
Generated on Sat Jun 3 2023 18:00:07 for SWC-DB by
1.8.20