From 781e04612232bc803b2d5fea80e93559dca5178c Mon Sep 17 00:00:00 2001 From: Leonetienne Date: Thu, 3 Jun 2021 11:32:00 +0200 Subject: [PATCH] added more comments --- Hazelnupp/DataType.h | 2 ++ Hazelnupp/FloatValue.h | 2 ++ Hazelnupp/Hazelnupp.h | 2 ++ Hazelnupp/IntValue.h | 2 ++ Hazelnupp/ListValue.h | 2 ++ Hazelnupp/ParamConstraint.h | 6 ++++-- Hazelnupp/StringTools.h | 5 ++--- Hazelnupp/StringValue.h | 2 ++ Hazelnupp/Value.h | 2 ++ Hazelnupp/VoidValue.h | 2 ++ 10 files changed, 22 insertions(+), 5 deletions(-) diff --git a/Hazelnupp/DataType.h b/Hazelnupp/DataType.h index bb40833..94c7183 100644 --- a/Hazelnupp/DataType.h +++ b/Hazelnupp/DataType.h @@ -1,5 +1,7 @@ #pragma once +/** The different data types a paramater can be +*/ enum class DATA_TYPE { VOID, diff --git a/Hazelnupp/FloatValue.h b/Hazelnupp/FloatValue.h index 816d233..0a63a30 100644 --- a/Hazelnupp/FloatValue.h +++ b/Hazelnupp/FloatValue.h @@ -2,6 +2,8 @@ #include "Value.h" #include +/** Specializations for floating point values (uses long double) +*/ class FloatValue : public Value { public: diff --git a/Hazelnupp/Hazelnupp.h b/Hazelnupp/Hazelnupp.h index 2e44b4d..6aee1a7 100644 --- a/Hazelnupp/Hazelnupp.h +++ b/Hazelnupp/Hazelnupp.h @@ -4,6 +4,8 @@ #include #include +/** The main class to interface with +*/ class Hazelnupp { public: diff --git a/Hazelnupp/IntValue.h b/Hazelnupp/IntValue.h index 4461d9d..d247b27 100644 --- a/Hazelnupp/IntValue.h +++ b/Hazelnupp/IntValue.h @@ -1,6 +1,8 @@ #pragma once #include "Value.h" +/** Specializations for integer values (uses long long int) +*/ class IntValue : public Value { public: diff --git a/Hazelnupp/ListValue.h b/Hazelnupp/ListValue.h index 9c10d90..25169e4 100644 --- a/Hazelnupp/ListValue.h +++ b/Hazelnupp/ListValue.h @@ -2,6 +2,8 @@ #include "Value.h" #include +/** Specializations for list values (uses std::vector) +*/ class ListValue : public Value { public: diff --git a/Hazelnupp/ParamConstraint.h b/Hazelnupp/ParamConstraint.h index dc1bd5b..d7ec74f 100644 --- a/Hazelnupp/ParamConstraint.h +++ b/Hazelnupp/ParamConstraint.h @@ -9,7 +9,8 @@ public: //! Empty constructor ParamConstraint() = default; - //! Constructs a require constraint + //! Constructs a require constraint. + //! Think of the default value like of a list ofparameters. Like {"--width", "800"} static ParamConstraint Require(const std::string& key, const std::vector& defaultValue = {}, bool required = true) { ParamConstraint pc; @@ -54,7 +55,8 @@ public: DATA_TYPE wantedType = DATA_TYPE::VOID; //! The default value for this parameter. - //! Gets applied if this parameter was not given. + //! Gets applied if this parameter was not given. + //! Think of this like a list of parameters. Like {"--width", "800"} std::vector defaultValue; //! If set to true, and no default value set, diff --git a/Hazelnupp/StringTools.h b/Hazelnupp/StringTools.h index 4e984f5..5963842 100644 --- a/Hazelnupp/StringTools.h +++ b/Hazelnupp/StringTools.h @@ -4,9 +4,8 @@ #include #include -/// -/// Internal helper class. Feel free to use it tho, lol -/// +/** Internal helper class. Feel free to use it tho. +*/ class StringTools { public: diff --git a/Hazelnupp/StringValue.h b/Hazelnupp/StringValue.h index 2fc7ad5..87baafd 100644 --- a/Hazelnupp/StringValue.h +++ b/Hazelnupp/StringValue.h @@ -2,6 +2,8 @@ #include "Value.h" #include +/** Specializations for string values (uses std::string) +*/ class StringValue : public Value { public: diff --git a/Hazelnupp/Value.h b/Hazelnupp/Value.h index dc8a5ad..88300e4 100644 --- a/Hazelnupp/Value.h +++ b/Hazelnupp/Value.h @@ -3,6 +3,8 @@ #include #include +/** Abstract class for values +*/ class Value { public: diff --git a/Hazelnupp/VoidValue.h b/Hazelnupp/VoidValue.h index ec48a1c..58019d3 100644 --- a/Hazelnupp/VoidValue.h +++ b/Hazelnupp/VoidValue.h @@ -1,6 +1,8 @@ #pragma once #include "Value.h" +/** Specializations for void values. These house no value whatsoever, but only communicate information by merely existing. +*/ class VoidValue : public Value { public: