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_StringParam.h
Go to the documentation of this file.
1
/****************************************************************************/
8
// »missingDescription«
9
/****************************************************************************/
10
// SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
11
// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors
12
/****************************************************************************/
13
//
14
// This file is part of SUMO.
15
// SUMO is free software: you can redistribute it and/or modify
16
// it under the terms of the GNU General Public License as published by
17
// the Free Software Foundation, either version 3 of the License, or
18
// (at your option) any later version.
19
//
20
/****************************************************************************/
21
#ifndef FuncBinding_StringParam_h
22
#define FuncBinding_StringParam_h
23
24
25
// ===========================================================================
26
// included modules
27
// ===========================================================================
28
#ifdef _MSC_VER
29
#include <
windows_config.h
>
30
#else
31
#include <
config.h
>
32
#endif
33
34
#include <
utils/common/ValueSource.h
>
35
36
37
// ===========================================================================
38
// class definitions
39
// ===========================================================================
43
template
<
class
T,
typename
R >
44
class
FuncBinding_StringParam
:
public
ValueSource
<R> {
45
public
:
47
typedef
R(T::*
Operation
)(
const
std::string&)
const
;
48
49
FuncBinding_StringParam
(T* source,
Operation
operation,
50
const
std::string& param)
51
:
52
mySource
(source),
53
myOperation
(operation),
54
myParam
(param) {}
55
57
~FuncBinding_StringParam
() {}
58
59
R
getValue
()
const
{
60
return
(
mySource
->*
myOperation
)(
myParam
);
61
}
62
63
ValueSource<R>
*
copy
()
const
{
64
return
new
FuncBinding_StringParam<T, R>
(
65
mySource
,
myOperation
,
myParam
);
66
}
67
68
ValueSource<SUMOReal>
*
makeSUMORealReturningCopy
()
const
{
69
throw
1;
70
}
71
72
73
protected
:
74
75
private
:
77
T*
mySource
;
78
80
Operation
myOperation
;
81
82
std::string
myParam
;
83
84
};
85
86
87
#endif
88
89
/****************************************************************************/
90
home
gladk
tmp
05
sumo-0.17.1~dfsg
src
microsim
logging
FuncBinding_StringParam.h
Generated on Sun Jun 16 2013 07:07:02 for SUMO - Simulation of Urban MObility by
1.8.1.2