examples/eqNBody/configEvent.cpp

00001 /*
00002  * Copyright (c) 2009, Philippe Robert <probert@eyescale.ch> 
00003  *
00004  * This library is free software; you can redistribute it and/or modify it under
00005  * the terms of the GNU Lesser General Public License version 2.1 as published
00006  * by the Free Software Foundation.
00007  *  
00008  * This library is distributed in the hope that it will be useful, but WITHOUT
00009  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00010  * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
00011  * details.
00012  * 
00013  * You should have received a copy of the GNU Lesser General Public License
00014  * along with this library; if not, write to the Free Software Foundation, Inc.,
00015  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
00016  */
00017 
00018 #include "configEvent.h"
00019 
00020 using namespace std;
00021 
00022 namespace eqNbody
00023 {   
00024     ConfigEvent::ConfigEvent() : _proxyID(0)
00025     {
00026         _range[0] = _range[1] = 0.0f;
00027         size = sizeof( ConfigEvent );
00028     }
00029     
00030     std::ostream& operator << ( std::ostream& os, const ConfigEvent* event )
00031     {
00032         switch( event->data.type )
00033         {
00034             case ConfigEvent::DATA_CHANGED:
00035                 os << "datachanged";
00036                 break;
00037 
00038             case ConfigEvent::PROXY_CHANGED:
00039                 os << "proxychanged";
00040                 break;
00041                 
00042             default:
00043                 os << static_cast< const eq::ConfigEvent* >( event );
00044                 return os;
00045         }
00046                         
00047         return os;
00048     }
00049     
00050 }
Generated on Mon Aug 10 18:58:32 2009 for Equalizer 0.9 by  doxygen 1.5.8