Summary Files Commits Branches @commit @diff @stats
path: root / src
diff options
context:
space:
mode:
Commite2ddd0cbd2c28a33398118060294ef2479d2f63f (patch)
Author
 Syndamia <kamen@syndamia.com>
2025-07-23 14:20:58 +0300
Committer
 Syndamia <kamen@syndamia.com>
2025-07-23 14:20:58 +0300
Files135172d4e2576e704137f9d0dd36625b3bdea793 /src
screen-generator-nemetschek-e2ddd0cbd2c28a33398118060294ef2479d2f63f.tar
screen-generator-nemetschek-e2ddd0cbd2c28a33398118060294ef2479d2f63f.tar.gz
screen-generator-nemetschek-e2ddd0cbd2c28a33398118060294ef2479d2f63f.zip
Parentd6860613389a05da9a34973073a895738b906e80 (diff)
feat: Add a virtual function for extra output
6 files changed, 16 insertions, 2 deletions
-rw-r--r--src/LEDVideoWall.cpp4
-rw-r--r--src/LEDVideoWall.h3
-rw-r--r--src/Screen.cpp2
-rw-r--r--src/Screen.h2
-rw-r--r--src/Television.cpp4
-rw-r--r--src/Television.h3
diff --git a/src/LEDVideoWall.cpp b/src/LEDVideoWall.cpp
index 521dcbe..2d42fbf 100644
--- a/src/LEDVideoWall.cpp
+++ b/src/LEDVideoWall.cpp
@@ -66,3 +66,7 @@ LEDVideoWall* LEDVideoWall::fromCommandLine() {
}
throw std::logic_error("Implementation error: didn't handle all types of LED video walls!");
}
+
+std::string LEDVideoWall::extraOutput() const {
+ return std::string();
+}
diff --git a/src/LEDVideoWall.h b/src/LEDVideoWall.h
index fe8b9ea..1007249 100644
--- a/src/LEDVideoWall.h
+++ b/src/LEDVideoWall.h
@@ -14,8 +14,9 @@ public:
static LEDVideoWall* fromCommandLine();
-private:
+protected:
LEDVideoWall(mm width, mm height);
+ virtual std::string extraOutput() const;
};
#endif /* SG_LEDVIDEOWALL */
diff --git a/src/Screen.cpp b/src/Screen.cpp
index 3ff3183..878f86d 100644
--- a/src/Screen.cpp
+++ b/src/Screen.cpp
@@ -13,5 +13,5 @@ mm Screen::getWidth() const {
}
std::ostream& operator<<(std::ostream& ostr, const Screen& screen) {
- return ostr << "Screen: " << screen.width << "x" << screen.height;
+ return ostr << "Screen: " << screen.width << "x" << screen.height << screen.extraOutput();
}
diff --git a/src/Screen.h b/src/Screen.h
index 950aab4..346d04d 100644
--- a/src/Screen.h
+++ b/src/Screen.h
@@ -2,6 +2,7 @@
#define SG_SCREEN
#include <ostream>
+#include <string>
typedef unsigned int mm;
@@ -19,6 +20,7 @@ protected:
mm height;
Screen(mm width, mm height);
+ virtual std::string extraOutput() const = 0;
};
std::ostream& operator<<(std::ostream& ostr, const Screen& screen);
diff --git a/src/Television.cpp b/src/Television.cpp
index cf60d73..35f1d46 100644
--- a/src/Television.cpp
+++ b/src/Television.cpp
@@ -14,3 +14,7 @@ Television* Television::fromCommandLine() {
return new Television(iwidth, iheight);
}
+
+std::string Television::extraOutput() const {
+ return std::string();
+}
diff --git a/src/Television.h b/src/Television.h
index 2c766a0..6cfb688 100644
--- a/src/Television.h
+++ b/src/Television.h
@@ -9,6 +9,9 @@ public:
virtual ~Television();
static Television* fromCommandLine();
+
+protected:
+ virtual std::string extraOutput() const;
};
#endif /* SG_TELEVISION */