Project

General

Profile

Statistics
| Branch: | Revision:

root / src / sim / parsim / cplaceholdermod.h @ 81ad8b66

History | View | Annotate | Download (2.02 KB)

1 01873262 Georg Kunz
//==========================================================================
2
//  CPLACEHOLDERMOD.H  -  header for
3
//
4
//                   OMNeT++/OMNEST
5
//           Discrete System Simulation in C++
6
//
7
//  Author: Andras Varga, 2003
8
//          Dept. of Electrical and Computer Systems Engineering,
9
//          Monash University, Melbourne, Australia
10
//
11
//==========================================================================
12
13
/*--------------------------------------------------------------*
14
  Copyright (C) 1992-2008 Andras Varga
15
  Copyright (C) 2006-2008 OpenSim Ltd.
16

17
  This file is distributed WITHOUT ANY WARRANTY. See the file
18
  `license' for details on this and other legal matters.
19
*--------------------------------------------------------------*/
20
21
#ifndef __CPLACEHOLDERMOD_H
22
#define __CPLACEHOLDERMOD_H
23
24
#include "cmodule.h"
25
#include "csimulation.h"
26
27
NAMESPACE_BEGIN
28
29
/**
30
 * In distributed parallel simulation, modules of the network
31
 * are distributed across partitions.
32
 *
33
 * Represents a module which was instantiated on a remote partition.
34
 *
35
 * @ingroup Parsim
36
 */
37
class SIM_API cPlaceholderModule : public cModule // so, noncopyable
38
{
39
  protected:
40
    // internal: "virtual ctor" for cGate: creates cProxyGate
41
    virtual cGate *createGateObject(cGate::Type type);
42
43
  public:
44
    /** @name Constructors, destructor, assignment. */
45
    //@{
46
    /**
47
     * Constructor. Note that module objects should not be created directly,
48
     * only via their cModuleType objects. See cModule constructor for more info.
49
     */
50
    cPlaceholderModule();
51
52
    /**
53
     * Destructor.
54
     */
55
    virtual ~cPlaceholderModule();
56
    //@}
57
58
    /** @name Redefined cModule functions */
59
    //@{
60
    /**
61
     * Redefined to return true.
62
     */
63
    virtual bool isPlaceholder() const  {return true;}
64
65
    /**
66
     * Not implemented: throws an exception when called.
67
     */
68
    virtual void arrived(cMessage *msg, cGate *ongate, simtime_t t);
69
70
    /**
71
     * Does nothing.
72
     */
73
    virtual void scheduleStart(simtime_t t);
74
    //@}
75
};
76
77
78
NAMESPACE_END
79
80
81
#endif