diff options
Diffstat (limited to 'base_app.hpp')
-rw-r--r-- | base_app.hpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/base_app.hpp b/base_app.hpp index 00122d8..c9d8e85 100644 --- a/base_app.hpp +++ b/base_app.hpp @@ -4,10 +4,15 @@ // Base app class BaseApp { public: + struct AppAttributes { + uint id = 0; + bool destroy_on_exit = true; + }; // CHECK: Following have to be overwritten by derived classes - // TODO: Replace this with a call to a function returning a struct with all app attributes. - uint app_id = 0; - bool app_destroy_on_exit = true; + virtual const AppAttributes& app_get_attributes() = 0; + // Could be implemented as: + // {return app_attributes;} + // where app_attribues is an instance of AppAttributes virtual int render(Api *app_api) = 0; // Has to be implemented virtual int btnpressed(Api *app_api, uint gpio, unsigned long delta) {}; |