template class EE::detail::TaskStateRef

Overview

Intrusive owning pointer to a TaskSharedState. More…

#include <task.hpp>

template <typename T>
class TaskStateRef {
public:
    // typedefs

    typedef TaskSharedState<T> State;

    // construction

    TaskStateRef();
    TaskStateRef(TaskStateRef&& other);
    TaskStateRef(const TaskStateRef&);
    ~TaskStateRef();

    // methods

    TaskStateRef& operator=(TaskStateRef&& other);
    TaskStateRef& operator=(const TaskStateRef&);
    void reset();
    State* get() const;
    State* operator->() const;
    State& operator*() const;
    operator bool() const;
    static TaskStateRef adopt(State* state);
    static TaskStateRef retain(State* state);
};

Detailed Documentation

Intrusive owning pointer to a TaskSharedState.

Methods

static TaskStateRef adopt(State* state)

Adopts an existing reference (no retain).

static TaskStateRef retain(State* state)

Acquires a new reference.