ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
packed_variant.hpp File Reference
#include "Variant.hpp"
#include <algorithm>
#include <cstddef>
#include <functional>
#include <string>
#include <unordered_map>
#include <utility>
#include <vector>
+ Include dependency graph for packed_variant.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ScriptInterface::PackVisitor
 Visitor that converts a Variant to a PackedVariant. More...
 
struct  ScriptInterface::UnpackVisitor
 Visitor that converts a PackedVariant to a Variant. More...
 

Namespaces

namespace  ScriptInterface
 

Typedefs

using ScriptInterface::ObjectId = std::size_t
 
using ScriptInterface::PackedVariant = boost::make_recursive_variant< None, bool, int, std::size_t, double, std::string, ObjectId, Utils::Vector3b, Utils::Vector3i, Utils::Vector2d, Utils::Vector3d, Utils::Vector4d, std::vector< int >, std::vector< double >, std::vector< boost::recursive_variant_ >, std::unordered_map< int, boost::recursive_variant_ >, std::unordered_map< std::string, boost::recursive_variant_ > >::type
 Packed version of Variant.
 
using ScriptInterface::PackedMap = std::vector< std::pair< std::string, PackedVariant > >
 

Functions

ObjectId ScriptInterface::object_id (const ObjectHandle *p)
 Id for object.
 
PackedVariant ScriptInterface::pack (const Variant &v)
 Transform a Variant to a PackedVariant.
 
Variant ScriptInterface::unpack (const PackedVariant &v, std::unordered_map< ObjectId, ObjectRef > const &objects)
 Unpack a PackedVariant.
 
PackedMap ScriptInterface::pack (const VariantMap &v)
 Pack a VariantMap.
 
VariantMap ScriptInterface::unpack (const PackedMap &v, std::unordered_map< ObjectId, ObjectRef > const &objects)
 Unpack a PackedMap.