|
7 | 7 | #include "../step/StepManager.hpp"
|
8 | 8 |
|
9 | 9 | #include <boost/config.hpp>
|
10 |
| -#include <boost/make_shared.hpp> |
11 |
| -#include <boost/shared_ptr.hpp> |
| 10 | +#include <memory> |
12 | 11 |
|
13 | 12 | #include <list>
|
14 | 13 |
|
@@ -64,25 +63,25 @@ class CUCUMBER_CPP_EXPORT AfterAllHook : public UnconditionalHook {};
|
64 | 63 |
|
65 | 64 | class CUCUMBER_CPP_EXPORT HookRegistrar {
|
66 | 65 | public:
|
67 |
| - typedef std::list< boost::shared_ptr<Hook> > hook_list_type; |
68 |
| - typedef std::list< boost::shared_ptr<AroundStepHook> > aroundhook_list_type; |
| 66 | + typedef std::list< std::shared_ptr<Hook> > hook_list_type; |
| 67 | + typedef std::list< std::shared_ptr<AroundStepHook> > aroundhook_list_type; |
69 | 68 |
|
70 |
| - static void addBeforeHook(boost::shared_ptr<BeforeHook> afterHook); |
| 69 | + static void addBeforeHook(std::shared_ptr<BeforeHook> afterHook); |
71 | 70 | static void execBeforeHooks(Scenario *scenario);
|
72 | 71 |
|
73 |
| - static void addAroundStepHook(boost::shared_ptr<AroundStepHook> aroundStepHook); |
| 72 | + static void addAroundStepHook(std::shared_ptr<AroundStepHook> aroundStepHook); |
74 | 73 | static InvokeResult execStepChain(Scenario *scenario, const StepInfo* stepInfo, const InvokeArgs *pArgs);
|
75 | 74 |
|
76 |
| - static void addAfterStepHook(boost::shared_ptr<AfterStepHook> afterStepHook); |
| 75 | + static void addAfterStepHook(std::shared_ptr<AfterStepHook> afterStepHook); |
77 | 76 | static void execAfterStepHooks(Scenario *scenario);
|
78 | 77 |
|
79 |
| - static void addAfterHook(boost::shared_ptr<AfterHook> afterHook); |
| 78 | + static void addAfterHook(std::shared_ptr<AfterHook> afterHook); |
80 | 79 | static void execAfterHooks(Scenario *scenario);
|
81 | 80 |
|
82 |
| - static void addBeforeAllHook(boost::shared_ptr<BeforeAllHook> beforeAllHook); |
| 81 | + static void addBeforeAllHook(std::shared_ptr<BeforeAllHook> beforeAllHook); |
83 | 82 | static void execBeforeAllHooks();
|
84 | 83 |
|
85 |
| - static void addAfterAllHook(boost::shared_ptr<AfterAllHook> afterAllHook); |
| 84 | + static void addAfterAllHook(std::shared_ptr<AfterAllHook> afterAllHook); |
86 | 85 | static void execAfterAllHooks();
|
87 | 86 |
|
88 | 87 | private:
|
@@ -133,45 +132,45 @@ class CUCUMBER_CPP_EXPORT CallableStepChain : public CallableStep {
|
133 | 132 |
|
134 | 133 | template<class T>
|
135 | 134 | static int registerBeforeHook(const std::string &csvTagNotation) {
|
136 |
| - boost::shared_ptr<T> hook(boost::make_shared<T>()); |
| 135 | + std::shared_ptr<T> hook(std::make_shared<T>()); |
137 | 136 | hook->setTags(csvTagNotation);
|
138 | 137 | HookRegistrar::addBeforeHook(hook);
|
139 | 138 | return 0; // We are not interested in the ID at this time
|
140 | 139 | }
|
141 | 140 |
|
142 | 141 | template<class T>
|
143 | 142 | static int registerAroundStepHook(const std::string &csvTagNotation) {
|
144 |
| - boost::shared_ptr<T> hook(boost::make_shared<T>()); |
| 143 | + std::shared_ptr<T> hook(std::make_shared<T>()); |
145 | 144 | hook->setTags(csvTagNotation);
|
146 | 145 | HookRegistrar::addAroundStepHook(hook);
|
147 | 146 | return 0;
|
148 | 147 | }
|
149 | 148 |
|
150 | 149 | template<class T>
|
151 | 150 | static int registerAfterStepHook(const std::string &csvTagNotation) {
|
152 |
| - boost::shared_ptr<T> hook(boost::make_shared<T>()); |
| 151 | + std::shared_ptr<T> hook(std::make_shared<T>()); |
153 | 152 | hook->setTags(csvTagNotation);
|
154 | 153 | HookRegistrar::addAfterStepHook(hook);
|
155 | 154 | return 0;
|
156 | 155 | }
|
157 | 156 |
|
158 | 157 | template<class T>
|
159 | 158 | static int registerAfterHook(const std::string &csvTagNotation) {
|
160 |
| - boost::shared_ptr<T> hook(boost::make_shared<T>()); |
| 159 | + std::shared_ptr<T> hook(std::make_shared<T>()); |
161 | 160 | hook->setTags(csvTagNotation);
|
162 | 161 | HookRegistrar::addAfterHook(hook);
|
163 | 162 | return 0;
|
164 | 163 | }
|
165 | 164 |
|
166 | 165 | template<class T>
|
167 | 166 | static int registerBeforeAllHook() {
|
168 |
| - HookRegistrar::addBeforeAllHook(boost::make_shared<T>()); |
| 167 | + HookRegistrar::addBeforeAllHook(std::make_shared<T>()); |
169 | 168 | return 0;
|
170 | 169 | }
|
171 | 170 |
|
172 | 171 | template<class T>
|
173 | 172 | static int registerAfterAllHook() {
|
174 |
| - HookRegistrar::addAfterAllHook(boost::make_shared<T>()); |
| 173 | + HookRegistrar::addAfterAllHook(std::make_shared<T>()); |
175 | 174 | return 0;
|
176 | 175 | }
|
177 | 176 |
|
|
0 commit comments