1 // =========================================================================
2 // @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co)
3 // =========================================================================
4 #ifndef __TinyCon__CompletionConsole__h__
5 #define __TinyCon__CompletionConsole__h__
7 #include <TinyCon/Console.h>
8 #include <TinyCon/Trie.h>
14 class CPPLUGINS_TINYCON_EXPORT CompletionConsole
15 : public TinyCon::Console
18 typedef CompletionConsole Self;
19 typedef TinyCon::Console Superclass;
21 typedef TinyCon::Trie TTrie;
25 CompletionConsole( const std::string& prompt );
26 virtual ~CompletionConsole( );
28 TTrie* addCommand( const std::string& cmd );
29 TTrie* addCommand( const std::string& cmd, const std::string& opt );
30 TTrie* addCommand( const std::string& cmd, Trie* opt );
32 virtual int trigger( const std::vector< std::string >& args ) = 0;
33 virtual int trigger( const std::string& s ) override;
34 virtual int hotkeys( char c ) override;
37 std::string _prefix( const std::vector< std::string >& v ) const;
45 #endif // __TinyCon__CompletionConsole__h__