4 /*****************************************************************************\
7 * Author : Chris Koeritz *
9 *******************************************************************************
10 * Copyright (c) 1995-$now By Author. This program is free software; you can *
11 * redistribute it and/or modify it under the terms of the GNU General Public *
12 * License as published by the Free Software Foundation; either version 2 of *
13 * the License or (at your option) any later version. This is online at: *
14 * http://www.fsf.org/copyleft/gpl.html *
15 * Please send any updates to: fred@gruntose.com *
16 \*****************************************************************************/
20 #include <basis/astring.h>
21 #include <basis/contracts.h>
28 //! Models an OS-level event so we can represent activities occurring there.
30 class OS_event : public letter, public virtual basis::text_formable
33 basis::un_int _message;
37 DEFINE_CLASS_NAME("OS_event");
39 OS_event(int event_type, basis::un_int message, basis::un_int parm1, basis::un_int parm2)
40 : letter(event_type), _message(message), _parm1(parm1), _parm2(parm2) {}
42 virtual void text_form(basis::base_string &fill) const {
43 fill.assign(text_form());
45 basis::astring text_form() const {
46 return basis::a_sprintf("os_event: msg=%d parm1=%d parm2=%d", _message, _parm1, _parm2);