57 std::shared_ptr<Communication::MpiCallbacks>
const &callbacks,
60 std::make_shared<LocalContext>(factory, callbacks->comm());
65 (callbacks->comm().size() > 1)
66 ? std::make_shared<GlobalContext>(callbacks, local_context)
67 : std::static_pointer_cast<Context>(local_context);
69 m_local_context = std::move(local_context);
ScriptInterface::ContextManager manages object creation with policies CreationPolicy.
Infrastructure to synchronize objects created on the head node with their corresponding remote copies...
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.
std::string serialize(const ObjectHandle *o) const
Serialize a script interface object into a binary representation.
ContextManager(std::shared_ptr< Communication::MpiCallbacks > const &callbacks, const Utils::Factory< ObjectHandle > &factory)
std::shared_ptr< ObjectHandle > deserialize(std::string const &state_)
Get a new reference counted instance of a script interface from a serialized state.
virtual std::shared_ptr< ObjectHandle > make_shared(std::string const &name, const VariantMap ¶meters)=0
Get a new reference counted instance of a script interface by name.