srecord: quit/prefix.h Source File

srecord 1.65.0

Loading...
Searching...
No Matches
prefix.h
Go to the documentation of this file.
1//
2// srecord - manipulate eprom load files
3// Copyright (C) 2000, 2002, 2003, 2006-2008, 2010 Peter Miller
4//
5// This program is free software; you can redistribute it and/or modify it
6// under the terms of the GNU Lesser General Public License as published by
7// the Free Software Foundation; either version 3 of the License, or (at
8// your option) any later version.
9//
10// This program is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
13// General Public License for more details.
14//
15// You should have received a copy of the GNU Lesser General Public License
16// along with this program. If not, see <http://www.gnu.org/licenses/>.
17//
18
19#ifndef SRECORD_QUIT_PREFIX_H
20#define SRECORD_QUIT_PREFIX_H
21
22#include <string>
23#include <srecord/quit.h>
24
25namespace srecord
26{
27
28/**
29 * The quit_prefix class is used to filter the messages issued to include
30 * a line prefix. The message is then passed ot a deeper quit handler.
31 */
32 class quit_prefix:
33 public quit
34{
35public:
36 /**
37 * The destructor.
38 */
39 virtual ~quit_prefix();
40
41 /**
42 * A constructor. The given handler is used to process the
43 * messages, once prefixed. The given string is used as the
44 * line prefix.
45 */
46 quit_prefix(quit &deeper, const char *prefix);
47
48 /**
49 * A constructor. The given handler is used to process the
50 * messages, once prefixed. The given string is used as the
51 * line prefix.
52 */
53 quit_prefix(quit &deeper, const std::string &prefix);
54
55 // See base class for documentation.
56 virtual void exit(int);
57
58 // See base class for documentation.
59 virtual void message_v(const char *, va_list);
60
61private:
62 /**
63 * The prefix instance variable is used to remember the line
64 * prefix to use.
65 */
66 std::string prefix;
67
68 /**
69 * The deepr instance variable is used to remember which handler
70 * is to be used to process the error messages once the refix
71 * has been added.
72 */
73 quit &deeper;
74
75 /**
76 * The default constructor. Do not use.
77 */
78 quit_prefix();
79
80 /**
81 * The copy constructor. Do not use.
82 */
83 quit_prefix(const quit_prefix &);
84
85 /**
86 * The assignment operator. Do not use.
87 */
88 quit_prefix &operator=(const quit_prefix &);
89};
90
91};
92
93#endif // SRECORD_QUIT_PREFIX_H
srecord::quit_prefix::quit_prefix
quit_prefix(quit &deeper, const std::string &prefix)
A constructor.
srecord::quit_prefix::~quit_prefix
virtual ~quit_prefix()
The destructor.
srecord::quit_prefix::exit
virtual void exit(int)
The exit method is used to terminate execution.
srecord::quit_prefix::quit_prefix
quit_prefix(quit &deeper, const char *prefix)
A constructor.
srecord::quit_prefix::message_v
virtual void message_v(const char *, va_list)
The message_v method is used to send an error message to a suitable destination.
srecord::quit::quit
quit()
The default constructor.
srecord
Definition adler16.h:25
quit.h