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

Visitor that converts a Variant to a PackedVariant. More...

#include <packed_variant.hpp>

+ Inheritance diagram for ScriptInterface::PackVisitor:
+ Collaboration diagram for ScriptInterface::PackVisitor:

Public Member Functions

auto constobjects () const
 Map of objects whose references were replaced by ids.
 
auto operator() (const std::vector< Variant > &vec) const
 
template<typename K >
auto operator() (const std::unordered_map< K, Variant > &map) const
 
PackedVariant operator() (const ObjectRef &so_ptr) const
 
template<class T >
PackedVariant operator() (T &&val) const
 

Detailed Description

Visitor that converts a Variant to a PackedVariant.

While packing, keeps track of all the ObjectRef values that were encountered and stores them. This also keeps the referees alive if there are no other owners.

Definition at line 72 of file packed_variant.hpp.

Member Function Documentation

◆ objects()

auto const & ScriptInterface::PackVisitor::objects ( ) const
inline

Map of objects whose references were replaced by ids.

Definition at line 78 of file packed_variant.hpp.

◆ operator()() [1/4]

PackedVariant ScriptInterface::PackVisitor::operator() ( const ObjectRef so_ptr) const
inline

◆ operator()() [2/4]

template<typename K >
auto ScriptInterface::PackVisitor::operator() ( const std::unordered_map< K, Variant > &  map) const
inline

Definition at line 93 of file packed_variant.hpp.

References ScriptInterface::get_value().

◆ operator()() [3/4]

auto ScriptInterface::PackVisitor::operator() ( const std::vector< Variant > &  vec) const
inline

Definition at line 81 of file packed_variant.hpp.

References ScriptInterface::get_value().

◆ operator()() [4/4]

template<class T >
PackedVariant ScriptInterface::PackVisitor::operator() ( T &&  val) const
inline

Definition at line 113 of file packed_variant.hpp.

References ScriptInterface::get_value().


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