1 /* Copyright (C) 2021 Free Software Foundation, Inc.
4 This file is part of GNU Binutils.
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3, or (at your option)
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, 51 Franklin Street - Fifth Floor, Boston,
19 MA 02110-1301, USA. */
28 // The Emsg, experiment message, has as objects I18N'd messages
29 // in a structure suitable for attaching to and fetching
30 // from a queue of such messages. It is intended to
31 // be used for collector errors, collector warnings, parser
32 // errors, and er_archive errors that are encountered when
33 // reading an experiment
52 friend class Emsgqueue;
54 Emsg (Cmsg_warn w, const char *i18n_text);
55 Emsg (Cmsg_warn w, StringBuilder& sb);
56 Emsg (Cmsg_warn w, int f, const char *param);
71 Emsg *next; // next message in a queue
74 Cmsg_warn warn; // error/warning/...
75 int flavor; // the message flavor
76 char *par; // the input parameter string
77 char *text; // The I18N text of the message
87 Emsg *append (Cmsg_warn w, char *msg);
88 Emsg *find_msg (Cmsg_warn w, char *msg);
89 void appendqueue (Emsgqueue*);
91 void clear (void); // empty the queue
92 void mark_clear (void); // mark the queue empty, without touching messages
106 void remove_msg (Emsg *msg);
108 Emsg *append_msg (Cmsg_warn w, const char *fmt, ...);
109 void append_msgs (Vector<Emsg*> *lst);