-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* decisions * decision in progress, added Request template param to exchange_handler to pass extended requests * decisions * refactoring decision making * decisions * decision tree for actions * variadic template and matched user data request example * code style and some refactoring * some requested changes added * flexibility
- Loading branch information
1 parent
89f48f2
commit ac21ea5
Showing
14 changed files
with
353 additions
and
221 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* File: decision_exchange.hpp | ||
* Author: arseny.bushev@gmail.com | ||
* | ||
* Created on 9 мая 2017 г., 17:12 | ||
*/ | ||
|
||
#ifndef DECISION_EXCHANGE_HPP | ||
#define DECISION_EXCHANGE_HPP | ||
|
||
#include <rtb/common/decision_tree.hpp> | ||
|
||
namespace vanilla { | ||
namespace decision_exchange { | ||
template <unsigned int SIZE, typename ...Args> | ||
class decision_exchange { | ||
static constexpr int tree_depth{static_cast<int>(SIZE)}; | ||
using decision_manager = vanilla::common::decision_tree_manager<tree_depth,Args...>; | ||
public: | ||
using decision_tree_type = typename decision_manager::decision_tree_type; | ||
using decision_action = vanilla::common::decision_action<Args...>; | ||
|
||
template <typename T> | ||
decision_exchange(T &&decision_tree): | ||
decision_tree{decision_tree}, manager{this->decision_tree} | ||
{} | ||
template<typename ...TArgs> | ||
void exchange(TArgs && ...args) { | ||
//decision_manager manager(decision_tree); | ||
manager.execute(std::forward<TArgs>(args)...); | ||
} | ||
private: | ||
decision_tree_type decision_tree; | ||
decision_manager manager; | ||
|
||
}; | ||
} | ||
} | ||
|
||
#endif /* DECISION_EXCHANGE_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
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
Oops, something went wrong.