ATLAS Offline Software
Functions
DVL_iter_swap.h File Reference

Specializations of iter_swap for DataVector/DataList. More...

#include "AthContainers/tools/DVLIterator.h"
#include "AthContainers/tools/ATHCONTAINERS_ASSERT.h"
#include <iterator>
Include dependency graph for DVL_iter_swap.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

template<class DV >
void std::iter_swap (typename DataModel_detail::iterator< DV > a, typename DataModel_detail::iterator< DV > b)
 Specialization of iter_swap for DataVector/DataList. More...
 
template<class DV >
void std::iter_swap (typename std::reverse_iterator< DataModel_detail::iterator< DV > > a, typename std::reverse_iterator< DataModel_detail::iterator< DV > > b)
 Specialization of iter_swap for DataVector/DataList. More...
 
template<class DV >
DataModel_detail::iterator< DV > std::swap_ranges (DataModel_detail::iterator< DV > first1, DataModel_detail::iterator< DV > last1, DataModel_detail::iterator< DV > first2)
 Specialization of swap_ranges for DataVector/DataList. More...
 
template<class DV >
std::reverse_iterator< DataModel_detail::iterator< DV > > std::swap_ranges (std::reverse_iterator< DataModel_detail::iterator< DV > > first1, std::reverse_iterator< DataModel_detail::iterator< DV > > last1, std::reverse_iterator< DataModel_detail::iterator< DV > > first2)
 Specialization of swap_ranges for DataVector/DataList. More...
 

Detailed Description

Specializations of iter_swap for DataVector/DataList.

Author
scott snyder snyde.nosp@m.r@bn.nosp@m.l.gov
Date
Sep, 2010

Definition in file DVL_iter_swap.h.

Function Documentation

◆ iter_swap() [1/2]

template<class DV >
void std::iter_swap ( typename DataModel_detail::iterator< DV >  a,
typename DataModel_detail::iterator< DV >  b 
)

Specialization of iter_swap for DataVector/DataList.

Parameters
aFirst iterator for the swap.
bSecond iterator for the swap.

Swaps *a with *b, respecting the DataVector/List ownership rules.

Definition at line 36 of file DVL_iter_swap.h.

38 {
39  DV::iter_swap (a, b);
40 }

◆ iter_swap() [2/2]

template<class DV >
void std::iter_swap ( typename std::reverse_iterator< DataModel_detail::iterator< DV > >  a,
typename std::reverse_iterator< DataModel_detail::iterator< DV > >  b 
)

Specialization of iter_swap for DataVector/DataList.

Parameters
aFirst reverse_iterator for the swap.
bSecond reverse_iterator for the swap.

Swaps *a with *b, respecting the DataVector/List ownership rules.

Definition at line 52 of file DVL_iter_swap.h.

54 {
57  --ai;
58  --bi;
59  DV::iter_swap (ai, bi);
60 }

◆ swap_ranges() [1/2]

template<class DV >
DataModel_detail::iterator<DV> std::swap_ranges ( DataModel_detail::iterator< DV >  first1,
DataModel_detail::iterator< DV >  last1,
DataModel_detail::iterator< DV >  first2 
)

Specialization of swap_ranges for DataVector/DataList.

Parameters
first1Start of the first range.
lastEnd of the first range.
first2Start of the second range.

Swap, element-by-element, the two ranges [first1, last) and [first2, first2+(last-first1)).

Definition at line 74 of file DVL_iter_swap.h.

77 {
78 
79  for (; first1 != last1; ++first1, ++first2)
80  std::iter_swap(first1, first2);
81  return first2;
82 }

◆ swap_ranges() [2/2]

template<class DV >
std::reverse_iterator<DataModel_detail::iterator<DV> > std::swap_ranges ( std::reverse_iterator< DataModel_detail::iterator< DV > >  first1,
std::reverse_iterator< DataModel_detail::iterator< DV > >  last1,
std::reverse_iterator< DataModel_detail::iterator< DV > >  first2 
)

Specialization of swap_ranges for DataVector/DataList.

Parameters
first1Start of the first range.
lastEnd of the first range.
first2Start of the second range.

Swap, element-by-element, the two ranges [first1, last) and [first2, first2+(last-first1)).

Definition at line 96 of file DVL_iter_swap.h.

99 {
100 
101  for (; first1 != last1; ++first1, ++first2)
102  std::iter_swap(first1, first2);
103  return first2;
104 }
DataModel_detail::iterator
(Non-const) Iterator class for DataVector/DataList.
Definition: DVLIterator.h:184
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
a
TList * a
Definition: liststreamerinfos.cxx:10