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

Public Member Functions | Friends | List of all members
Parameter Class Reference

`#include <Parameter.h>`

## Public Member Functions
| Parameter (const std::string &key, const Value *value)
| ~Parameter ()
const std::string & | Key () const
| Will return the key of this parameter. More...
const Value * | GetValue () const
| Will return the value of this parameter. More...

## Friends
std::ostream & | operator<< (std::ostream &os, const Parameter &p)

## Detailed Description

Definition at line 6 of file Parameter.h.

## Constructor & Destructor Documentation

## ◆ Parameter()

Parameter::Parameter | ( | const std::string & | key,
|  | const Value * | value
| ) |  |
| explicit

Definition at line 3 of file Parameter.cpp.

4 :
5 key{ key }
6 {
7 this->value = value->Deepcopy();
8 return;
9 }

## ◆ ~Parameter()

Parameter::~Parameter | ( |  | ) |

Definition at line 11 of file Parameter.cpp.

12 {
13 delete value;
14 value = nullptr;
15
16 return;
17 }

## Member Function Documentation

## ◆ GetValue()

const ::Value * Parameter::GetValue | ( |  | ) | const

Will return the value of this parameter.

Definition at line 24 of file Parameter.cpp.

25 {
26 return value;
27 }

## ◆ Key()

const std::string & Parameter::Key | ( |  | ) | const

Will return the key of this parameter.

Definition at line 19 of file Parameter.cpp.

20 {
21 return key;
22 }

## Friends And Related Function Documentation

## ◆ operator<<

std::ostream& operator<< | ( | std::ostream & | os,
|  | const Parameter & | p
| ) |  |
| friend

Definition at line 18 of file Parameter.h.

19 {
20 return os << "{ Key: \"" << p.key << "\" -> " << *p.value << " }";
21 }

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

- Hazelnupp/Parameter.h
- Hazelnupp/Parameter.cpp

Value::Deepcopy
virtual Value * Deepcopy() const =0
Will return a deeopopy of this object.