|
lintel 0.2.0
|
#include <CommandLineHistoryService.h>
Additional Inherited Members | |
Protected Member Functions inherited from lintel::PropertyRegistration< CommandLineHistoryService > | |
| std::shared_ptr< Property< type > > | registerProperty (std::string name, type defaultValue, std::string description, bool runtime, const std::string &fileName, int32_t position) |
Protected Attributes inherited from lintel::AbstractService< T > | |
| std::vector< std::shared_ptr< PropertyBase > > | m_properties |
Service is responsible for the serialization of the entered commands and saving for each user those entered entries. The entered cli command will be saved locally in a bash like text file.
data structure:
| lintel::CommandLineHistoryService::CommandLineHistoryService | ( | const std::shared_ptr< ProcessName > & | processName | ) |
| std::vector< CommandHistoryEntry > lintel::CommandLineHistoryService::allOf | ( | ) |
returns all available historized commands
| void lintel::CommandLineHistoryService::historizeOf | ( | const CommandHistoryEntry & | commandHistoryEntry | ) |
historizes the last entered command in the local file
| commandHistoryEntry | history entry |
| std::optional< CommandHistoryEntry > lintel::CommandLineHistoryService::nextOf | ( | const std::string & | menu | ) |
|
overridevirtual |
Default initialization does nothing; override in subclasses.
Reimplemented from lintel::AbstractService< T >.
| std::optional< CommandHistoryEntry > lintel::CommandLineHistoryService::previousOf | ( | const std::string & | menu | ) |
| std::optional< CommandHistoryEntry > lintel::CommandLineHistoryService::startsWith | ( | const std::string & | command, |
| const std::string & | menu | ||
| ) |
searches first match backwards (newest first)
| command | first chars |
| menu |