|
LibreOffice Module svl (master) 1
|
Most of the time, the which ranges we point at are a compile-time literal. More...
#include <whichranges.hxx>
Public Types | |
| using | const_iterator = WhichPair const * |
Public Member Functions | |
| WhichRangesContainer ()=default | |
| WhichRangesContainer (std::unique_ptr< WhichPair[]> wids, sal_Int32 nSize) | |
| template<sal_uInt16... WIDs> | |
| WhichRangesContainer (svl::Items_t< WIDs... >) | |
| WhichRangesContainer (const WhichPair *wids, sal_Int32 nSize) | |
| WhichRangesContainer (sal_uInt16 nWhichStart, sal_uInt16 nWhichEnd) | |
| WhichRangesContainer (WhichRangesContainer const &other) | |
| WhichRangesContainer (WhichRangesContainer &&other) | |
| ~WhichRangesContainer () | |
| WhichRangesContainer & | operator= (WhichRangesContainer &&other) |
| WhichRangesContainer & | operator= (WhichRangesContainer const &other) |
| bool | operator== (WhichRangesContainer const &other) const |
| const_iterator | begin () const noexcept |
| const_iterator | end () const noexcept |
| bool | empty () const noexcept |
| sal_Int32 | size () const noexcept |
| WhichPair const & | operator[] (sal_Int32 idx) const noexcept |
| void | reset () |
| SAL_WARN_UNUSED_RESULT WhichRangesContainer | MergeRange (sal_uInt16 nFrom, sal_uInt16 nTo) const |
Public Attributes | |
| WhichPair const * | m_pairs = nullptr |
| sal_Int32 | m_size = 0 |
| bool | m_bOwnRanges = false |
| if true, we allocated and need to delete the pairs, if not, we are pointing at a global const literal More... | |
Most of the time, the which ranges we point at are a compile-time literal.
So we take advantage of that, and avoid the cost of allocating our own array and copying into it.
Definition at line 78 of file whichranges.hxx.
| using WhichRangesContainer::const_iterator = WhichPair const* |
Definition at line 80 of file whichranges.hxx.
|
default |
Referenced by MergeRange().
|
inline |
Definition at line 90 of file whichranges.hxx.
|
inline |
Definition at line 97 of file whichranges.hxx.
| WhichRangesContainer::WhichRangesContainer | ( | const WhichPair * | wids, |
| sal_Int32 | nSize | ||
| ) |
Definition at line 1440 of file itemset.cxx.
References i, m_bOwnRanges, m_pairs, m_size, and p.
| WhichRangesContainer::WhichRangesContainer | ( | sal_uInt16 | nWhichStart, |
| sal_uInt16 | nWhichEnd | ||
| ) |
Definition at line 1450 of file itemset.cxx.
|
inline |
Definition at line 105 of file whichranges.hxx.
| WhichRangesContainer::WhichRangesContainer | ( | WhichRangesContainer && | other | ) |
Definition at line 1458 of file itemset.cxx.
References m_bOwnRanges, m_pairs, and m_size.
| WhichRangesContainer::~WhichRangesContainer | ( | ) |
Definition at line 1490 of file itemset.cxx.
References reset().
|
inlinenoexcept |
Definition at line 113 of file whichranges.hxx.
Referenced by SfxWhichIter::FirstWhich(), SfxWhichIter::GetCurWhich(), and SfxWhichIter::NextWhich().
|
inlinenoexcept |
Definition at line 115 of file whichranges.hxx.
Referenced by MergeRange(), SfxItemSet::SfxItemSet(), and SfxItemSet::~SfxItemSet().
|
inlinenoexcept |
Definition at line 114 of file whichranges.hxx.
| WhichRangesContainer WhichRangesContainer::MergeRange | ( | sal_uInt16 | nFrom, |
| sal_uInt16 | nTo | ||
| ) | const |
Definition at line 1517 of file itemset.cxx.
References empty(), size(), svl::detail::validRange(), and WhichRangesContainer().
Referenced by SfxItemPool::FillItemIdRanges_Impl(), and SfxItemSet::MergeRange().
| WhichRangesContainer & WhichRangesContainer::operator= | ( | WhichRangesContainer && | other | ) |
Definition at line 1465 of file itemset.cxx.
References m_bOwnRanges, m_pairs, and m_size.
| WhichRangesContainer & WhichRangesContainer::operator= | ( | WhichRangesContainer const & | other | ) |
Definition at line 1473 of file itemset.cxx.
References i, m_bOwnRanges, m_pairs, m_size, p, and reset().
| bool WhichRangesContainer::operator== | ( | WhichRangesContainer const & | other | ) | const |
Definition at line 1495 of file itemset.cxx.
|
inlinenoexcept |
Definition at line 117 of file whichranges.hxx.
| void WhichRangesContainer::reset | ( | ) |
Definition at line 1505 of file itemset.cxx.
References m_bOwnRanges, m_pairs, and m_size.
Referenced by SfxItemPool_Impl::DeleteItems(), SfxItemPool::FillItemIdRanges_Impl(), operator=(), SfxItemSet::~SfxItemSet(), and ~WhichRangesContainer().
|
inlinenoexcept |
Definition at line 116 of file whichranges.hxx.
Referenced by SfxItemSet::Equals(), SfxWhichIter::GetCurWhich(), MergeRange(), SfxWhichIter::NextWhich(), SfxItemSet::SfxItemSet(), and svl::detail::validRanges2().
| bool WhichRangesContainer::m_bOwnRanges = false |
if true, we allocated and need to delete the pairs, if not, we are pointing at a global const literal
Definition at line 86 of file whichranges.hxx.
Referenced by operator=(), reset(), and WhichRangesContainer().
| WhichPair const* WhichRangesContainer::m_pairs = nullptr |
Definition at line 82 of file whichranges.hxx.
Referenced by operator=(), operator==(), reset(), and WhichRangesContainer().
| sal_Int32 WhichRangesContainer::m_size = 0 |
Definition at line 83 of file whichranges.hxx.
Referenced by operator=(), operator==(), reset(), and WhichRangesContainer().