SUMO - Simulation of Urban MObility
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
FuncBinding_IntParam.h
Go to the documentation of this file.
1
/****************************************************************************/
9
// �missingDescription�
10
/****************************************************************************/
11
// SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
12
// Copyright (C) 2001-2012 DLR (http://www.dlr.de/) and contributors
13
/****************************************************************************/
14
//
15
// This file is part of SUMO.
16
// SUMO is free software: you can redistribute it and/or modify
17
// it under the terms of the GNU General Public License as published by
18
// the Free Software Foundation, either version 3 of the License, or
19
// (at your option) any later version.
20
//
21
/****************************************************************************/
22
#ifndef FuncBinding_IntParam_h
23
#define FuncBinding_IntParam_h
24
25
26
27
// ===========================================================================
28
// included modules
29
// ===========================================================================
30
#ifdef _MSC_VER
31
#include <
windows_config.h
>
32
#else
33
#include <
config.h
>
34
#endif
35
36
#include <
utils/common/ValueSource.h
>
37
38
39
// ===========================================================================
40
// class definitions
41
// ===========================================================================
45
template
<
class
T,
typename
R >
46
class
FuncBinding_IntParam
:
public
ValueSource
<R> {
47
public
:
49
typedef
R(T::*
Operation
)(
int
)
const
;
50
51
FuncBinding_IntParam
(T* source,
Operation
operation,
52
size_t
param)
53
:
54
mySource
(source),
55
myOperation
(operation),
56
myParam
(param) {}
57
59
~FuncBinding_IntParam
() {}
60
61
SUMOReal
getValue
()
const
{
62
return
(
mySource
->*
myOperation
)(
myParam
);
63
}
64
65
ValueSource<R>
*
copy
()
const
{
66
return
new
FuncBinding_IntParam<T, R>
(
67
mySource
,
myOperation
,
myParam
);
68
}
69
70
ValueSource<SUMOReal>
*
makeSUMORealReturningCopy
()
const
{
71
return
new
FuncBinding_IntParam<T, SUMOReal>
(
mySource
,
myOperation
,
myParam
);
72
}
73
74
protected
:
75
76
private
:
78
T*
mySource
;
79
81
Operation
myOperation
;
82
83
int
myParam
;
84
85
};
86
87
88
#endif
89
90
/****************************************************************************/
91
var
build
temp
tmp.znCyBrHNjL
4.0-0-0
sumo
sumo-0.15.0~dfsg
src
microsim
logging
FuncBinding_IntParam.h
Generated on Mon Mar 24 2014 09:53:08 for SUMO - Simulation of Urban MObility by
1.8.1.2