A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
make-event.cc
Go to the documentation of this file.
1
#include "
make-event.h
"
2
#include "
log.h
"
3
4
NS_LOG_COMPONENT_DEFINE
(
"MakeEvent"
);
5
6
namespace
ns3 {
7
8
EventImpl
*
MakeEvent
(
void
(*f)(
void
))
9
{
10
NS_LOG_FUNCTION
(f);
11
// zero arg version
12
class
EventFunctionImpl0 :
public
EventImpl
13
{
14
public
:
15
typedef
void (*F)(void);
16
17
EventFunctionImpl0 (F
function
)
18
: m_function (
function
)
19
{
20
}
21
virtual
~EventFunctionImpl0 ()
22
{
23
}
24
protected
:
25
virtual
void
Notify (
void
)
26
{
27
(*m_function)();
28
}
29
private
:
30
F m_function;
31
} *ev =
new
EventFunctionImpl0 (f);
32
return
ev;
33
}
34
35
}
// namespace ns3
NS_LOG_FUNCTION
#define NS_LOG_FUNCTION(parameters)
Definition:
log.h:345
make-event.h
NS_LOG_COMPONENT_DEFINE
NS_LOG_COMPONENT_DEFINE("MakeEvent")
ns3::EventImpl
a simulation event
Definition:
event-impl.h:39
ns3::MakeEvent
EventImpl * MakeEvent(void(*f)(void))
Definition:
make-event.cc:8
log.h
src
core
model
make-event.cc
Generated on Sat Apr 19 2014 14:06:52 for ns-3 by
1.8.6