-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DEV] Make Parser#parse() method static
Since a recent rework, it has no member variables anymore.
- Loading branch information
1 parent
95c211d
commit c087d44
Showing
8 changed files
with
31 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,12 +40,6 @@ namespace utils::command { | |
* @brief A helper class to parse a string representing a command so | ||
* as to create a real command that can be passed to @ref IExecutor. | ||
* | ||
* @note Copy contructor, copy-assignment operator, move constructor and | ||
* move-assignment operator are defined to be compliant with the | ||
* "Rule of five" | ||
* | ||
* @see https://en.cppreference.com/w/cpp/language/rule_of_three | ||
* | ||
* @author Boubacar DIENE <[email protected]> | ||
* @date April 2020 | ||
*/ | ||
|
@@ -74,24 +68,6 @@ class Parser { | |
void operator()(Command* command); | ||
}; | ||
|
||
/* Class constructor */ | ||
Parser(); | ||
|
||
/** Class destructor */ | ||
~Parser(); | ||
|
||
/** Class copy constructor */ | ||
Parser(const Parser&) = delete; | ||
|
||
/** Class copy-assignment operator */ | ||
Parser& operator=(const Parser&) = delete; | ||
|
||
/** Class move constructor */ | ||
Parser(Parser&&) = delete; | ||
|
||
/** Class move-assignment operator */ | ||
Parser& operator=(Parser&&) = delete; | ||
|
||
/** | ||
* @brief Parse the given string to create a command | ||
* | ||
|
@@ -103,12 +79,8 @@ class Parser { | |
* | ||
* @see Command | ||
*/ | ||
[[nodiscard]] std::unique_ptr<Command, CommandDeleter> | ||
parse(const std::string& commandToParse, char delimiter = ' ') const; | ||
|
||
private: | ||
struct Internal; | ||
std::unique_ptr<Internal> m_internal; | ||
[[nodiscard]] static std::unique_ptr<Command, CommandDeleter> | ||
parse(const std::string& commandToParse, char delimiter = ' '); | ||
}; | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters