ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
ScriptInterface::LocalContext Class Reference

Trivial context. More...

#include <LocalContext.hpp>

+ Inheritance diagram for ScriptInterface::LocalContext:
+ Collaboration diagram for ScriptInterface::LocalContext:

Public Member Functions

 LocalContext (Utils::Factory< ObjectHandle > factory, boost::mpi::communicator const &comm)
 
const Utils::Factory< ObjectHandle > & factory () const
 
void notify_call_method (const ObjectHandle *, std::string const &, VariantMap const &) override
 
void notify_set_parameter (const ObjectHandle *, std::string const &, Variant const &) override
 
std::shared_ptr< ObjectHandlemake_shared (std::string const &name, const VariantMap &parameters) override
 
std::shared_ptr< ObjectHandlemake_shared_local (std::string const &name, VariantMap const &parameters) override
 
boost::string_ref name (const ObjectHandle *o) const override
 
bool is_head_node () const override
 
void parallel_try_catch (std::function< void()> const &cb) const override
 
boost::mpi::communicator constget_comm () const override
 
- Public Member Functions inherited from ScriptInterface::Context
virtual ~Context ()=default
 

Additional Inherited Members

- Protected Member Functions inherited from ScriptInterface::Context
void set_context (ObjectHandle *o)
 Set the context of an object to this.
 

Detailed Description

Trivial context.

This context just maintains a local copy of an object.

Definition at line 43 of file LocalContext.hpp.

Constructor & Destructor Documentation

◆ LocalContext()

ScriptInterface::LocalContext::LocalContext ( Utils::Factory< ObjectHandle factory,
boost::mpi::communicator const comm 
)
inline

Definition at line 50 of file LocalContext.hpp.

Member Function Documentation

◆ factory()

const Utils::Factory< ObjectHandle > & ScriptInterface::LocalContext::factory ( ) const
inline

Definition at line 57 of file LocalContext.hpp.

Referenced by name().

◆ get_comm()

boost::mpi::communicator const & ScriptInterface::LocalContext::get_comm ( ) const
inlineoverridevirtual

Implements ScriptInterface::Context.

Definition at line 90 of file LocalContext.hpp.

◆ is_head_node()

bool ScriptInterface::LocalContext::is_head_node ( ) const
inlineoverridevirtual

Implements ScriptInterface::Context.

Definition at line 86 of file LocalContext.hpp.

◆ make_shared()

std::shared_ptr< ObjectHandle > ScriptInterface::LocalContext::make_shared ( std::string const name,
const VariantMap parameters 
)
inlineoverridevirtual

◆ make_shared_local()

std::shared_ptr< ObjectHandle > ScriptInterface::LocalContext::make_shared_local ( std::string const name,
VariantMap const parameters 
)
inlineoverridevirtual

Implements ScriptInterface::Context.

Definition at line 75 of file LocalContext.hpp.

References ScriptInterface::get_value(), make_shared(), and name().

◆ name()

boost::string_ref ScriptInterface::LocalContext::name ( const ObjectHandle o) const
inlineoverridevirtual

Implements ScriptInterface::Context.

Definition at line 80 of file LocalContext.hpp.

References factory(), and ScriptInterface::get_value().

Referenced by make_shared(), and make_shared_local().

◆ notify_call_method()

void ScriptInterface::LocalContext::notify_call_method ( const ObjectHandle ,
std::string const ,
VariantMap const  
)
inlineoverridevirtual

Implements ScriptInterface::Context.

Definition at line 59 of file LocalContext.hpp.

◆ notify_set_parameter()

void ScriptInterface::LocalContext::notify_set_parameter ( const ObjectHandle ,
std::string const ,
Variant const  
)
inlineoverridevirtual

Implements ScriptInterface::Context.

Definition at line 61 of file LocalContext.hpp.

◆ parallel_try_catch()

void ScriptInterface::LocalContext::parallel_try_catch ( std::function< void()> const cb) const
inlineoverridevirtual

The documentation for this class was generated from the following file: