Blender  V2.59
KX_NetworkEventManager.cpp
Go to the documentation of this file.
00001 /*
00002  * $Id: KX_NetworkEventManager.cpp 35171 2011-02-25 13:35:59Z jesterking $
00003  *
00004  * ***** BEGIN GPL LICENSE BLOCK *****
00005  *
00006  * This program is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU General Public License
00008  * as published by the Free Software Foundation; either version 2
00009  * of the License, or (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software Foundation,
00018  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00019  *
00020  * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
00021  * All rights reserved.
00022  *
00023  * The Original Code is: all of this file.
00024  *
00025  * Contributor(s): none yet.
00026  *
00027  * ***** END GPL LICENSE BLOCK *****
00028  * Ketsji Logic Extenstion: Network Event Manager generic implementation
00029  */
00030 
00036 // Ketsji specific sensor part
00037 #include "SCA_ISensor.h"
00038 
00039 // Ketsji specific network part
00040 #include "KX_NetworkEventManager.h"
00041 
00042 // Network module specific
00043 #include "NG_NetworkDeviceInterface.h"
00044 #include "NG_NetworkMessage.h"
00045 #include "NG_NetworkObject.h"
00046 
00047 KX_NetworkEventManager::KX_NetworkEventManager(class SCA_LogicManager*
00048 logicmgr, class NG_NetworkDeviceInterface *ndi) :
00049 SCA_EventManager(logicmgr, NETWORK_EVENTMGR), m_ndi(ndi)
00050 {
00051         //printf("KX_NetworkEventManager constructor\n");
00052 }
00053 
00054 KX_NetworkEventManager::~KX_NetworkEventManager()
00055 {
00056         //printf("KX_NetworkEventManager destructor\n");
00057 }
00058 
00059 void KX_NetworkEventManager::NextFrame()
00060 {
00061 // printf("KX_NetworkEventManager::proceed %.2f - %.2f\n", curtime, deltatime);
00062         // each frame, the logicmanager will call the network
00063         // eventmanager to look for network events, and process it's
00064         // 'network' sensors
00065         SG_DList::iterator<SCA_ISensor> it(m_sensors);
00066         for (it.begin();!it.end();++it)
00067         {
00068 //          printf("KX_NetworkEventManager::proceed sensor %.2f\n", curtime);
00069             // process queue
00070             (*it)->Activate(m_logicmgr);
00071         }
00072 
00073         // now a list of triggerer sensors has been built
00074 }
00075 
00076 void KX_NetworkEventManager::EndFrame()
00077 {
00078 }
00079