ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
|
Manage object contexts. More...
#include <ContextManager.hpp>
Public Types | |
enum class | CreationPolicy { LOCAL , GLOBAL } |
Labels for context. More... | |
Public Member Functions | |
ContextManager (std::shared_ptr< Communication::MpiCallbacks > const &callbacks, const Utils::Factory< ObjectHandle > &factory) | |
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::shared_ptr< ObjectHandle > | deserialize (std::string const &state_) |
Get a new reference counted instance of a script interface from a serialized state. | |
std::string | serialize (const ObjectHandle *o) const |
Serialize a script interface object into a binary representation. | |
Manage object contexts.
This owns object contexts and allows for creation and serialization of objects preserving their context.
Definition at line 57 of file ContextManager.hpp.
Labels for context.
Enumerator | |
---|---|
LOCAL | Corresponding to |
GLOBAL | Corresponding to |
Definition at line 63 of file ContextManager.hpp.
ScriptInterface::ContextManager::ContextManager | ( | std::shared_ptr< Communication::MpiCallbacks > const & | callbacks, |
const Utils::Factory< ObjectHandle > & | factory | ||
) |
Definition at line 56 of file ContextManager.cpp.
References ScriptInterface::get_value().
std::shared_ptr< ObjectHandle > ScriptInterface::ContextManager::deserialize | ( | std::string const & | state_ | ) |
Get a new reference counted instance of a script interface from a serialized state.
Definition at line 39 of file ContextManager.cpp.
References ScriptInterface::ObjectHandle::deserialize(), and ScriptInterface::get_value().
std::shared_ptr< ObjectHandle > ScriptInterface::ContextManager::make_shared | ( | CreationPolicy | policy, |
std::string const & | name, | ||
const VariantMap & | parameters | ||
) |
Get a new reference counted instance of a script interface by name.
Definition at line 33 of file ContextManager.cpp.
References ScriptInterface::get_value(), and ScriptInterface::Context::make_shared().
std::string ScriptInterface::ContextManager::serialize | ( | const ObjectHandle * | o | ) | const |
Serialize a script interface object into a binary representation.
Definition at line 49 of file ContextManager.cpp.
References ScriptInterface::get_value(), and Utils::pack().