PeerInfo.cc

Go to the documentation of this file.
00001 // Copyright (C) 2006 Institut fuer Telematik, Universitaet Karlsruhe (TH)
00002 //
00003 // This program is free software; you can redistribute it and/or
00004 // modify it under the terms of the GNU General Public License
00005 // as published by the Free Software Foundation; either version 2
00006 // of the License, or (at your option) any later version.
00007 //
00008 // This program is distributed in the hope that it will be useful,
00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00011 // GNU General Public License for more details.
00012 //
00013 // You should have received a copy of the GNU General Public License
00014 // along with this program; if not, write to the Free Software
00015 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00016 //
00017 
00024 #include "PeerInfo.h"
00025 
00026 PeerInfo::PeerInfo(uint32_t type, int moduleId)
00027 {
00028     bootstrapped = false;
00029     malicious = false;
00030     this->moduleId = moduleId;
00031     this->type = type;
00032 }
00033 
00034 void PeerInfo::dummy() {}
00035 
00036 //public
00037 
00038 std::ostream& operator<<(std::ostream& Stream, const PeerInfo info)
00039 {
00040     Stream  << "ModuleId: " << info.moduleId << "Bootstrapped: ";
00041     if(info.bootstrapped) {
00042         return Stream << "true";
00043     }
00044     else {
00045         return Stream << "false";
00046     }
00047 }
00048 

Generated on Wed Mar 25 16:32:49 2009 for OverSim by  doxygen 1.5.5