networkservice
Classes | Static Public Member Functions | List of all members
utils::command::Parser Class Reference

A helper class to parse a string representing a command so as to create a real command that can be passed to IExecutor. More...

#include "utils/command/parser/Parser.h"

Classes

struct  Command
 Represents a shell command to execute. More...
 
struct  CommandDeleter
 Custom deleter associated to the created command. More...
 

Static Public Member Functions

static std::unique_ptr< Command, CommandDeleterparse (const std::string &commandToParse, char delimiter=' ')
 Parse the given string to create a command. More...
 

Detailed Description

A helper class to parse a string representing a command so as to create a real command that can be passed to IExecutor.

Author
Boubacar DIENE bouba.nosp@m.car..nosp@m.diene.nosp@m.@gma.nosp@m.il.co.nosp@m.m
Date
April 2020

Member Function Documentation

◆ parse()

static std::unique_ptr<Command, CommandDeleter> utils::command::Parser::parse ( const std::string &  commandToParse,
char  delimiter = ' ' 
)
static

Parse the given string to create a command.

Parameters
commandToParseThe shell command to parse
delimiterThe delimiter that shows how to split the input string into substrings
Returns
A command that can be provided to IExecutor
See also
Command

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