OMNeT++ Simulation Library  6.0.3
cvisitor.h
1 //==========================================================================
2 // CVISITOR.H - part of
3 // OMNeT++/OMNEST
4 // Discrete System Simulation in C++
5 //
6 //==========================================================================
7 
8 /*--------------------------------------------------------------*
9  Copyright (C) 1992-2017 Andras Varga
10  Copyright (C) 2006-2017 OpenSim Ltd.
11 
12  This file is distributed WITHOUT ANY WARRANTY. See the file
13  `license' for details on this and other legal matters.
14 *--------------------------------------------------------------*/
15 
16 #ifndef __OMNETPP_CVISITOR_H
17 #define __OMNETPP_CVISITOR_H
18 
19 #include "simkerneldefs.h"
20 
21 namespace omnetpp {
22 
23 class cObject;
24 
25 
56 class SIM_API cVisitor
57 {
58  public:
62  virtual ~cVisitor() {}
63 
67  virtual void process(cObject *obj);
68 
73  virtual void processChildrenOf(cObject *obj);
74 
87  virtual bool visit(cObject *obj) = 0;
88 };
89 
90 } // namespace omnetpp
91 
92 
93 #endif
94 
95 
omnetpp::cObject
cObject is a lightweight class which serves as the root of the OMNeT++ class hierarchy....
Definition: cobject.h:92
omnetpp::cVisitor
Enables traversing the tree of (cObject-rooted) simulation objects.
Definition: cvisitor.h:56
omnetpp::cVisitor::~cVisitor
virtual ~cVisitor()
Definition: cvisitor.h:62