|
BashSpark
|
Wraps a command expression and executes it as a command. More...
#include <shell_node.h>


Public Member Functions | |
| shell_node_command (std::unique_ptr< shell_node_command_expression > &&pCommand) | |
| Construct a command node. | |
| shell_status | evaluate (shell_session &oSession) const override |
| Evaluate (execute) the command expression. | |
| const shell_node_command_expression * | get_command () const noexcept |
| Get pointer to the underlying command expression. | |
Public Member Functions inherited from bs::shell_node_evaluable | |
| shell_node_evaluable (const shell_node_type nType, const std::size_t nPos) | |
| Construct an evaluable 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. | |
Wraps a command expression and executes it as a command.
The command expression is an expandable node that will be expanded into argument tokens and then executed according to shell semantics.
|
explicit |
Construct a command node.
| shell_node_invalid_argument | If expression is null. |
| pCommand | Owned command expression. |
|
overridevirtual |
Evaluate (execute) the command expression.
| oSession | Session context. |
Implements bs::shell_node_evaluable.
|
inlinenoexcept |
Get pointer to the underlying command expression.