cvisitor.h Source File

API: cvisitor.h Source File
API
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
21namespace omnetpp {
22
23class cObject;
24
25
56class 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
cObject is a lightweight class which serves as the root of the OMNeT++ class hierarchy....
Definition cobject.h:93
Enables traversing the tree of (cObject-rooted) simulation objects.
Definition cvisitor.h:57
virtual void process(cObject *obj)
virtual ~cVisitor()
Definition cvisitor.h:62
virtual bool visit(cObject *obj)=0
virtual void processChildrenOf(cObject *obj)