|
BashSpark
|
Extract positional argument from the session (e.g. $1, $2). More...
#include <shell_node.h>


Public Member Functions | |
| shell_node_arg (const std::size_t nPos, const std::uint64_t nArg) | |
| Construct an argument extractor. | |
| std::string | get_value (const shell_session &oSession) const override |
| Return the argument value from the session. | |
| std::uint64_t | get_arg () const noexcept |
| Get the argument index this node references. | |
Public Member Functions inherited from bs::shell_node_session_extractor | |
| shell_node_session_extractor (const shell_node_type nType, const std::size_t nPos) | |
| Construct a session extractor node. | |
| void | expand (std::vector< std::string > &vTokens, shell_session &oSession, bool bSplit) const override |
| Expand by retrieving the value via get_value() and appending it. | |
Public Member Functions inherited from bs::shell_node_expandable | |
| shell_node_expandable (const shell_node_type nType, const std::size_t nPos) | |
| Construct an expandable node. | |
Public Member Functions inherited from bs::shell_node | |
| virtual | ~shell_node ()=default |
| Virtual default destructor for polymorphic deletion. | |
| shell_node_type | get_type () const noexcept |
| Get the node type. | |
| std::size_t | get_pos () const noexcept |
| Get node position in the original input stream. | |
Additional Inherited Members | |
Protected Member Functions inherited from bs::shell_node | |
| shell_node (const shell_node_type nType, const std::size_t nPos) | |
| Protected constructor used by derived classes. | |
Protected Attributes inherited from bs::shell_node | |
| const shell_node_type | m_nType |
| Node type. | |
| const std::size_t | m_nPos |
| Position in the input stream. | |
Extract positional argument from the session (e.g. $1, $2).
|
inline |
Construct an argument extractor.
| nPos | Position in stream. |
| nArg | Argument index to extract. |
|
inlinenoexcept |
Get the argument index this node references.
|
overridevirtual |
Return the argument value from the session.
| oSession | Session that holds arguments. |
Implements bs::shell_node_session_extractor.