Changeset 8863
- Timestamp:
- Aug 24, 2011, 1:17:36 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/libraries/core/Super.h
r8858 r8863 117 117 ((ClassIdentifier<T>*)(*it))->superFunctionCaller_##functionname##_ = new SuperFunctionClassCaller_##functionname <T>; \ 118 118 } \ 119 else if (((ClassIdentifier<T>*)(*it))->superFunctionCaller_##functionname##_->getParentIdentifier() != ClassIdentifier<T>::getIdentifier()) \ 120 orxout(internal_warning, context::super) << "SuperFunctionCaller for " << #functionname << " in " << ((ClassIdentifier<T>*)(*it))->getName() << " calls function of " << ((ClassIdentifier<T>*)(*it))->superFunctionCaller_##functionname##_->getParentIdentifier()->getName() << " but " << ClassIdentifier<T>::getIdentifier()->getName() << " is also possible (do you use multiple inheritance?)" << endl; \ 119 121 } \ 120 122 } \ … … 187 189 ((ClassIdentifier<T>*)(*it))->superFunctionCaller_##functionname##_ = new SuperFunctionClassCaller_##functionname <T>; 188 190 } 191 192 // If there is already a caller, but for another parent, print a warning 193 else if (((ClassIdentifier<T>*)(*it))->superFunctionCaller_##functionname##_->getParentIdentifier() != ClassIdentifier<T>::getIdentifier()) 194 orxout(internal_warning, context::super) << "SuperFunctionCaller for " << #functionname << " in " << ((ClassIdentifier<T>*)(*it))->getName() << " calls function of " << ((ClassIdentifier<T>*)(*it))->superFunctionCaller_##functionname##_->getParentIdentifier()->getName() << " but " << ClassIdentifier<T>::getIdentifier()->getName() << " is also possible (do you use multiple inheritance?)" << endl; 189 195 } 190 196 } … … 347 353 virtual void operator()( SUPER_CALL_ARGUMENTS##hasarguments(__VA_ARGS__) ) = 0; \ 348 354 virtual ~SuperFunctionCaller_##functionname () {} \ 355 virtual Identifier* getParentIdentifier() const = 0; \ 349 356 }; \ 350 357 \ … … 355 362 inline void operator()( SUPER_CALL_ARGUMENTS##hasarguments(__VA_ARGS__) ) \ 356 363 { \ 364 } \ 365 \ 366 Identifier* getParentIdentifier() const \ 367 { \ 368 return ClassIdentifier<T>::getIdentifier(); \ 357 369 } \ 358 370 }; \ … … 400 412 ; \ 401 413 } \ 414 \ 415 Identifier* getParentIdentifier() const \ 416 { \ 417 return ClassIdentifier<T>::getIdentifier(); \ 418 } \ 402 419 }; 403 420 … … 433 450 virtual void operator()( SUPER_CALL_ARGUMENTS##hasarguments(__VA_ARGS__) ) = 0; 434 451 virtual ~SuperFunctionCaller_##functionname () {} 452 virtual Identifier* getParentIdentifier() const = 0; 435 453 }; 436 454 … … 443 461 inline void operator()( SUPER_CALL_ARGUMENTS##hasarguments(__VA_ARGS__) ) 444 462 { 463 } 464 465 Identifier* getParentIdentifier() const 466 { 467 return ClassIdentifier<T>::getIdentifier(); 445 468 } 446 469 }; … … 486 509 { 487 510 (dynamic_cast<T*>(object))->T:: functionname ( Call the function with it's arguments ); 511 } 512 513 Identifier* getParentIdentifier() const 514 { 515 return ClassIdentifier<T>::getIdentifier(); 488 516 } 489 517 }
Note: See TracChangeset
for help on using the changeset viewer.