Statistics
| Branch: | Revision:

root / include / ccompoundmodule.h @ ffa9279f

History | View | Annotate | Download (1.91 KB)

1 01873262 Georg Kunz
//==========================================================================
2
//   CCOMPOUNDMODULE.H  -  header for
3
//                     OMNeT++/OMNEST
4
//            Discrete System Simulation in C++
5
//
6
//==========================================================================
7
8
/*--------------------------------------------------------------*
9
  Copyright (C) 1992-2008 Andras Varga
10
  Copyright (C) 2006-2008 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 __CCOMPOUNDMODULE_H
17
#define __CCOMPOUNDMODULE_H
18
19
#include "cmodule.h"
20
21
NAMESPACE_BEGIN
22
23
24
/**
25
 * Represents a compound module in the simulation.
26
 *
27
 * @ingroup SimCore
28
 */
29
class SIM_API cCompoundModule : public cModule //implies noncopyable
30
{
31
    friend class TCompoundModInspector;
32
33
  protected:
34
    // overridden to delegate job to cModuleType
35
    virtual void doBuildInside();
36
37
    // internal use
38
    virtual void arrived(cMessage *msg, cGate *ongate, simtime_t t);
39
40
  public:
41
    /** @name Constructors, destructor, assignment. */
42
    //@{
43
    /**
44
     * Constructor. Note that module objects should not be created directly,
45
     * only via their cModuleType objects. See cModule constructor for more info.
46
     */
47
    cCompoundModule();
48
49
    /**
50
     * Destructor.
51
     */
52
    virtual ~cCompoundModule();
53
    //@}
54
55
    /** @name Redefined cObject member functions. */
56
    //@{
57
    /**
58
     * Produces a one-line description of the object's contents.
59
     * See cObject for more details.
60
     */
61
    virtual std::string info() const;
62
    //@}
63
64
    /** @name Redefined cModule functions. */
65
    //@{
66
67
    /**
68
     * Calls scheduleStart() recursively for all its (immediate)
69
     * submodules. This is used with dynamically created modules.
70
     */
71
    virtual void scheduleStart(simtime_t t);
72
    //@}
73
};
74
75
NAMESPACE_END
76
77
78
#endif