From 6e0e1937df92d8188c365dfa2990f76e100b9543 Mon Sep 17 00:00:00 2001
From: Carl Philipp Klemm <philipp@uvos.xyz>
Date: Mon, 13 Jun 2022 15:56:29 +0200
Subject: [PATCH] Range: add prining function

---
 eisgenerator/eistype.h | 4 +++-
 eistype.cpp            | 5 +++++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/eisgenerator/eistype.h b/eisgenerator/eistype.h
index f1c7040..ec5ea22 100644
--- a/eisgenerator/eistype.h
+++ b/eisgenerator/eistype.h
@@ -12,8 +12,9 @@ struct DataPoint
 	fvalue omega;
 };
 
-struct Range
+class Range
 {
+public:
 	fvalue start;
 	fvalue end;
 	size_t count;
@@ -42,6 +43,7 @@ struct Range
 	}
 	Range(fvalue startI, fvalue endI, size_t countI, bool logI = false, char typeI = 'x'): start(startI), end(endI), count(countI), log(logI), type(typeI){}
 	Range() = default;
+	void print(int level) const;
 };
 
 bool saveToDisk(const std::vector<DataPoint>& data, std::string fileName);
diff --git a/eistype.cpp b/eistype.cpp
index 0d607ea..c34adfb 100644
--- a/eistype.cpp
+++ b/eistype.cpp
@@ -24,3 +24,8 @@ bool eis::saveToDisk(const std::vector<DataPoint>& data, std::string fileName)
 	file.close();
 	return true;
 }
+
+void eis::Range::print(int level) const
+{
+	Log(static_cast<Log::Level>(level))<<"Range for "<<type<<' '<<start<<'-'<<end<<' '<<count<<" steps";
+}
-- 
GitLab