ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
visitors.hpp File Reference
#include "actor/traits.hpp"
#include <functional>
#include <memory>
#include <optional>
#include <string>
#include <type_traits>
#include <variant>
+ Include dependency graph for visitors.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  GetActorByType< Actor >
 Get an actor of a specific type, recursively. More...
 
struct  HasActorOfType< Actor >
 Check if an actor of a specific type is active, recursively. More...
 

Functions

template<typename Actor , typename Variant >
std::shared_ptr< Actor > get_actor_by_type (Variant const &variant)
 Get an active actor of a specific type, recursively.
 
template<typename Actor , typename Variant >
std::shared_ptr< Actor > get_actor_by_type (std::optional< Variant > const &optional)
 
template<typename Actor , typename Variant >
auto has_actor_of_type (Variant const &variant)
 Check if an actor of a specific type is active, recursively.
 
template<typename Actor , typename Variant >
auto has_actor_of_type (std::optional< Variant > const &optional)
 

Function Documentation

◆ get_actor_by_type() [1/2]

template<typename Actor , typename Variant >
std::shared_ptr< Actor > get_actor_by_type ( std::optional< Variant > const &  optional)

Definition at line 69 of file visitors.hpp.

◆ get_actor_by_type() [2/2]

template<typename Actor , typename Variant >
std::shared_ptr< Actor > get_actor_by_type ( Variant const &  variant)

Get an active actor of a specific type, recursively.

Definition at line 63 of file visitors.hpp.

◆ has_actor_of_type() [1/2]

template<typename Actor , typename Variant >
auto has_actor_of_type ( std::optional< Variant > const &  optional)

Definition at line 109 of file visitors.hpp.

◆ has_actor_of_type() [2/2]

template<typename Actor , typename Variant >
auto has_actor_of_type ( Variant const &  variant)

Check if an actor of a specific type is active, recursively.

Definition at line 104 of file visitors.hpp.