#include <PeerInfo.h>
Public Member Functions | |
PeerInfo (int moduleId) | |
bool | isBootstrapped () |
void | setBootstrapped (bool bootstrap=true) |
int | getModuleID () |
bool | isMalicious () |
Protected Attributes | |
bool | bootstrapped |
int | moduleId |
Friends | |
std::ostream & | operator<< (std::ostream &Stream, const PeerInfo info) |
PeerInfo::PeerInfo | ( | int | moduleId | ) |
int PeerInfo::getModuleID | ( | ) | [inline] |
bool PeerInfo::isBootstrapped | ( | ) | [inline] |
bool PeerInfo::isMalicious | ( | ) |
00033 { 00034 BaseOverlay* overlay = dynamic_cast<BaseOverlay*>(simulation.module(moduleId)); 00035 if(overlay==NULL) 00036 opp_error("Peer not associated with a BaseOverlay Module"); 00037 return overlay->isMalicious(); 00038 }
void PeerInfo::setBootstrapped | ( | bool | bootstrap = true |
) | [inline] |
std::ostream& operator<< | ( | std::ostream & | Stream, | |
const PeerInfo | info | |||
) | [friend] |
00041 { 00042 Stream << "ModuleId: " << info.moduleId << "Bootstrapped: "; 00043 if(info.bootstrapped) { 00044 return Stream << "true"; 00045 } 00046 else { 00047 return Stream << "false"; 00048 } 00049 }
bool PeerInfo::bootstrapped [protected] |
int PeerInfo::moduleId [protected] |