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

#include <frameformats.hxx>

Inheritance diagram for sw::FrameFormats< value_type >:
[legend]
Collaboration diagram for sw::FrameFormats< value_type >:
[legend]

Classes

struct  ByPos
 
struct  ByTypeAndName
 
struct  FrameFormatsKey
 

Public Types

typedef std::add_pointer< typenamestd::add_const< typenamestd::remove_pointer< value_type >::type >::type >::type const_value_type
 
typedef FrameFormatsContainer::size_type size_type
 
typedef FrameFormatsContainer::template index< ByPos >::type index_type
 
typedef index_type::iterator iterator
 
typedef index_type::const_iterator const_iterator
 
typedef FrameFormatsContainer::template index< ByTypeAndName >::type name_index_type
 
typedef name_index_type::iterator name_iterator
 
typedef name_index_type::const_iterator const_name_iterator
 
typedef std::pair< const_name_iterator, const_name_iteratorrange_type
 

Public Member Functions

 FrameFormats ()
 
virtual ~FrameFormats () override
 
bool empty () const
 
size_t size () const
 
std::pair< const_iterator, bool > push_back (const value_type &x)
 
bool erase (const value_type &x)
 
void erase (size_type index)
 
void erase (const_iterator const &position)
 
const_iterator find (const value_type &x) const
 
const_name_iterator findByTypeAndName (sal_uInt16 type, const OUString &name) const
 
range_type findRangeByName (const OUString &rName) const
 
const_name_iterator typeAndNameEnd () const
 
const value_type & operator[] (size_t index) const
 
const value_type & front () const
 
const value_type & back () const
 
const_iterator begin () const
 
const_iterator end () const
 
void dumpAsXml (xmlTextWriterPtr pWriter, const char *pName) const
 
virtual size_t GetFormatCount () const override
 
virtual SwFormatGetFormat (size_t idx) const override
 
virtual void Rename (const SwFrameFormat &rFormat, const OUString &sNewName) override
 
bool ContainsFormat (const value_type &rpFormat) const
 fast check if given format is contained here @precond pFormat must not have been deleted More...
 
bool IsAlive (const_value_type pFrameFormat) const
 not so fast check that given format is still alive (i.e. contained here) More...
 
void DeleteAndDestroyAll (bool keepDefault=false)
 
bool newDefault (const value_type &x)
 
void newDefault (const_iterator const &position)
 
value_type FindFrameFormatByName (const OUString &rName) const
 
- Public Member Functions inherited from SwFormatsBase
virtual size_t GetFormatCount () const =0
 
virtual SwFormatGetFormat (size_t idx) const =0
 
virtual ~SwFormatsBase ()
 
virtual SwFormatFindFormatByName (const OUString &rName) const
 
virtual void Rename (const SwFrameFormat &, const OUString &)
 
 SwFormatsBase ()=default
 
 SwFormatsBase (SwFormatsBase const &)=default
 
 SwFormatsBase (SwFormatsBase &&)=default
 
SwFormatsBaseoperator= (SwFormatsBase const &)=default
 
SwFormatsBaseoperator= (SwFormatsBase &&)=default
 

Private Types

typedef boost::multi_index_container< value_type, boost::multi_index::indexed_by< boost::multi_index::random_access< boost::multi_index::tag< ByPos > >, boost::multi_index::ordered_unique< boost::multi_index::tag< ByTypeAndName >, FrameFormatsKey > > > FrameFormatsContainer
 

Private Member Functions

index_typeGetByPos ()
 
name_index_typeGetByTypeAndName ()
 
const index_typeGetByPos () const
 
const name_index_typeGetByTypeAndName () const
 

Private Attributes

FrameFormatsContainer m_vContainer
 

Friends

class ::SwFrameFormat
 

Detailed Description

template<class value_type>
class sw::FrameFormats< value_type >

Definition at line 41 of file frameformats.hxx.

Member Typedef Documentation

◆ const_iterator

template<class value_type >
typedef index_type::const_iterator sw::FrameFormats< value_type >::const_iterator

Definition at line 75 of file frameformats.hxx.

◆ const_name_iterator

template<class value_type >
typedef name_index_type::const_iterator sw::FrameFormats< value_type >::const_name_iterator

Definition at line 78 of file frameformats.hxx.

◆ const_value_type

template<class value_type >
typedef std::add_pointer<typenamestd::add_const<typenamestd::remove_pointer<value_type>::type>::type>::type sw::FrameFormats< value_type >::const_value_type

Definition at line 71 of file frameformats.hxx.

◆ FrameFormatsContainer

template<class value_type >
typedef boost::multi_index_container< value_type, boost::multi_index::indexed_by< boost::multi_index::random_access<boost::multi_index::tag<ByPos> >, boost::multi_index::ordered_unique<boost::multi_index::tag<ByTypeAndName>, FrameFormatsKey> > > sw::FrameFormats< value_type >::FrameFormatsContainer
private

Definition at line 63 of file frameformats.hxx.

◆ index_type

template<class value_type >
typedef FrameFormatsContainer::template index<ByPos>::type sw::FrameFormats< value_type >::index_type

Definition at line 73 of file frameformats.hxx.

◆ iterator

template<class value_type >
typedef index_type::iterator sw::FrameFormats< value_type >::iterator

Definition at line 74 of file frameformats.hxx.

◆ name_index_type

template<class value_type >
typedef FrameFormatsContainer::template index<ByTypeAndName>::type sw::FrameFormats< value_type >::name_index_type

Definition at line 76 of file frameformats.hxx.

◆ name_iterator

template<class value_type >
typedef name_index_type::iterator sw::FrameFormats< value_type >::name_iterator

Definition at line 77 of file frameformats.hxx.

◆ range_type

template<class value_type >
typedef std::pair<const_name_iterator, const_name_iterator> sw::FrameFormats< value_type >::range_type

Definition at line 79 of file frameformats.hxx.

◆ size_type

template<class value_type >
typedef FrameFormatsContainer::size_type sw::FrameFormats< value_type >::size_type

Definition at line 72 of file frameformats.hxx.

Constructor & Destructor Documentation

◆ FrameFormats()

template<class value_type >
sw::FrameFormats< value_type >::FrameFormats ( )
inline

Definition at line 92 of file frameformats.hxx.

◆ ~FrameFormats()

template<class value_type >
virtual sw::FrameFormats< value_type >::~FrameFormats ( )
inlineoverridevirtual

Member Function Documentation

◆ back()

template<class value_type >
const value_type & sw::FrameFormats< value_type >::back ( ) const
inline

Definition at line 155 of file frameformats.hxx.

References sw::FrameFormats< value_type >::GetByPos().

◆ begin()

template<class value_type >
const_iterator sw::FrameFormats< value_type >::begin ( ) const
inline

◆ ContainsFormat()

template<class value_type >
bool sw::FrameFormats< value_type >::ContainsFormat ( const value_type &  rpFormat) const
inline

fast check if given format is contained here @precond pFormat must not have been deleted

Definition at line 189 of file frameformats.hxx.

Referenced by SwUndoFormatAttr::Init().

◆ DeleteAndDestroyAll()

template<class value_type >
void sw::FrameFormats< value_type >::DeleteAndDestroyAll ( bool  keepDefault = false)
inline

◆ dumpAsXml()

template<class value_type >
void sw::FrameFormats< value_type >::dumpAsXml ( xmlTextWriterPtr  pWriter,
const char *  pName 
) const
inline

Definition at line 159 of file frameformats.hxx.

References sw::FrameFormats< value_type >::GetByPos(), and pName.

◆ empty()

template<class value_type >
bool sw::FrameFormats< value_type >::empty ( ) const
inline

◆ end()

template<class value_type >
const_iterator sw::FrameFormats< value_type >::end ( ) const
inline

◆ erase() [1/3]

template<class value_type >
bool sw::FrameFormats< value_type >::erase ( const value_type &  x)
inline

◆ erase() [2/3]

template<class value_type >
void sw::FrameFormats< value_type >::erase ( const_iterator const &  position)
inline

◆ erase() [3/3]

template<class value_type >
void sw::FrameFormats< value_type >::erase ( size_type  index)
inline

◆ find()

template<class value_type >
const_iterator sw::FrameFormats< value_type >::find ( const value_type &  x) const
inline

◆ findByTypeAndName()

template<class value_type >
const_name_iterator sw::FrameFormats< value_type >::findByTypeAndName ( sal_uInt16  type,
const OUString &  name 
) const
inline

Definition at line 138 of file frameformats.hxx.

References sw::FrameFormats< value_type >::GetByTypeAndName(), name, and type.

◆ FindFrameFormatByName()

template<class value_type >
value_type sw::FrameFormats< value_type >::FindFrameFormatByName ( const OUString &  rName) const
inline

Definition at line 227 of file frameformats.hxx.

References sw::FrameFormats< value_type >::GetByTypeAndName(), and idx.

◆ findRangeByName()

template<class value_type >
range_type sw::FrameFormats< value_type >::findRangeByName ( const OUString &  rName) const
inline

◆ front()

template<class value_type >
const value_type & sw::FrameFormats< value_type >::front ( ) const
inline

Definition at line 154 of file frameformats.hxx.

References sw::FrameFormats< value_type >::GetByPos().

◆ GetByPos() [1/2]

template<class value_type >
index_type & sw::FrameFormats< value_type >::GetByPos ( )
inlineprivate

◆ GetByPos() [2/2]

template<class value_type >
const index_type & sw::FrameFormats< value_type >::GetByPos ( ) const
inlineprivate

Definition at line 85 of file frameformats.hxx.

References sw::FrameFormats< value_type >::m_vContainer.

◆ GetByTypeAndName() [1/2]

template<class value_type >
name_index_type & sw::FrameFormats< value_type >::GetByTypeAndName ( )
inlineprivate

◆ GetByTypeAndName() [2/2]

template<class value_type >
const name_index_type & sw::FrameFormats< value_type >::GetByTypeAndName ( ) const
inlineprivate

Definition at line 86 of file frameformats.hxx.

References sw::FrameFormats< value_type >::m_vContainer.

◆ GetFormat()

template<class value_type >
virtual SwFormat * sw::FrameFormats< value_type >::GetFormat ( size_t  idx) const
inlineoverridevirtual

Implements SwFormatsBase.

Definition at line 168 of file frameformats.hxx.

References idx, and sw::FrameFormats< value_type >::operator[]().

◆ GetFormatCount()

template<class value_type >
virtual size_t sw::FrameFormats< value_type >::GetFormatCount ( ) const
inlineoverridevirtual

Implements SwFormatsBase.

Definition at line 167 of file frameformats.hxx.

References sw::FrameFormats< value_type >::m_vContainer.

◆ IsAlive()

template<class value_type >
bool sw::FrameFormats< value_type >::IsAlive ( const_value_type  pFrameFormat) const
inline

not so fast check that given format is still alive (i.e. contained here)

Definition at line 192 of file frameformats.hxx.

◆ newDefault() [1/2]

template<class value_type >
bool sw::FrameFormats< value_type >::newDefault ( const value_type &  x)
inline

◆ newDefault() [2/2]

template<class value_type >
void sw::FrameFormats< value_type >::newDefault ( const_iterator const &  position)
inline

◆ operator[]()

template<class value_type >
const value_type & sw::FrameFormats< value_type >::operator[] ( size_t  index) const
inline

◆ push_back()

template<class value_type >
std::pair< const_iterator, bool > sw::FrameFormats< value_type >::push_back ( const value_type &  x)
inline

◆ Rename()

template<class value_type >
virtual void sw::FrameFormats< value_type >::Rename ( const SwFrameFormat rFormat,
const OUString &  sNewName 
)
inlineoverridevirtual

◆ size()

template<class value_type >
size_t sw::FrameFormats< value_type >::size ( ) const
inline

◆ typeAndNameEnd()

template<class value_type >
const_name_iterator sw::FrameFormats< value_type >::typeAndNameEnd ( ) const
inline

Friends And Related Function Documentation

◆ ::SwFrameFormat

template<class value_type >
friend class ::SwFrameFormat
friend

Definition at line 65 of file frameformats.hxx.

Member Data Documentation

◆ m_vContainer

template<class value_type >
FrameFormatsContainer sw::FrameFormats< value_type >::m_vContainer
private

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