bn::mosaic_attributes_hbe_ptr class

std::shared_ptr like smart pointer that retains shared ownership of a H-Blank effect which changes the attributes to commit to the GBA mosaic register 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 mosaic_attributes>& attributes_ref) -> mosaic_attributes_hbe_ptr
Creates a mosaic_attributes_hbe_ptr which changes the attributes to commit to the GBA mosaic register in each screen horizontal line.
static auto create_optional(const span<const mosaic_attributes>& attributes_ref) -> optional<mosaic_attributes_hbe_ptr>
Creates a mosaic_attributes_hbe_ptr which changes the attributes to commit to the GBA mosaic register in each screen horizontal line.

Public functions

auto attributes_ref() const -> span<const mosaic_attributes>
Returns the referenced array of 160 mosaic_attributes objects with the attributes to commit to the GBA mosaic register in each screen horizontal line.
void set_attributes_ref(const span<const mosaic_attributes>& attributes_ref)
Sets the reference to an array of 160 mosaic_attributes objects with the attributes to commit to the GBA mosaic register in each screen horizontal line.
void reload_attributes_ref()
Rereads the content of the referenced attributes to the GBA mosaic register in each screen horizontal line.
void swap(mosaic_attributes_hbe_ptr& other)
Exchanges the contents of this mosaic_attributes_hbe_ptr with those of the other one.

Friends

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

Function documentation

static mosaic_attributes_hbe_ptr bn::mosaic_attributes_hbe_ptr::create(const span<const mosaic_attributes>& attributes_ref)

Creates a mosaic_attributes_hbe_ptr which changes the attributes to commit to the GBA mosaic register in each screen horizontal line.

Parameters
attributes_ref Reference to an array of 160 mosaic_attributes objects with the attributes to commit to the GBA mosaic register in each screen horizontal line.
Returns The requested mosaic_attributes_hbe_ptr.

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

static optional<mosaic_attributes_hbe_ptr> bn::mosaic_attributes_hbe_ptr::create_optional(const span<const mosaic_attributes>& attributes_ref)

Creates a mosaic_attributes_hbe_ptr which changes the attributes to commit to the GBA mosaic register in each screen horizontal line.

Parameters
attributes_ref Reference to an array of 160 mosaic_attributes objects with the attributes to commit to the GBA mosaic register in each screen horizontal line.
Returns The requested mosaic_attributes_hbe_ptr if it could be allocated; bn::nullopt otherwise.

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

span<const mosaic_attributes> bn::mosaic_attributes_hbe_ptr::attributes_ref() const

Returns the referenced array of 160 mosaic_attributes objects with the attributes to commit to the GBA mosaic register in each screen horizontal line.

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

void bn::mosaic_attributes_hbe_ptr::set_attributes_ref(const span<const mosaic_attributes>& attributes_ref)

Sets the reference to an array of 160 mosaic_attributes objects with the attributes to commit to the GBA mosaic register in each screen horizontal line.

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

void bn::mosaic_attributes_hbe_ptr::reload_attributes_ref()

Rereads the content of the referenced attributes to the GBA mosaic register in each screen horizontal line.

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

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

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

Parameters
other mosaic_attributes_hbe_ptr to exchange the contents with.

void swap(mosaic_attributes_hbe_ptr& a, mosaic_attributes_hbe_ptr& b)

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

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