OpenShot Audio Library | OpenShotAudio: juce::universal_midi_packets::View Class Reference

OpenShot Audio Library | OpenShotAudio 0.6.0

Loading...
Searching...
No Matches
juce::universal_midi_packets::View Class Reference

`#include <juce_UMPView.h>`

## Public Member Functions
| View () noexcept=default
| View (const uint32_t *data) noexcept
const uint32_t * | data () const noexcept
uint32_t | size () const noexcept
const uint32_t & | operator[] (size_t index) const noexcept
const uint32_t * | begin () const noexcept
const uint32_t * | cbegin () const noexcept
const uint32_t * | end () const noexcept
const uint32_t * | cend () const noexcept
bool | operator== (const View &other) const noexcept
bool | operator!= (const View &other) const noexcept

## Detailed Description

Points to a single Universal MIDI Packet.

The packet must be well-formed for member functions to work correctly.

Specifically, the constructor argument must be the beginning of a region of uint32_t that contains at least getNumWordsForMessageType (*data) items, where data is the constructor argument.

NOTE: Instances of this class do not own the memory that they point to! If you need to store a packet pointed-to by a View for later use, copy the view contents to a Packets collection, or use the Utils::PacketX types.

Definition at line 43 of file juce_UMPView.h.

## Constructor & Destructor Documentation

## ◆ View() [1/2]

juce::universal_midi_packets::View::View | ( |  | ) |
| defaultnoexcept

Create an invalid view.

Referenced by operator!=(), operator==(), and View().

## ◆ View() [2/2]

juce::universal_midi_packets::View::View | ( | const uint32_t * | data | ) |
| inlineexplicitnoexcept

Create a view of the packet starting at address d.

Definition at line 50 of file juce_UMPView.h.

## Member Function Documentation

## ◆ begin()

const uint32_t * juce::universal_midi_packets::View::begin | ( |  | ) | const
| inlinenoexcept

Get an iterator pointing to the first word in the packet.

Definition at line 70 of file juce_UMPView.h.

## ◆ cbegin()

const uint32_t * juce::universal_midi_packets::View::cbegin | ( |  | ) | const
| inlinenoexcept

Definition at line 71 of file juce_UMPView.h.

## ◆ cend()

const uint32_t * juce::universal_midi_packets::View::cend | ( |  | ) | const
| inlinenoexcept

Definition at line 75 of file juce_UMPView.h.

## ◆ data()

const uint32_t * juce::universal_midi_packets::View::data | ( |  | ) | const
| inlinenoexcept

Get a pointer to the first word in the Universal MIDI Packet currently pointed-to by this view.

Definition at line 55 of file juce_UMPView.h.

Referenced by juce::universal_midi_packets::Midi1ToBytestreamTranslator::dispatch(), and View().

## ◆ end()

const uint32_t * juce::universal_midi_packets::View::end | ( |  | ) | const
| inlinenoexcept

Get an iterator pointing one-past the last word in the packet.

Definition at line 74 of file juce_UMPView.h.

## ◆ operator!=()

bool juce::universal_midi_packets::View::operator!= | ( | const View & | other | ) | const
| inlinenoexcept

Return false if this view is pointing to the same address as another view.

Definition at line 81 of file juce_UMPView.h.

## ◆ operator==()

bool juce::universal_midi_packets::View::operator== | ( | const View & | other | ) | const
| inlinenoexcept

Return true if this view is pointing to the same address as another view.

Definition at line 78 of file juce_UMPView.h.

Referenced by operator!=().

## ◆ operator[]()

const uint32_t & juce::universal_midi_packets::View::operator[] | ( | size_t | index | ) | const
| inlinenoexcept

Get a specific word from this packet.

Passing an index that is greater than or equal to the result of size will cause undefined behaviour.

Definition at line 67 of file juce_UMPView.h.

## ◆ size()

uint32_t juce::universal_midi_packets::View::size | ( |  | ) | const
| noexcept

Get the number of 32-words (between 1 and 4 inclusive) in the Universal MIDI Packet currently pointed-to by this view.

Definition at line 26 of file juce_UMPView.cpp.

Referenced by juce::universal_midi_packets::Midi1ToBytestreamTranslator::dispatch(), and end().

The documentation for this class was generated from the following files:

- juce_UMPView.h
- juce_UMPView.cpp