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
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
make-event.cc
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:311
NS_LOG_COMPONENT_DEFINE
#define NS_LOG_COMPONENT_DEFINE(name)
Definition:
log.h:122
src
core
model
make-event.cc
Generated on Sun Mar 16 2014 11:25:02 for ns-3 by
1.8.6