CLI v1.0.0
Custom cli console for creating commands executable at runtime
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Friends | List of all members
cli::Console::Node Class Reference

Public Member Functions

Console::Node & operator[] (const std::string &key)
 Used to add a new command.
 

Public Attributes

std::function< void(const std::vector< std::string > &)> function = nullptr
 A function to call when executing a command.
 

Friends

class Console
 

Member Function Documentation

◆ operator[]()

Console::Node & cli::Console::Node::operator[] ( const std::string &  key)
inline

Used to add a new command.

Can be chained togehter to add more complex commands.

Console console;
//create a command "command set histSize";
console["console"]["set"]["histSize"].function = [](){};
Console represents the customisable console.
Definition cli.hpp:21
Parameters
keyCommand name

The documentation for this class was generated from the following file: