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>

Collaboration diagram for sw::RingContainer< value_type >:
[legend]

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 31 of file ring.hxx.

Member Typedef Documentation

template<typename value_type>
const_iterator

Definition at line 160 of file ring.hxx.

template<typename value_type>
iterator

Definition at line 158 of file ring.hxx.

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

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

Definition at line 158 of file ring.hxx.

Member Function Documentation

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

Definition at line 248 of file ring.hxx.

template<typename value_type >
RingContainer< value_type >::const_iterator sw::RingContainer< value_type >::begin ( ) const
inline

Definition at line 256 of file ring.hxx.

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

Definition at line 252 of file ring.hxx.

template<typename value_type >
RingContainer< value_type >::const_iterator sw::RingContainer< value_type >::end ( ) const
inline

Definition at line 260 of file ring.hxx.

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 assert(), and sw::RingContainer< value_type >::m_pStart.

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

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(), and sw_ChangeOffset().

Member Data Documentation

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: