BashSpark
Loading...
Searching...
No Matches
command_fcall.h
Go to the documentation of this file.
1
27#pragma once
28
29#include "BashSpark/command.h"
30
31namespace bs {
44 class command_fcall : public command {
45 public:
50 : command("fcall") {
51 }
52
53 public:
61 shell_status run(const std::span<const std::string> &vArgs, shell_session &oSession) const override;
62
63 public:
69 virtual void msg_error_param_number(std::ostream &oStdErr, std::size_t nArgs) const;
70
79 virtual void msg_error_function_not_found(std::ostream &oStdErr, const std::string &sFunction) const;
80 };
81}
Calls a function.
Definition command_fcall.h:44
virtual void msg_error_param_number(std::ostream &oStdErr, std::size_t nArgs) const
Print an error if the wrong number of arguments is provided.
Definition command_fcall.cpp:55
virtual void msg_error_function_not_found(std::ostream &oStdErr, const std::string &sFunction) const
Displays the error message for function not found error.
Definition command_fcall.cpp:59
command_fcall()
Constructs command.
Definition command_fcall.h:49
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_fcall.cpp:32
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