summaryrefslogtreecommitdiff
path: root/Source/Applications/Demos
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Applications/Demos')
-rw-r--r--Source/Applications/Demos/GOL.cpp14
-rw-r--r--Source/Applications/Demos/cxxdemo.cpp14
2 files changed, 22 insertions, 6 deletions
diff --git a/Source/Applications/Demos/GOL.cpp b/Source/Applications/Demos/GOL.cpp
index e6da3a6..cd6e719 100644
--- a/Source/Applications/Demos/GOL.cpp
+++ b/Source/Applications/Demos/GOL.cpp
@@ -1,10 +1,18 @@
-#include <Binding/VirtualTerminal.class.h>
#include <Binding/Thread.class.h>
-#include <String.class.h>
#include <ByteArray.class.h>
#include <Rand.ns.h>
-int main(Vector<String> args) {
+#include <App/ShellApp.proto.h>
+
+class GOL : public ShellApp {
+ public:
+ GOL() : ShellApp() {}
+ int run();
+};
+
+APP(GOL);
+
+int GOL::run() {
if (!outvt.isBoxed()) {
outvt << "Error : cannot display GOL on a non-boxed terminal.\n";
return 1;
diff --git a/Source/Applications/Demos/cxxdemo.cpp b/Source/Applications/Demos/cxxdemo.cpp
index 3d452e7..372e69f 100644
--- a/Source/Applications/Demos/cxxdemo.cpp
+++ b/Source/Applications/Demos/cxxdemo.cpp
@@ -1,10 +1,18 @@
#include <Syscall/Syscall.wtf.h>
-#include <String.class.h>
-#include <Binding/VirtualTerminal.class.h>
#include <Binding/Thread.class.h>
#include <Binding/File.class.h>
-int main(const Vector<String>& args) {
+#include <App/ShellApp.proto.h>
+
+class CPPDemo : public ShellApp {
+ public:
+ CPPDemo() : ShellApp() {}
+ int run();
+};
+
+APP(CPPDemo);
+
+int CPPDemo::run() {
outvt << "Enter some text plz : ";
String s = invt.readLine();
outvt << s;