Leonetienne/Hazelnupp
Simple, easy to use, command line parameter interface
Parameter.cpp
Go to the documentation of this file.
1 #include "Parameter.h"
2 
3 using namespace Hazelnp;
4 
5 Parameter::Parameter(const std::string& key, const ::Value* value)
6  :
7  key{ key }
8 {
9  this->value = value->Deepcopy();
10  return;
11 }
12 
14 {
15  delete value;
16  value = nullptr;
17 
18  return;
19 }
20 
21 const std::string& Parameter::Key() const
22 {
23  return key;
24 }
25 
26 const ::Value* Parameter::GetValue() const
27 {
28  return value;
29 }
const std::string & Key() const
Will return the key of this parameter.
Definition: Parameter.cpp:21
Parameter(const std::string &key, const Value *value)
Definition: Parameter.cpp:5
virtual Value * Deepcopy() const =0
Will return a deeopopy of this object.
const Value * GetValue() const
Will return the value of this parameter.
Definition: Parameter.cpp:26