| Leonetienne/Hazelnupp Simple, easy to use, command line parameter interface

VoidValue.cpp
Go to the documentation of this file.
1 #include "VoidValue.h"
2 #include "HazelnuppException.h"
3
4 using namespace Hazelnp;
5
6 VoidValue::VoidValue()
7 :
8 Value(DATA_TYPE::VOID)
9 {
10 return;
11 }
12
13 Value* VoidValue::Deepcopy() const
14 {
15 return new VoidValue();
16 }
17
18 std::string VoidValue::GetAsOsString() const
19 {
20 return "VoidValue";
21 }
22
23
24
25 long long int VoidValue::GetInt64() const
26 {
27 throw HazelnuppValueNotConvertibleException();
28 }
29
30 int VoidValue::GetInt32() const
31 {
32 throw HazelnuppValueNotConvertibleException();
33 }
34
35 long double VoidValue::GetFloat64() const
36 {
37 throw HazelnuppValueNotConvertibleException();
38 }
39
40 double VoidValue::GetFloat32() const
41 {
42 throw HazelnuppValueNotConvertibleException();
43 }
44
45 std::string VoidValue::GetString() const
46 {
47 return "";
48 }
49
50 const std::vector<Value*>& VoidValue::GetList() const
51 {
52 static const std::vector<Value*> empty;
53 return empty;
54 }
HazelnuppException.h
Hazelnp
Definition: CmdArgsInterface.h:7
Hazelnp::VoidValue::GetInt64
long long int GetInt64() const override
Throws HazelnuppValueNotConvertibleException.
Definition: VoidValue.cpp:25
Hazelnp::VoidValue::GetFloat64
long double GetFloat64() const override
Throws HazelnuppValueNotConvertibleException.
Definition: VoidValue.cpp:35
Hazelnp::DATA_TYPE::VOID
@ VOID
Hazelnp::VoidValue::GetAsOsString
std::string GetAsOsString() const override
Will return a string suitable for an std::ostream;.
Definition: VoidValue.cpp:18
Hazelnp::Value
Abstract class for values.
Definition: Value.h:10
Hazelnp::VoidValue::GetList
const std::vector< Value * > & GetList() const
Returns an empty list.
Definition: VoidValue.cpp:50
Hazelnp::VoidValue::GetInt32
int GetInt32() const override
Throws HazelnuppValueNotConvertibleException.
Definition: VoidValue.cpp:30
VoidValue.h
Hazelnp::VoidValue::Deepcopy
Value * Deepcopy() const override
Will return a deeopopy of this object.
Definition: VoidValue.cpp:13
Hazelnp::VoidValue::GetString
std::string GetString() const override
Returns an empty string.
Definition: VoidValue.cpp:45
Hazelnp::DATA_TYPE
DATA_TYPE
The different data types a paramater can be.
Definition: DataType.h:8
Hazelnp::VoidValue::GetFloat32
double GetFloat32() const override
Throws HazelnuppValueNotConvertibleException.
Definition: VoidValue.cpp:40
Hazelnp::VoidValue::VoidValue
VoidValue()
Definition: VoidValue.cpp:6
Hazelnp::HazelnuppValueNotConvertibleException
Gets thrown when an attempt is made to retrieve the wrong data type from a value, when the value not ...
Definition: HazelnuppException.h:38