SWC-DB
v0.5.12 C++ documentations
SWC-DB© (Super Wide Column Database) - High Performance Scalable Database (https://github.com/kashirin-alex/swc-db)
SmartFd.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
#include "
swcdb/fs/SmartFd.h
"
7
#include "
swcdb/core/String.h
"
8
9
10
namespace
SWC
{
namespace
FS {
11
12
13
SmartFd::~SmartFd
() noexcept { }
14
15
std::string
SmartFd::to_string
()
const
{
16
return
format
(
"Fd('%s' flags=%u fd=%d pos="
SWC_FMT_LU
")"
,
17
m_filepath
.c_str(),
m_flags
.
load
(),
m_fd
.
load
(),
m_pos
.
load
());
18
}
19
20
void
SmartFd::print
(std::ostream& out)
const
{
21
out <<
"Fd('"
<<
m_filepath
22
<<
"' flags="
<<
m_flags
.
load
()
23
<<
" fd="
<<
m_fd
.
load
()
24
<<
" pos="
<<
m_pos
.
load
()
25
<<
')'
;
26
}
27
28
29
}}
30
SWC::FS::SmartFd::m_fd
Core::Atomic< int32_t > m_fd
Definition:
SmartFd.h:128
SWC::FS::SmartFd::m_flags
Core::Atomic< uint32_t > m_flags
Definition:
SmartFd.h:127
SWC::FS::SmartFd::m_pos
Core::Atomic< uint64_t > m_pos
Definition:
SmartFd.h:129
SWC::FS::SmartFd::m_filepath
const std::string m_filepath
Definition:
SmartFd.h:123
SWC
The SWC-DB C++ namespace 'SWC'.
Definition:
main.cc:12
SWC_FMT_LU
#define SWC_FMT_LU
Definition:
Compat.h:98
SWC::format
std::string format(const char *fmt,...) __attribute__((format(printf
Definition:
String.cc:17
SmartFd.h
SWC::FS::SmartFd::to_string
std::string to_string() const
Definition:
SmartFd.cc:15
SWC::Core::AtomicBase::load
constexpr SWC_CAN_INLINE T load() const noexcept
Definition:
Atomic.h:42
String.h
SWC::FS::SmartFd::print
void print(std::ostream &out) const
Definition:
SmartFd.cc:20
SWC::FS::SmartFd::~SmartFd
virtual ~SmartFd() noexcept
Definition:
SmartFd.cc:13
lib
swcdb
fs
SmartFd.cc
Generated on Sat Jun 3 2023 18:00:09 for SWC-DB by
1.8.20