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
3
namespace
ns3 {
4
5
EventImpl
*
MakeEvent
(
void
(*f)(
void
))
6
{
7
// zero arg version
8
class
EventFunctionImpl0 :
public
EventImpl
9
{
10
public
:
11
typedef
void (*F)(void);
12
13
EventFunctionImpl0 (F
function
)
14
: m_function (
function
)
15
{
16
}
17
virtual
~EventFunctionImpl0 ()
18
{
19
}
20
protected
:
21
virtual
void
Notify (
void
)
22
{
23
(*m_function)();
24
}
25
private
:
26
F m_function;
27
} *ev =
new
EventFunctionImpl0 (f);
28
return
ev;
29
}
30
31
}
// namespace ns3
src
core
model
make-event.cc
Generated on Tue Oct 9 2012 16:45:34 for ns-3 by
1.8.1.2