Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
lexy_ext::shell< Prompt > Class Template Reference

Reads input from an interactive shell. More...

#include <shell.hpp>

Classes

class  input
 This is both Reader and Input. More...
 
class  writer
 

Public Types

using char_type = typename encoding::char_type
 
using encoding = typename Prompt::encoding
 
using prompt_type = Prompt
 

Public Member Functions

const Prompt & get_prompt () const noexcept
 
Prompt & get_prompt () noexcept
 
bool is_open () const noexcept
 Whether or not the shell is still open. More...
 
auto prompt_for_input ()
 
 shell ()=default
 
 shell (Prompt prompt)
 
template<typename... Args>
auto write_message (Args &&... args)
 

Private Member Functions

bool append_next_line ()
 

Private Attributes

lexy::_detail::buffer_builder< char_type_buffer
 
LEXY_EMPTY_MEMBER Prompt _prompt
 

Detailed Description

template<typename Prompt = default_prompt<>>
class lexy_ext::shell< Prompt >

Reads input from an interactive shell.

Definition at line 148 of file shell.hpp.

Member Typedef Documentation

◆ char_type

template<typename Prompt = default_prompt<>>
using lexy_ext::shell< Prompt >::char_type = typename encoding::char_type

Definition at line 152 of file shell.hpp.

◆ encoding

template<typename Prompt = default_prompt<>>
using lexy_ext::shell< Prompt >::encoding = typename Prompt::encoding

Definition at line 151 of file shell.hpp.

◆ prompt_type

template<typename Prompt = default_prompt<>>
using lexy_ext::shell< Prompt >::prompt_type = Prompt

Definition at line 153 of file shell.hpp.

Constructor & Destructor Documentation

◆ shell() [1/2]

template<typename Prompt = default_prompt<>>
lexy_ext::shell< Prompt >::shell ( )
default

◆ shell() [2/2]

template<typename Prompt = default_prompt<>>
lexy_ext::shell< Prompt >::shell ( Prompt  prompt)
inlineexplicit

Definition at line 156 of file shell.hpp.

Member Function Documentation

◆ append_next_line()

template<typename Prompt = default_prompt<>>
bool lexy_ext::shell< Prompt >::append_next_line ( )
inlineprivate

Definition at line 369 of file shell.hpp.

◆ get_prompt() [1/2]

template<typename Prompt = default_prompt<>>
const Prompt& lexy_ext::shell< Prompt >::get_prompt ( ) const
inlinenoexcept

Definition at line 362 of file shell.hpp.

◆ get_prompt() [2/2]

template<typename Prompt = default_prompt<>>
Prompt& lexy_ext::shell< Prompt >::get_prompt ( )
inlinenoexcept

Definition at line 358 of file shell.hpp.

◆ is_open()

template<typename Prompt = default_prompt<>>
bool lexy_ext::shell< Prompt >::is_open ( ) const
inlinenoexcept

Whether or not the shell is still open.

Definition at line 159 of file shell.hpp.

◆ prompt_for_input()

template<typename Prompt = default_prompt<>>
auto lexy_ext::shell< Prompt >::prompt_for_input ( )
inline

Asks the user to enter input. This will invalidate the previous buffer. Returns an Input for that input.

Definition at line 251 of file shell.hpp.

◆ write_message()

template<typename Prompt = default_prompt<>>
template<typename... Args>
auto lexy_ext::shell< Prompt >::write_message ( Args &&...  args)
inline

Constructs a writer for writing to the prompt. The arguments depend on the Prompt in use.

Definition at line 353 of file shell.hpp.

Member Data Documentation

◆ _buffer

template<typename Prompt = default_prompt<>>
lexy::_detail::buffer_builder<char_type> lexy_ext::shell< Prompt >::_buffer
private

Definition at line 406 of file shell.hpp.

◆ _prompt

template<typename Prompt = default_prompt<>>
LEXY_EMPTY_MEMBER Prompt lexy_ext::shell< Prompt >::_prompt
private

Definition at line 407 of file shell.hpp.


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


behaviortree_cpp_v4
Author(s): Davide Faconti
autogenerated on Fri Dec 13 2024 03:19:19