2 * Copyright (c) 2012-2014, TU Delft
3 * Copyright (c) 2012-2014, TU Eindhoven
4 * Copyright (c) 2012-2014, TU Kaiserslautern
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions are
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in the
16 * documentation and/or other materials provided with the distribution.
18 * 3. Neither the name of the copyright holder nor the names of its
19 * contributors may be used to endorse or promote products derived from
20 * this software without specific prior written permission.
22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
23 * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
24 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
25 * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
26 * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
28 * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
29 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
30 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
31 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 * Authors: Andreas Hansson
38 #ifndef DATA_PARAMETER_H
39 #define DATA_PARAMETER_H
47 Parameter(const std::string
& id
, const std::string
& type
,
48 const std::string
& value
);
50 std::string
getId() const;
51 std::string
getType() const;
52 std::string
getValue() const;
54 int getIntValue() const;
55 unsigned int getUIntValue() const;
56 size_t getSizeTValue() const;
57 double getDoubleValue() const;
58 bool getBoolValue() const;
60 operator int() const {
64 operator unsigned int() const {
65 return getUIntValue();
70 operator size_t() const {
71 return getSizeTValue();
75 operator double() const {
76 return getDoubleValue();
79 operator bool() const {
80 return getBoolValue();
83 operator std::string() const {
93 Parameter
HexParameter(const std::string
& id
,
96 Parameter
StringParameter(const std::string
& id
,
97 const std::string
& value
);
99 std::ostream
& operator<<(std::ostream
& os
,
100 const Parameter
& parameter
);
102 #endif // ifndef DATA_PARAMETER_H