10 #ifndef __sequencer_h__ 11 #define __sequencer_h__ 36 std::string
filter (
const std::string in);
53 using type =
typename std::string::value_type;
72 std::vector<vtype>
args_ {
nullptr};
113 Child& make_arguments ();
114 bool execute(std::vector<Child>::iterator it,
bool first);
120 void redirect_std_if(std::string fn,
fd_t std_fd);
121 void restore_std_if(
fd_t std_fd);
136 std::string filenames[3] = {
"",
"",
""};
162 Sequencer& parse (
const std::string& input);
170 return (s ==
"&&" || s ==
"||" || s ==
"|") ? true :
false;
174 return (s ==
"|") ? true :
false;
std::string filter(const std::string in)
bool is_pipe(std::string &s)
pipe trait predicate
constexpr fd_t STDERR_
Constant for stderr file descriptor.
vtype * vtype_ptr
Pointer to vector type.
std::vector< vtype > args_
underling data for the execvp() arguments
vtype front()
A vector::front() wrapper.
std::vector< std::string > command_t
A command type.
std::runtime_error Error
An error type.
Pipe & pipe()
A pipe_ getter.
bool is_seperator(std::string &s)
separator trait predicate
typename std::string::value_type type
Basic data type (aka char)
LogicOp
Enumerator for the logic operators between commands.
size_t size()
A vector::size() wrapper.
int fd_t
file descriptor type
vtype_ptr data() noexcept
return a pointer to underling data for execvp()
vtype_ptr operator*() noexcept
same as data()
ArgList & push_back(const std::string &item)
A vector::push_back wrapper.
constexpr fd_t STDIN_
Constant for stdin file descriptor.
constexpr fd_t STDOUT_
Constant for stdout file descriptor.