BashSpark
Loading...
Searching...
No Matches
command_math.h
Go to the documentation of this file.
1
27#pragma once
28
29#include "BashSpark/command.h"
30
31namespace bs {
66 class command_math : public command {
67 public:
72 : command("math") {
73 }
74
75 public:
83 shell_status run(const std::span<const std::string> &vArgs, shell_session &oSession) const override;
84
85 public:
94 virtual void msg_error_math(std::ostream &oStdErr, shell_status nStatus) const;
95 };
96}
Prints on stdout the result of a mathematical operation.
Definition command_math.h:66
command_math()
Constructs command.
Definition command_math.h:71
virtual void msg_error_math(std::ostream &oStdErr, shell_status nStatus) const
Displays the error message for math errors.
Definition command_math.cpp:428
shell_status run(const std::span< const std::string > &vArgs, shell_session &oSession) const override
Prints on stdout the result of a mathematical operation.
Definition command_math.cpp:410
Abstract base class for all shell commands.
Definition command.h:50
Represents an execution environment for a shell instance.
Definition shell_session.h:57
Defines the bs::command interface and built-in shell commands.
BashSpark main namespace.
Definition command.h:39
shell_status
Shell status codes.
Definition shell_status.h:47