w11 - cpp 0.794
Backend server for Rlink and w11
Loading...
Searching...
No Matches
RerrMsg.hpp
Go to the documentation of this file.
1// $Id: RerrMsg.hpp 1186 2019-07-12 17:49:59Z mueller $
2// SPDX-License-Identifier: GPL-3.0-or-later
3// Copyright 2011-2013 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4//
5// Revision History:
6// Date Rev Version Comment
7// 2013-01-12 474 1.2 add meth+text and meth+text+errnum ctors
8// 2011-02-06 359 1.1 use references in interface
9// 2011-01-15 356 1.0 Initial version
10// ---------------------------------------------------------------------------
11
12
17#ifndef included_Retro_RerrMsg
18#define included_Retro_RerrMsg 1
19
20#include <string>
21#include <ostream>
22
23namespace Retro {
24
25 class RerrMsg {
26 public:
27 RerrMsg();
28 RerrMsg(const RerrMsg& rhs);
29 RerrMsg(const std::string& meth, const std::string& text);
30 RerrMsg(const std::string& meth, const std::string& text,
31 int errnum);
32 ~RerrMsg();
33
34 void Init(const std::string& meth, const std::string& text);
35 void InitErrno(const std::string& meth,
36 const std::string& text, int errnum);
37 void InitPrintf(const std::string& meth,
38 const char* format, ...);
39
40 void SetMeth(const std::string& meth);
41 void SetText(const std::string& text);
42
43 void Prepend(const std::string& meth);
44 void Append(const std::string& text);
45 void AppendErrno(int errnum);
46 void AppendPrintf(const char* format, ...);
47
48 const std::string& Meth() const;
49 const std::string& Text() const;
50 std::string Message() const;
51
52 void Swap(RerrMsg& rhs);
53
54 RerrMsg& operator=(const RerrMsg& rhs);
55 operator std::string() const;
56
57 protected:
58 std::string fMeth;
59 std::string fText;
60 };
61
62 std::ostream& operator<<(std::ostream& os, const RerrMsg& obj);
63
64} // end namespace Retro
65
66#include "RerrMsg.ipp"
67
68#endif
FIXME_docs.
Definition: RerrMsg.hpp:25
std::string fText
message text
Definition: RerrMsg.hpp:59
void SetMeth(const std::string &meth)
FIXME_docs.
Definition: RerrMsg.ipp:21
const std::string & Meth() const
FIXME_docs.
Definition: RerrMsg.ipp:39
~RerrMsg()
Destructor.
Definition: RerrMsg.cpp:68
RerrMsg & operator=(const RerrMsg &rhs)
FIXME_docs.
Definition: RerrMsg.cpp:179
void Init(const std::string &meth, const std::string &text)
FIXME_docs.
Definition: RerrMsg.cpp:74
void Prepend(const std::string &meth)
FIXME_docs.
Definition: RerrMsg.cpp:116
const std::string & Text() const
FIXME_docs.
Definition: RerrMsg.ipp:47
void AppendErrno(int errnum)
FIXME_docs.
Definition: RerrMsg.cpp:134
std::string fMeth
originating method
Definition: RerrMsg.hpp:58
void SetText(const std::string &text)
FIXME_docs.
Definition: RerrMsg.ipp:30
RerrMsg()
Default constructor.
Definition: RerrMsg.cpp:36
void AppendPrintf(const char *format,...)
FIXME_docs.
Definition: RerrMsg.cpp:143
void Append(const std::string &text)
FIXME_docs.
Definition: RerrMsg.cpp:125
void InitPrintf(const std::string &meth, const char *format,...)
FIXME_docs.
Definition: RerrMsg.cpp:96
void Swap(RerrMsg &rhs)
FIXME_docs.
Definition: RerrMsg.cpp:169
std::string Message() const
FIXME_docs.
Definition: RerrMsg.cpp:161
void InitErrno(const std::string &meth, const std::string &text, int errnum)
FIXME_docs.
Definition: RerrMsg.cpp:84
Declaration of class ReventLoop.
Definition: ReventLoop.cpp:47
std::ostream & operator<<(std::ostream &os, const RerrMsg &obj)