mode.hh
Go to the documentation of this file.
00001 #ifndef MODE_H
00002 #define MODE_H
00003 
00004 #include <iosfwd>
00005 #include <string>
00006 #include <list>
00007 #include <map>
00008 
00009 class Plugin;
00010 class Mode
00011 {
00012 protected:
00013     virtual bool apply(int argc, char* const argv[]) = 0;
00014     virtual void help(std::ostream& stream) const = 0;
00015 
00016     std::list<std::string> getPluginNames() const;
00017     Plugin* getPlugin(const std::string& name) const;
00018 
00019 public:
00020     Mode(const std::string& name);
00021     virtual ~Mode();
00022 
00023     std::string getName() const;
00024 
00025     bool main(int argc, char* const argv[]);
00026 
00027     void addPlugin(Plugin* plugin);
00028 
00029 private:
00030     std::string m_name;
00031     typedef std::map<std::string, Plugin *> PluginMap;
00032     PluginMap   m_plugins;
00033     
00034 };
00035 
00036 #endif
00037 


typelib
Author(s): Sylvain Joyeux/sylvain.joyeux@m4x.org
autogenerated on Mon Oct 6 2014 03:17:12