ultramarine/actor_traits.hpp

#include "actor_attributes.hpp"

namespace ultramarine
{
    enum class ActorKind;

    template <typename Actor>
    constexpr ultramarine::ActorKind actor_kind();

    template <typename Actor>constexpr bool is_reentrant_v = !std::is_base_of_v<non_reentrant_actor<Actor>, Actor>;

    template <typename Actor>constexpr bool is_local_actor_v = std::is_base_of_v<impl::local_actor, Actor>;

    template <typename Actor>constexpr bool is_unlimited_concurrent_local_actor_v = std::is_base_of_v<local_actor<Actor>, Actor>;
}

Enumeration ultramarine::ActorKind

enum class ActorKind
{
    SingletonActor,
    LocalActor
};

Enum representing the possible kinds of ultramarine::actor


Function ultramarine::actor_kind

template <typename Actor>
constexpr ultramarine::ActorKind actor_kind();

Get the ultramarine::actor type

Template parameter ultramarine::Actor

typename Actor

The ultramarine::actor type to test against

Requires: Type Actor shall inherit from ultramarine::actor

Returns: An enum value of type ultramarine::actor_type


Unexposed entity ultramarine::is_reentrant_v

template <typename Actor>constexpr bool is_reentrant_v = !std::is_base_of_v<non_reentrant_actor<Actor>, Actor>;

Compile-time trait testing if the ultramarine::actor type is reentrant

Requires: Type Actor shall inherit from ultramarine::actor


Unexposed entity ultramarine::is_local_actor_v

template <typename Actor>constexpr bool is_local_actor_v = std::is_base_of_v<impl::local_actor, Actor>;

Compile-time trait testing if the ultramarine::actor type is local

Requires: Type Actor shall inherit from ultramarine::actor


Unexposed entity ultramarine::is_unlimited_concurrent_local_actor_v

template <typename Actor>constexpr bool is_unlimited_concurrent_local_actor_v = std::is_base_of_v<local_actor<Actor>, Actor>;

Compile-time trait testing if the ultramarine::local_actor type doesn’t specify a concurrency limit

Requires: Type Actor shall inherit from ultramarine::local_actor