BashSpark
Loading...
Searching...
No Matches
bs::shell_node_background Class Referencefinal

Evaluates a subcommand in background semantics (implementation-specific). More...

#include <shell_node.h>

Inheritance diagram for bs::shell_node_background:
Collaboration diagram for bs::shell_node_background:

Public Member Functions

 shell_node_background (std::size_t nPos, std::unique_ptr< shell_node_evaluable > &&pCommand)
 Construct a background command node.
 
shell_status evaluate (shell_session &oSession) const override
 Evaluate the background node (typically launches and returns immediately).
 
const shell_node_evaluableget_command () const noexcept
 Get pointer to the underlying command.
 
- 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.
 

Detailed Description

Evaluates a subcommand in background semantics (implementation-specific).

The constructor takes ownership of the subcommand to be run in background.

Constructor & Destructor Documentation

◆ shell_node_background()

bs::shell_node_background::shell_node_background ( std::size_t  nPos,
std::unique_ptr< shell_node_evaluable > &&  pCommand 
)

Construct a background command node.

Exceptions
shell_node_invalid_argumentIf pCommand is null.
Parameters
nPosBackground operator position.
pCommandOwned evaluable subcommand.

Member Function Documentation

◆ evaluate()

shell_status bs::shell_node_background::evaluate ( shell_session oSession) const
overridevirtual

Evaluate the background node (typically launches and returns immediately).

Parameters
oSessionSession context.
Returns
shell_status Execution result or job control status.

Implements bs::shell_node_evaluable.

◆ get_command()

const shell_node_evaluable * bs::shell_node_background::get_command ( ) const
inlinenoexcept

Get pointer to the underlying command.

Returns
Non-owning pointer to underlying command.

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