-
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.
feat(proxy): add interface and proxy to handle input
- Loading branch information
1 parent
71a2a7e
commit b9a1710
Showing
9 changed files
with
122 additions
and
19 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
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// | ||
// Created by Pierre-Alexandre Delgado on 28/02/2024. | ||
// | ||
|
||
#ifndef IOPERATIONS_HPP | ||
#define IOPERATIONS_HPP | ||
|
||
#include <string> | ||
|
||
namespace Operations { | ||
|
||
class IOperations { | ||
|
||
public: | ||
virtual ~IOperations() = default; | ||
virtual std::string makeOperation(std::string &operation) = 0; | ||
|
||
}; | ||
|
||
} // Operations | ||
|
||
#endif //IOPERATIONS_HPP |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// | ||
// Created by Pierre-Alexandre Delgado on 28/02/2024. | ||
// | ||
|
||
#include "OperationsPriorities.h" | ||
|
||
namespace Operations { | ||
|
||
std::string OperationsPriorities::makeOperation(std::string &operation) { | ||
return {"1"}; | ||
} | ||
|
||
} |
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// | ||
// Created by Pierre-Alexandre Delgado on 28/02/2024. | ||
// | ||
|
||
#ifndef OPERATIONSPRIORITIES_H | ||
#define OPERATIONSPRIORITIES_H | ||
|
||
#include <iostream> | ||
#include "IOperations.hpp" | ||
|
||
namespace Operations { | ||
|
||
class OperationsPriorities : public IOperations { | ||
|
||
public: | ||
OperationsPriorities() = default; | ||
~OperationsPriorities() override = default; | ||
std::string makeOperation(std::string &operation) override; | ||
}; | ||
|
||
} // Operations | ||
|
||
#endif //OPERATIONSPRIORITIES_H |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// | ||
// Created by Pierre-Alexandre Delgado on 28/02/2024. | ||
// | ||
|
||
#include "ProxyOperationsPriorities.h" | ||
|
||
namespace Operations { | ||
|
||
ProxyOperationsPriorities::ProxyOperationsPriorities() { | ||
this->_operationsPriorities = std::make_unique<OperationsPriorities>(); | ||
} | ||
|
||
std::string ProxyOperationsPriorities::makeOperation(std::string &operation) { | ||
return this->_operationsPriorities->makeOperation(operation); | ||
} | ||
|
||
|
||
} |
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// | ||
// Created by Pierre-Alexandre Delgado on 28/02/2024. | ||
// | ||
|
||
#ifndef PROXYOPERATIONSPRIORITIES_H | ||
#define PROXYOPERATIONSPRIORITIES_H | ||
|
||
#include "OperationsPriorities.h" | ||
|
||
namespace Operations { | ||
|
||
class ProxyOperationsPriorities : public IOperations { | ||
|
||
public: | ||
ProxyOperationsPriorities(); | ||
std::string makeOperation(std::string &operation) override; | ||
|
||
private: | ||
std::unique_ptr<OperationsPriorities> _operationsPriorities; | ||
}; | ||
|
||
} // Operations | ||
|
||
|
||
|
||
#endif //PROXYOPERATIONSPRIORITIES_H |