#include <ModuleAccess.h>
Public Member Functions | |
ModuleAccess (const char *n) | |
T * | get () |
T * | getIfExists () |
Private Attributes | |
const char * | name |
T * | p |
|
|
|
00057 { 00058 if (!p) 00059 { 00060 cModule *m = findModuleSomewhereUp(name, simulation.contextModule()); 00061 if (!m) opp_error("Module (%s)%s not found",opp_typename(typeid(T)),name); 00062 p = check_and_cast<T*>(m); 00063 } 00064 return p; 00065 }
|
|
00068 { 00069 if (!p) 00070 { 00071 cModule *m = findModuleSomewhereUp(name, simulation.contextModule()); 00072 p = dynamic_cast<T*>(m); 00073 } 00074 return p; 00075 }
|
|
|
|
|