diff options
author | Alexis211 <alexis211@gmail.com> | 2009-12-16 18:22:58 +0100 |
---|---|---|
committer | Alexis211 <alexis211@gmail.com> | 2009-12-16 18:22:58 +0100 |
commit | 3d5aca66b9712758aecb2e80bc5b2fb3df6256a4 (patch) | |
tree | 817e945218dbca029244315f36b960dd288b3cff /Source/Applications/Demos/GOL.cpp | |
parent | 5f87c447bdcb82beacbfb930942fe9995dcdb60f (diff) | |
download | Melon-3d5aca66b9712758aecb2e80bc5b2fb3df6256a4.tar.gz Melon-3d5aca66b9712758aecb2e80bc5b2fb3df6256a4.zip |
New model, object-oriented, for applications
Diffstat (limited to 'Source/Applications/Demos/GOL.cpp')
-rw-r--r-- | Source/Applications/Demos/GOL.cpp | 14 |
1 files changed, 11 insertions, 3 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; |