* Add some pretty printers to help debugging.
This commit is contained in:
jean.chalard
2009-09-04 13:22:15 +00:00
parent 2a7d6819bb
commit 2e7570fdea
15 changed files with 71 additions and 20 deletions

View File

@@ -113,7 +113,7 @@ void DuelLayers::Render(){
int DuelLayers::receiveEvent(WEvent * e){
#if 1
#define PRINT_IF(type) { type *foo = dynamic_cast<type*>(e); if (foo) cout << "Is a " << #type << endl; }
#define PRINT_IF(type) { type *foo = dynamic_cast<type*>(e); if (foo) cout << "Is a " #type " " << *foo << endl; }
cout << "Received event " << e << " ";
PRINT_IF(WEventZoneChange);
PRINT_IF(WEventDamage);