Template Class ElementCommandLineApp#

Nested Relationships#

Nested Types#

Inheritance Relationships#

Base Type#

Class Documentation#

template<std::size_t max_commands = default_max_commands, std::size_t depth = default_max_line, std::size_t max_args = default_max_args, typename element_t = char, class T = PrintfLogger>
class ElementCommandLineApp : public Coral::HasLogInterface<PrintfLogger>#

Public Types

using CommandLine = ElementCommandLine<element_t, T>#
using Processor = StringCommandProcessor<depth, element_t, max_args>#
using Handler = std::function<void(CommandLine&)>#
using CommandRegistration = std::function<void(ElementCommandLineApp&)>#

Public Functions

inline ElementCommandLineApp(CommandRegistration register_commands, typename Processor::Buffer &input, LogInterface<T> *_log = nullptr)#
inline void add_handler(const element_t *command, Handler handler, const char *help = nullptr, LogInterface<T> *_log = nullptr)#
inline void process(const element_t **argv, std::size_t argc)#

Protected Functions

inline void help(CommandLine &cli)#

Protected Attributes

Processor processor#
std::array<Command, max_commands> commands#
std::size_t command_index#
struct Command#

Public Functions

inline bool handle(CommandLine &cli)#

Public Members

const element_t *command#
Handler handler#
const char *help = nullptr#