summaryrefslogtreecommitdiff
path: root/Source/Applications/Demos
diff options
context:
space:
mode:
authorAlexis211 <alexis211@gmail.com>2009-12-19 12:52:26 +0100
committerAlexis211 <alexis211@gmail.com>2009-12-19 12:52:26 +0100
commitb079ac88df4c2580310e44fda6a2a4ac5f0f840f (patch)
tree67d4ed5d2cbe1e0be1414a7eae4b7555acefd169 /Source/Applications/Demos
parentb2e3fc19bdad4c4d5c650e9ca759883db54b2e41 (diff)
parent6dc28352073c473a35a9d51796b02361c6c6486c (diff)
downloadMelon-b079ac88df4c2580310e44fda6a2a4ac5f0f840f.tar.gz
Melon-b079ac88df4c2580310e44fda6a2a4ac5f0f840f.zip
Merge branch 'framework'
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..675c159 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("GOL.app", "Melon's Game of Life simulator \\o/") {}
+ 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..36cfd27 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("CPPDemo.app", "A demo application using the C++ Melon framework") {}
+ int run();
+};
+
+APP(CPPDemo);
+
+int CPPDemo::run() {
outvt << "Enter some text plz : ";
String s = invt.readLine();
outvt << s;