| 32 | } |
| 33 | |
| 34 | ActivationContext::Ptr ActivationContext::GetCurrentContext() |
| 35 | { |
| 36 | std::stack<ActivationContext::Ptr>& astack = GetActivationStack(); |
| 37 | |
| 38 | if (astack.empty()) |
| 39 | BOOST_THROW_EXCEPTION(std::runtime_error("Objects may not be created outside of an activation context.")); |
| 40 | |
| 41 | return astack.top(); |
| 42 | } |
| 43 | |
| 44 | ActivationScope::ActivationScope(ActivationContext::Ptr context) |
| 45 | : m_Context(std::move(context)) |