bn::green_swap_hbe_ptr class

std::shared_ptr like smart pointer that retains shared ownership of a H-Blank effect which changes the state of green swap in each screen horizontal line.

Base classes

class hbe_ptr
std::shared_ptr like smart pointer that retains shared ownership of a H-Blank effect.

Public static functions

static auto create(const span<const bool>& states_ref) -> green_swap_hbe_ptr
Creates a green_swap_hbe_ptr which changes the state of green swap in each screen horizontal line.
static auto create_optional(const span<const bool>& states_ref) -> optional<green_swap_hbe_ptr>
Creates a green_swap_hbe_ptr which changes the state of green swap in each screen horizontal line.

Public functions

auto states_ref() const -> span<const bool>
Returns the referenced array of 160 bool values which indicate the state of green swap in each screen horizontal line.
void set_states_ref(const span<const bool>& states_ref)
Sets the reference to an array of 160 bool values which indicate the state of green swap in each screen horizontal line.
void reload_states_ref()
Rereads the content of the referenced green swap states in each screen horizontal line.
void swap(green_swap_hbe_ptr& other)
Exchanges the contents of this green_swap_hbe_ptr with those of the other one.

Friends

void swap(green_swap_hbe_ptr& a, green_swap_hbe_ptr& b)
Exchanges the contents of a green_swap_hbe_ptr with those of another one.

Function documentation

static green_swap_hbe_ptr bn::green_swap_hbe_ptr::create(const span<const bool>& states_ref)

Creates a green_swap_hbe_ptr which changes the state of green swap in each screen horizontal line.

Parameters
states_ref Reference to an array of 160 bool values which indicate the state of green swap in each screen horizontal line.
Returns The requested green_swap_hbe_ptr.

The states are not copied but referenced, so they should outlive the green_swap_hbe_ptr to avoid dangling references.

static optional<green_swap_hbe_ptr> bn::green_swap_hbe_ptr::create_optional(const span<const bool>& states_ref)

Creates a green_swap_hbe_ptr which changes the state of green swap in each screen horizontal line.

Parameters
states_ref Reference to an array of 160 bool values which indicate the state of green swap in each screen horizontal line.
Returns The requested green_swap_hbe_ptr if it could be allocated; bn::nullopt otherwise.

The states are not copied but referenced, so they should outlive the green_swap_hbe_ptr to avoid dangling references.

span<const bool> bn::green_swap_hbe_ptr::states_ref() const

Returns the referenced array of 160 bool values which indicate the state of green swap in each screen horizontal line.

The states are not copied but referenced, so they should outlive the green_swap_hbe_ptr to avoid dangling references.

void bn::green_swap_hbe_ptr::set_states_ref(const span<const bool>& states_ref)

Sets the reference to an array of 160 bool values which indicate the state of green swap in each screen horizontal line.

The states are not copied but referenced, so they should outlive the green_swap_hbe_ptr to avoid dangling references.

void bn::green_swap_hbe_ptr::reload_states_ref()

Rereads the content of the referenced green swap states in each screen horizontal line.

The states are not copied but referenced, so they should outlive the green_swap_hbe_ptr to avoid dangling references.

void bn::green_swap_hbe_ptr::swap(green_swap_hbe_ptr& other)

Exchanges the contents of this green_swap_hbe_ptr with those of the other one.

Parameters
other green_swap_hbe_ptr to exchange the contents with.

void swap(green_swap_hbe_ptr& a, green_swap_hbe_ptr& b)

Exchanges the contents of a green_swap_hbe_ptr with those of another one.

Parameters
a First green_swap_hbe_ptr to exchange the contents with.
b Second green_swap_hbe_ptr to exchange the contents with.