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

Public Member Functions | List of all members
Hazelnp::VoidValue Class Reference

Specializations for void values. More...

`#include <VoidValue.h>`

Inheritance diagram for Hazelnp::VoidValue:
[legend]
Collaboration diagram for Hazelnp::VoidValue:
[legend]

## Public Member Functions
| VoidValue ()
| ~VoidValue () override
Value * | Deepcopy () const override
| Will return a deeopopy of this object. More...
std::string | GetAsOsString () const override
| Will return a string suitable for an std::ostream;. More...
long long int | GetInt64 () const override
| Throws HazelnuppValueNotConvertibleException. More...
int | GetInt32 () const override
| Throws HazelnuppValueNotConvertibleException. More...
long double | GetFloat64 () const override
| Throws HazelnuppValueNotConvertibleException. More...
double | GetFloat32 () const override
| Throws HazelnuppValueNotConvertibleException. More...
std::string | GetString () const override
| Returns an empty string. More...
const std::vector< Value * > & | GetList () const
| Returns an empty list. More...
Public Member Functions inherited from Hazelnp::Value
virtual | ~Value ()
DATA_TYPE | GetDataType () const
| Will return the data type of this value. More...

## Additional Inherited Members
Protected Member Functions inherited from Hazelnp::Value
| Value (DATA_TYPE type)
Protected Attributes inherited from Hazelnp::Value
DATA_TYPE | type

## Detailed Description

Specializations for void values.

These house no value whatsoever, but only communicate information by merely existing.

Definition at line 8 of file VoidValue.h.

## Constructor & Destructor Documentation

## ◆ VoidValue()

VoidValue::VoidValue | ( |  | ) |

Definition at line 6 of file VoidValue.cpp.

7 :
8 Value(DATA_TYPE::VOID)
9 {
10 return;
11 }

## ◆ ~VoidValue()

Hazelnp::VoidValue::~VoidValue | ( |  | ) |
| inline override

Definition at line 12 of file VoidValue.h.

12 {};

## Member Function Documentation

## ◆ Deepcopy()

Value * VoidValue::Deepcopy | ( |  | ) | const
| override virtual

Will return a deeopopy of this object.

Implements Hazelnp::Value.

Definition at line 13 of file VoidValue.cpp.

14 {
15 return new VoidValue();
16 }

## ◆ GetAsOsString()

std::string VoidValue::GetAsOsString | ( |  | ) | const
| override virtual

Will return a string suitable for an std::ostream;.

Implements Hazelnp::Value.

Definition at line 18 of file VoidValue.cpp.

19 {
20 return "VoidValue";
21 }

## ◆ GetFloat32()

double VoidValue::GetFloat32 | ( |  | ) | const
| override virtual

Throws HazelnuppValueNotConvertibleException.

Implements Hazelnp::Value.

Definition at line 40 of file VoidValue.cpp.

41 {
42 throw HazelnuppValueNotConvertibleException();
43 }

## ◆ GetFloat64()

long double VoidValue::GetFloat64 | ( |  | ) | const
| override virtual

Throws HazelnuppValueNotConvertibleException.

Implements Hazelnp::Value.

Definition at line 35 of file VoidValue.cpp.

36 {
37 throw HazelnuppValueNotConvertibleException();
38 }

## ◆ GetInt32()

int VoidValue::GetInt32 | ( |  | ) | const
| override virtual

Throws HazelnuppValueNotConvertibleException.

Implements Hazelnp::Value.

Definition at line 30 of file VoidValue.cpp.

31 {
32 throw HazelnuppValueNotConvertibleException();
33 }

## ◆ GetInt64()

long long int VoidValue::GetInt64 | ( |  | ) | const
| override virtual

Throws HazelnuppValueNotConvertibleException.

Implements Hazelnp::Value.

Definition at line 25 of file VoidValue.cpp.

26 {
27 throw HazelnuppValueNotConvertibleException();
28 }

## ◆ GetList()

const std::vector< Value * > & VoidValue::GetList | ( |  | ) | const
| virtual

Returns an empty list.

Implements Hazelnp::Value.

Definition at line 50 of file VoidValue.cpp.

51 {
52 static const std::vector<Value*> empty;
53 return empty;
54 }

## ◆ GetString()

std::string VoidValue::GetString | ( |  | ) | const
| override virtual

Returns an empty string.

Implements Hazelnp::Value.

Definition at line 45 of file VoidValue.cpp.

46 {
47 return "";
48 }

The documentation for this class was generated from the following files:

- Hazelnupp/VoidValue.h
- Hazelnupp/VoidValue.cpp

Hazelnp::DATA_TYPE::VOID
@ VOID
Hazelnp::Value::Value
Value(DATA_TYPE type)
Definition: Value.cpp:5
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