Parameter.h
Go to the documentation of this file.
#pragma once
#include "Value.h"
#include <string>
#include <ostream>
namespace Hazelnp
{
class Parameter
{
public:
explicit Parameter(const std::string& key, const Value* value);
~Parameter();
const std::string& Key() const;
const Value* GetValue() const;
friend std::ostream& operator<< (std::ostream& os, const Parameter& p)
{
return os << "{ Key: \"" << p.key << "\" -> " << *p.value << " }";
}
private:
std::string key;
Hazelnp::Value* value;
};
}
Hazelnp
Definition: DataType.h:3
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