w11 - cpp 0.794
Backend server for Rlink and w11
Loading...
Searching...
No Matches
Rfd.hpp
Go to the documentation of this file.
1// $Id: Rfd.hpp 1185 2019-07-12 17:29:12Z mueller $
2// SPDX-License-Identifier: GPL-3.0-or-later
3// Copyright 2019- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4//
5// Revision History:
6// Date Rev Version Comment
7// 2019-06-15 1163 1.0.1 SetFd() now type bool
8// 2019-06-07 1161 1.0 Initial version
9// ---------------------------------------------------------------------------
10
11
16#ifndef included_Retro_Rfd
17#define included_Retro_Rfd 1
18
19#include <string>
20
21#include "RerrMsg.hpp"
22
23namespace Retro {
24
25 class Rfd {
26 public:
27 Rfd();
28 Rfd(Rfd&& rhs); // move ctor
29 explicit Rfd(const char* cnam);
30 virtual ~Rfd();
31
32 Rfd(const Rfd&) = delete; // noncopyable
33 Rfd& operator=(const Rfd&) = delete; // noncopyable
34
35 bool SetFd(int fd);
36 int Fd() const;
37
38 bool IsOpen() const;
39 bool IsOpenNonStd() const;
40 void Close();
41 bool Close(RerrMsg& emsg);
42 void CloseOrCerr();
43
44 explicit operator bool() const;
45
46 protected:
47
48 int fFd;
49 std::string fCnam;
50};
51
52} // end namespace Retro
53
54#include "Rfd.ipp"
55
56#endif
FIXME_docs.
Definition: RerrMsg.hpp:25
FIXME_docs.
Definition: Rfd.hpp:25
bool IsOpenNonStd() const
FIXME_docs.
Definition: Rfd.ipp:36
int fFd
Definition: Rfd.hpp:48
bool IsOpen() const
FIXME_docs.
Definition: Rfd.ipp:28
Rfd()
FIXME_docs.
Definition: Rfd.cpp:37
Rfd & operator=(const Rfd &)=delete
int Fd() const
FIXME_docs.
Definition: Rfd.ipp:20
virtual ~Rfd()
FIXME_docs.
Definition: Rfd.cpp:63
std::string fCnam
Definition: Rfd.hpp:49
Rfd(const Rfd &)=delete
void Close()
FIXME_docs.
Definition: Rfd.cpp:82
void CloseOrCerr()
FIXME_docs.
Definition: Rfd.cpp:118
bool SetFd(int fd)
FIXME_docs.
Definition: Rfd.cpp:71
Declaration of class ReventLoop.
Definition: ReventLoop.cpp:47