-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathRerrMsg.hpp
More file actions
68 lines (51 loc) · 2.12 KB
/
RerrMsg.hpp
File metadata and controls
68 lines (51 loc) · 2.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
// $Id: RerrMsg.hpp 1186 2019-07-12 17:49:59Z mueller $
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright 2011-2013 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
//
// Revision History:
// Date Rev Version Comment
// 2013-01-12 474 1.2 add meth+text and meth+text+errnum ctors
// 2011-02-06 359 1.1 use references in interface
// 2011-01-15 356 1.0 Initial version
// ---------------------------------------------------------------------------
/*!
\brief Declaration of class RerrMsg.
*/
#ifndef included_Retro_RerrMsg
#define included_Retro_RerrMsg 1
#include <string>
#include <ostream>
namespace Retro {
class RerrMsg {
public:
RerrMsg();
RerrMsg(const RerrMsg& rhs);
RerrMsg(const std::string& meth, const std::string& text);
RerrMsg(const std::string& meth, const std::string& text,
int errnum);
~RerrMsg();
void Init(const std::string& meth, const std::string& text);
void InitErrno(const std::string& meth,
const std::string& text, int errnum);
void InitPrintf(const std::string& meth,
const char* format, ...);
void SetMeth(const std::string& meth);
void SetText(const std::string& text);
void Prepend(const std::string& meth);
void Append(const std::string& text);
void AppendErrno(int errnum);
void AppendPrintf(const char* format, ...);
const std::string& Meth() const;
const std::string& Text() const;
std::string Message() const;
void Swap(RerrMsg& rhs);
RerrMsg& operator=(const RerrMsg& rhs);
operator std::string() const;
protected:
std::string fMeth; //!< originating method
std::string fText; //!< message text
};
std::ostream& operator<<(std::ostream& os, const RerrMsg& obj);
} // end namespace Retro
#include "RerrMsg.ipp"
#endif