Leonetienne/Hazelnupp
Simple, easy to use, command line parameter interface
Hazelnupp
Parameter.h
Go to the documentation of this file.
1
#pragma once
2
#include "
Value.h
"
3
#include <string>
4
#include <ostream>
5
6
namespace
Hazelnp
7
{
8
class
Parameter
9
{
10
public
:
11
explicit
Parameter
(
const
std::string& key,
const
Value
* value);
12
~Parameter
();
13
14
//! Will return the key of this parameter
15
const
std::string&
Key
()
const
;
16
17
//! Will return the value of this parameter
18
const
Value
*
GetValue
()
const
;
19
20
friend
std::ostream&
operator<<
(std::ostream& os,
const
Parameter
& p)
21
{
22
return
os <<
"{ Key: \""
<< p.key <<
"\" -> "
<< *p.value <<
" }"
;
23
}
24
25
private
:
26
std::string key;
27
Hazelnp::Value
* value;
28
};
29
}
Hazelnp
Definition:
CmdArgsInterface.h:9
Hazelnp::Parameter::~Parameter
~Parameter()
Definition:
Parameter.cpp:13
Hazelnp::Value
Abstract class for values.
Definition:
Value.h:10
Hazelnp::Parameter
Definition:
Parameter.h:8
Hazelnp::Parameter::GetValue
const Value * GetValue() const
Will return the value of this parameter.
Definition:
Parameter.cpp:26
Hazelnp::Parameter::Key
const std::string & Key() const
Will return the key of this parameter.
Definition:
Parameter.cpp:21
Hazelnp::Parameter::Parameter
Parameter(const std::string &key, const Value *value)
Definition:
Parameter.cpp:5
Hazelnp::Parameter::operator<<
friend std::ostream & operator<<(std::ostream &os, const Parameter &p)
Definition:
Parameter.h:20
Value.h
Generated on Sun Sep 5 2021 13:00:17 for Leonetienne/Hazelnupp by
1.8.17