58 std::shared_ptr<Context> m_local_context;
59 std::shared_ptr<Context> m_global_context;
70 ContextManager(std::shared_ptr<Communication::MpiCallbacks>
const &callbacks,
78 std::string
const &name,
85 std::shared_ptr<ObjectHandle>
deserialize(std::string
const &state_);
101 return assert(m_local_context), m_local_context.get();
103 return assert(m_global_context), m_global_context.get();
105 throw std::runtime_error(
"Unknown context type.");
115 if (c == m_local_context.get()) {
118 if (c == m_global_context.get()) {
122 throw std::runtime_error(
"Invalid context.");
ScriptInterface::Context decorates ScriptInterface::ObjectHandle objects with a context: a creation p...
std::shared_ptr< ObjectHandle > make_shared(CreationPolicy policy, std::string const &name, const VariantMap ¶meters)
Get a new reference counted instance of a script interface by name.
@ LOCAL
Corresponding to LocalContext.
@ GLOBAL
Corresponding to GlobalContext.
std::string serialize(const ObjectHandle *o) const
Serialize a script interface object into a binary representation.
std::shared_ptr< ObjectHandle > deserialize(std::string const &state_)
Get a new reference counted instance of a script interface from a serialized state.
Context of an object handle.