00001 /*
00002 * Custom Marshals for Signal handling
00003 * - I'd swear marshal is actually spelt marshall
00004 * maybe it's a weird Americanism :-)
00005 *
00006 * Copyright (C) 2001 Barnaby Gray <barnaby@beedesign.co.uk>
00007 *
00008 * This library is free software; you can redistribute it and/or
00009 * modify it under the terms of the GNU Lesser General Public
00010 * License as published by the Free Software Foundation; either
00011 * version 2.1 of the License, or (at your option) any later version.
00012 *
00013 * This library is distributed in the hope that it will be useful,
00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00016 * Lesser General Public License for more details.
00017 *
00018 * You should have received a copy of the GNU Lesser General Public
00019 * License along with this library; if not, write to the Free Software
00020 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
00021 *
00022 */
00023
00024 #ifndef CUSTOM_MARSHAL_H
00025 #define CUSTOM_MARSHAL_H
00026
00027 class StopOnTrueMarshal {
00028 public:
00029
00030 typedef bool InType;
00031 typedef bool OutType;
00032 OutType ret_val;
00033
00034 StopOnTrueMarshal() : ret_val(false) {}
00035
00036 OutType value() { return ret_val; }
00037 static OutType default_value() { return false; }
00038 bool marshal(const InType& val) { ret_val = val; return val; }
00039
00040 };
00041
00042 #endif
00043
00044
1.2.16