00001 00002 /* 00003 * Copyright (c) 2006-2009, Stefan Eilemann <eile@equalizergraphics.com> 00004 * 00005 * This library is free software; you can redistribute it and/or modify it under 00006 * the terms of the GNU Lesser General Public License version 2.1 as published 00007 * by the Free Software Foundation. 00008 * 00009 * This library is distributed in the hope that it will be useful, but WITHOUT 00010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 00011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 00012 * details. 00013 * 00014 * You should have received a copy of the GNU Lesser General Public License 00015 * along with this library; if not, write to the Free Software Foundation, Inc., 00016 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 00017 */ 00018 00019 #ifndef EQNET_COMMANDRESULT_H 00020 #define EQNET_COMMANDRESULT_H 00021 00022 #include <iostream> 00023 00024 namespace eq 00025 { 00026 namespace net 00027 { 00028 enum CommandResult 00029 { 00030 COMMAND_HANDLED, 00031 COMMAND_DISCARD, 00032 COMMAND_ERROR 00033 }; 00034 inline std::ostream& operator << ( std::ostream& os, 00035 const CommandResult& result ) 00036 { 00037 os << ( result == COMMAND_HANDLED ? "handled" : 00038 result == COMMAND_DISCARD ? "discard" : 00039 result == COMMAND_ERROR ? "error" : "UNKNOWN" ); 00040 return os; 00041 } 00042 } 00043 } 00044 00045 #endif // EQNET_COMMANDRESULT_H
0.9.1 by
1.6.1