LibreOffice Module sw (master) 1
Public Types | Public Member Functions | Private Types | Private Attributes | List of all members
sw::RingContainer< value_type > Class Template Reference

helper class that provides Svalue_typeL-style container iteration to the ring More...

#include <ring.hxx>

Public Types

typedef RingIterator< value_type > iterator
 
typedef RingIterator< const value_type > const_iterator
 

Public Member Functions

 RingContainer (value_type *pRing)
 
iterator begin ()
 iterator access More...
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 
size_t size () const
 
void merge (RingContainer< value_type > aDestRing)
 Merges two ring containers. More...
 

Private Types

typedef std::remove_const< value_type >::type nonconst_value_type
 

Private Attributes

value_type * m_pStart
 the item in the ring where iteration starts More...
 

Detailed Description

template<typename value_type>
class sw::RingContainer< value_type >

helper class that provides Svalue_typeL-style container iteration to the ring

Definition at line 150 of file ring.hxx.

Member Typedef Documentation

◆ const_iterator

template<typename value_type >
const_iterator

Definition at line 160 of file ring.hxx.

◆ iterator

template<typename value_type >
iterator

Definition at line 159 of file ring.hxx.

◆ nonconst_value_type

template<typename value_type >
typedef std::remove_const<value_type>::type sw::RingContainer< value_type >::nonconst_value_type
private

Definition at line 155 of file ring.hxx.

Constructor & Destructor Documentation

◆ RingContainer()

template<typename value_type >
sw::RingContainer< value_type >::RingContainer ( value_type *  pRing)
inline

Definition at line 158 of file ring.hxx.

Member Function Documentation

◆ begin() [1/2]

template<typename value_type >
RingContainer< value_type >::iterator sw::RingContainer< value_type >::begin
inline

iterator access

for(SwPaM& rCurrentPaM : pPaM->GetRingContainer())
do_stuff(rCurrentPaM); // this gets called on every SwPaM in the same ring as pPaM
PaM is Point and Mark: a selection of the document model.
Definition: pam.hxx:188
ring_container GetRingContainer()
Definition: ring.hxx:240

Definition at line 248 of file ring.hxx.

◆ begin() [2/2]

template<typename value_type >
RingContainer< value_type >::const_iterator sw::RingContainer< value_type >::begin
inline

Definition at line 256 of file ring.hxx.

◆ end() [1/2]

template<typename value_type >
RingContainer< value_type >::iterator sw::RingContainer< value_type >::end
inline

Definition at line 252 of file ring.hxx.

◆ end() [2/2]

template<typename value_type >
RingContainer< value_type >::const_iterator sw::RingContainer< value_type >::end
inline

Definition at line 260 of file ring.hxx.

◆ merge()

template<typename value_type >
void sw::RingContainer< value_type >::merge ( RingContainer< value_type >  aDestRing)
inline

Merges two ring containers.

All item from both ring containers will be in the same ring container in the end. Note: The items of this ring container will be inserted just before item pDestRing

Parameters
pDestRingthe container to merge this container with

Definition at line 182 of file ring.hxx.

References sw::RingContainer< value_type >::m_pStart.

Referenced by SwAutoFormat::DeleteSelImpl(), and SwCursor::FindAll().

◆ size()

template<typename value_type >
size_t sw::RingContainer< value_type >::size ( ) const
inline
Returns
the number of elements in the container

Definition at line 173 of file ring.hxx.

References begin, and end.

Referenced by SwFEShell::Paste().

Member Data Documentation

◆ m_pStart

template<typename value_type >
value_type* sw::RingContainer< value_type >::m_pStart
private

the item in the ring where iteration starts

Definition at line 154 of file ring.hxx.

Referenced by sw::RingContainer< value_type >::merge().


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