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

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

#include <packed_variant.hpp>

+ Inheritance diagram for ScriptInterface::UnpackVisitor:
+ Collaboration diagram for ScriptInterface::UnpackVisitor:

Public Member Functions

 UnpackVisitor (std::unordered_map< ObjectId, ObjectRef > const &objects)
 
auto operator() (const std::vector< PackedVariant > &vec) const
 
template<typename K >
auto operator() (const std::unordered_map< K, PackedVariant > &map) const
 
template<class T >
Variant operator() (T &&val) const
 
Variant operator() (const ObjectId &id) const
 

Public Attributes

std::unordered_map< ObjectId, ObjectRef > constobjects
 

Detailed Description

Visitor that converts a PackedVariant to a Variant.

ObjectId are replaced according to the provided object map.

Definition at line 123 of file packed_variant.hpp.

Constructor & Destructor Documentation

◆ UnpackVisitor()

ScriptInterface::UnpackVisitor::UnpackVisitor ( std::unordered_map< ObjectId, ObjectRef > const objects)
inlineexplicit

Definition at line 126 of file packed_variant.hpp.

Member Function Documentation

◆ operator()() [1/4]

Variant ScriptInterface::UnpackVisitor::operator() ( const ObjectId id) const
inline

Definition at line 158 of file packed_variant.hpp.

References objects.

◆ operator()() [2/4]

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

Definition at line 142 of file packed_variant.hpp.

References ScriptInterface::get_value().

◆ operator()() [3/4]

auto ScriptInterface::UnpackVisitor::operator() ( const std::vector< PackedVariant > &  vec) const
inline

Definition at line 130 of file packed_variant.hpp.

References ScriptInterface::get_value().

◆ operator()() [4/4]

template<class T >
Variant ScriptInterface::UnpackVisitor::operator() ( T &&  val) const
inline

Definition at line 153 of file packed_variant.hpp.

References ScriptInterface::get_value().

Member Data Documentation

◆ objects

std::unordered_map<ObjectId, ObjectRef> const& ScriptInterface::UnpackVisitor::objects

Definition at line 124 of file packed_variant.hpp.

Referenced by operator()().


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