JUCE v8.0.9
JUCE API
 
Loading...
Searching...
No Matches
juce::detail::Ranges Struct Referencefinal

#include <juce_Ranges.h>

Collaboration diagram for juce::detail::Ranges:

Classes

struct  Ops
 

Public Types

using Op = std::variant< Ops::New, Ops::Split, Ops::Erase, Ops::Change >
 
using Operations = std::vector< Op >
 

Public Member Functions

 Ranges ()=default
 
 Ranges (std::vector< Range< int64 > > rangesIn)
 
auto begin () const
 
auto cbegin () const
 
auto cend () const
 
void clear ()
 
bool covers (Range< int64 > range) const
 
auto * data () const
 
void drop (Range< int64 > r, Operations &ops)
 
auto end () const
 
void erase (Range< int64 > r, Operations &ops)
 
void eraseFrom (int64 i, Operations &ops)
 
auto find (int64 i) const
 
Range< int64get (size_t rangeIndex) const
 
std::optional< size_t > getIndexForEnclosingRange (int64 positionInTextRange) const
 
std::vector< Range< int64 > > getIntersectionsWith (Range< int64 > r) const
 
auto & getRanges ()
 
auto & getRanges () const
 
void insert (Range< int64 > newRange, Operations &ops)
 
bool isEmpty () const
 
void mergeBack (size_t i, Operations &ops)
 
bool operator!= (const Ranges &other) const
 
bool operator== (const Ranges &other) const
 
void set (Range< int64 > newRange, Operations &ops)
 
void shift (int64 from, int64 amount, Operations &ops)
 
size_t size () const
 
void split (int64 i, Operations &ops)
 

Private Member Functions

size_t getIndex (std::vector< Range< int64 > >::const_iterator it) const
 

Private Attributes

std::vector< Range< int64 > > ranges
 

Member Typedef Documentation

◆ Op

◆ Operations

using juce::detail::Ranges::Operations = std::vector<Op>

Constructor & Destructor Documentation

◆ Ranges() [1/2]

juce::detail::Ranges::Ranges ( )
default

◆ Ranges() [2/2]

juce::detail::Ranges::Ranges ( std::vector< Range< int64 > >  rangesIn)
inlineexplicit

References jassert, and ranges.

Member Function Documentation

◆ begin()

auto juce::detail::Ranges::begin ( ) const
inline

References ranges.

◆ cbegin()

auto juce::detail::Ranges::cbegin ( ) const
inline

References ranges.

Referenced by find().

◆ cend()

auto juce::detail::Ranges::cend ( ) const
inline

References ranges.

Referenced by covers(), and find().

◆ clear()

void juce::detail::Ranges::clear ( )
inline

◆ covers()

bool juce::detail::Ranges::covers ( Range< int64 range) const
inline

References cend(), and find().

◆ data()

◆ drop()

void juce::detail::Ranges::drop ( Range< int64 r,
Operations ops 
)
inline

References erase(), and shift.

◆ end()

auto juce::detail::Ranges::end ( ) const
inline

References ranges.

Referenced by mergeBack().

◆ erase()

void juce::detail::Ranges::erase ( Range< int64 r,
Operations ops 
)
inline

◆ eraseFrom()

void juce::detail::Ranges::eraseFrom ( int64  i,
Operations ops 
)
inline

References erase(), and ranges.

◆ find()

auto juce::detail::Ranges::find ( int64  i) const
inline

References cbegin(), and cend().

Referenced by covers(), and getIndexForEnclosingRange().

◆ get()

◆ getIndex()

size_t juce::detail::Ranges::getIndex ( std::vector< Range< int64 > >::const_iterator  it) const
inlineprivate

References ranges.

Referenced by erase(), getIndexForEnclosingRange(), insert(), set(), and shift().

◆ getIndexForEnclosingRange()

std::optional< size_t > juce::detail::Ranges::getIndexForEnclosingRange ( int64  positionInTextRange) const
inline

◆ getIntersectionsWith()

std::vector< Range< int64 > > juce::detail::Ranges::getIntersectionsWith ( Range< int64 r) const
inline

◆ getRanges() [1/2]

auto & juce::detail::Ranges::getRanges ( )
inline

References ranges.

◆ getRanges() [2/2]

auto & juce::detail::Ranges::getRanges ( ) const
inline

References ranges.

◆ insert()

◆ isEmpty()

◆ mergeBack()

void juce::detail::Ranges::mergeBack ( size_t  i,
Operations ops 
)
inline

◆ operator!=()

bool juce::detail::Ranges::operator!= ( const Ranges other) const
inline

References ranges.

◆ operator==()

bool juce::detail::Ranges::operator== ( const Ranges other) const
inline

References ranges.

◆ set()

void juce::detail::Ranges::set ( Range< int64 newRange,
Operations ops 
)
inline

◆ shift()

void juce::detail::Ranges::shift ( int64  from,
int64  amount,
Operations ops 
)
inline

◆ size()

◆ split()

void juce::detail::Ranges::split ( int64  i,
Operations ops 
)
inline

Member Data Documentation

◆ ranges


The documentation for this struct was generated from the following file: