diff options
author | svntobi <svntobi@cd0d6b48-d4f9-0310-940f-ab8c4eb44d3f> | 2007-09-02 00:39:06 +0000 |
---|---|---|
committer | svntobi <svntobi@cd0d6b48-d4f9-0310-940f-ab8c4eb44d3f> | 2007-09-02 00:39:06 +0000 |
commit | e41621d535a6948b191396f9063f6bd17bb9e381 (patch) | |
tree | c0a918b22de1a874ebdf42fc1a5b82f806eb0a34 /src/commandmenunode.h | |
parent | 024b9daf038ab85fe5d64b46d9d8dc0f172b4537 (diff) | |
download | vdr-plugin-menuorg-e41621d535a6948b191396f9063f6bd17bb9e381.tar.gz vdr-plugin-menuorg-e41621d535a6948b191396f9063f6bd17bb9e381.tar.bz2 |
Added Double Dispatch / Visitor Pattern to MenuNode in preparation of menu structure setup.
git-svn-id: file:///home/tobias/sandbox/vdr/--/vdr-pkg/vdr-pkg/menuorg/trunk@6120 cd0d6b48-d4f9-0310-940f-ab8c4eb44d3f
Diffstat (limited to 'src/commandmenunode.h')
-rw-r--r-- | src/commandmenunode.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/commandmenunode.h b/src/commandmenunode.h index 913591c..c80ea2d 100644 --- a/src/commandmenunode.h +++ b/src/commandmenunode.h @@ -26,20 +26,27 @@ #include "menunode.h" #include <string> +class IMenuNodeProcessor; + class CommandMenuNode: public MenuNode { - private: + private: std::string _text; std::string _command; bool _confirm; - public: + public: CommandMenuNode(std::string text, std::string _command, bool confirm); - IMenuItemDefinition* CreateMenuItemDefinition(); - cOsdMenu* Execute(); + std::string Text(); + std::string Command(); + bool ShouldConfirm(); + + // MenuNode + virtual void Process(IMenuNodeProcessor* menuNodeProcessor); bool IsHidden(); + cOsdMenu* Execute(); - private: + private: std::string ExecuteCommand(); }; |