Loading...
Searching...
No Matches
juce_UMPView.h
/*
==============================================================================
This file is part of the JUCE library.
Copyright (c) 2022 - Raw Material Software Limited
JUCE is an open source library subject to commercial or open-source
licensing.
The code included in this file is provided under the terms of the ISC license
http://www.isc.org/downloads/software-support-policy/isc-license. Permission
To use, copy, modify, and/or distribute this software for any purpose with or
without fee is hereby granted provided that the above copyright notice and
this permission notice appear in all copies.
JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
DISCLAIMED.
==============================================================================
*/
#ifndef DOXYGEN
namespace juce::universal_midi_packets
{
class View
{
public:
View() noexcept = default;
explicit View (const uint32_t* data) noexcept : ptr (data) {}
const uint32_t* data() const noexcept { return ptr; }
uint32_t size() const noexcept;
const uint32_t& operator[] (size_t index) const noexcept { return ptr[index]; }
const uint32_t* begin() const noexcept { return ptr; }
const uint32_t* cbegin() const noexcept { return ptr; }
const uint32_t* end() const noexcept { return ptr + size(); }
const uint32_t* cend() const noexcept { return ptr + size(); }
bool operator== (const View& other) const noexcept { return ptr == other.ptr; }
bool operator!= (const View& other) const noexcept { return ! operator== (other); }
private:
const uint32_t* ptr = nullptr;
};
} // namespace juce::universal_midi_packets
#endif
juce::universal_midi_packets::View::operator==
bool operator==(const View &other) const noexcept
Definition juce_UMPView.h:78
juce::universal_midi_packets::View::operator!=
bool operator!=(const View &other) const noexcept
Definition juce_UMPView.h:81
juce::universal_midi_packets::View::size
uint32_t size() const noexcept
Definition juce_UMPView.cpp:26
juce::universal_midi_packets::View::View
View() noexcept=default
juce::universal_midi_packets::View::data
const uint32_t * data() const noexcept
Definition juce_UMPView.h:55
juce::universal_midi_packets::View::begin
const uint32_t * begin() const noexcept
Definition juce_UMPView.h:70
juce::universal_midi_packets::View::end
const uint32_t * end() const noexcept
Definition juce_UMPView.h:74