OverlayAccess Class Reference

#include <OverlayAccess.h>

List of all members.


Detailed Description

Gives access to the overlay.

Public Member Functions

BaseOverlayget (cModule *refMod)

Member Function Documentation

BaseOverlay* OverlayAccess::get ( cModule *  refMod  )  [inline]

00040     {
00041         BaseOverlay* overlay = NULL;
00042         cModule* tmpMod = refMod;
00043 
00044         while (overlay == NULL) {
00045             cModule* subMod = tmpMod->submodule("overlay");
00046             if (subMod != NULL) {
00047                 overlay = dynamic_cast<BaseOverlay*>(tmpMod->parentModule()->
00048                         submodule("overlay"));
00049                 if (overlay == NULL) {
00050                     cGate* tmpGate = subMod->gate("from_app");
00051                     if (tmpGate != NULL) {
00052                         overlay = dynamic_cast<BaseOverlay*>(tmpGate->
00053                                 destinationGate()->ownerModule());
00054                     }
00055                 }
00056 
00057             }
00058             tmpMod = tmpMod->parentModule();
00059             if (tmpMod == NULL) {
00060                 throw new cException("OverlayAccess::get(): Overlay module "
00061                                      "not found!");
00062             }
00063         }
00064         return overlay;
00065     }


The documentation for this class was generated from the following file:
Generated on Thu Apr 17 13:19:29 2008 for ITM OverSim by  doxygen 1.5.3