BOSS 7.0.7
BESIII Offline Software System
Loading...
Searching...
No Matches
PartialItr.h
Go to the documentation of this file.
1#ifndef DCHAIN_PARTIALITR_H
2#define DCHAIN_PARTIALITR_H
3// -*- C++ -*-
4//
5// Package: DChain
6// Module: PartialItr
7//
8// Description: a Iterator through one label of a LabeledList.
9//
10// Usage:
11// <usage>
12//
13// Author: Simon Patton
14// Created: Wed Sep 11 21:51:25 EDT 1996
15// $Id: PartialItr.h,v 1.1.1.1 2009/03/03 06:06:56 maqm Exp $
16//
17// Revision history
18//
19// $Log: PartialItr.h,v $
20// Revision 1.1.1.1 2009/03/03 06:06:56 maqm
21// first import of DecayChain
22//
23// Revision 1.1 2006/01/11 20:28:18 cdj
24// massive class renaming, addition of [] for selection and unit tests
25//
26// Revision 1.1.1.1 2000/12/18 22:16:50 cdj
27// imported DChain
28//
29// Revision 1.12 1998/08/28 05:16:08 sjp
30// Updated to use IndexedLabeled classes
31//
32// Revision 1.11 1998/08/21 00:53:59 sjp
33// fixed bad forward declaration
34//
35// Revision 1.10 1997/08/28 06:59:27 sjp
36// Modified files to handle complete templating
37//
38// Revision 1.9 1997/08/26 04:13:26 sjp
39// Made Candidate handling objects into `CandidateClass' Templates
40//
41// Revision 1.8 1997/08/19 23:01:59 sjp
42// Restructured package to be independent of Rock
43//
44// Revision 1.7 1997/08/15 21:32:36 sjp
45// Updated to use <package>/<file>.h include structure.
46// Updated to use bug flags specified in Experiement.h
47//
48// Revision 1.6 1997/01/31 20:17:12 sjp
49// Modified to use the new `bug' include files
50//
51// Revision 1.5 1997/01/22 16:27:31 sjp
52// Fixed error in pre-processor labels
53//
54// Revision 1.4 1997/01/21 20:34:04 sjp
55// Changed CPP flags and include because of library reorganization
56//
57// Revision 1.3 1996/12/31 17:46:42 sjp
58// Replaced ptrdiff with member type distance
59//
60// Revision 1.2 1996/12/20 21:19:21 sjp
61// Extended pathnames for Include files
62//
63// Revision 1.1 1996/11/04 19:36:10 sjp
64// New file for new `List' module
65//
66
67// system include files
68
69// user include files
70#include "DecayChain/Element/conjugation.h" // enumarator
71#include "DecayChain/Iterator/PartialCandidateItr.h" // superclass
74
75
76// forward declarations
77namespace dchain {
78 template < class T > class LabeledParticle ;
79 template < class T , class CandidateClass > class LabeledParticleList ;
80 //template < class T , class CandidateClass > class IndexedLabeledParticles ;
81//
82// Note : some functions are inlines in the declaration becuase too many
83// compiler bugs make it impractical to have definition outside
84// the delcaration! This should be reviewed in the future
85//
86
87template < class T >
88class PartialItr : public PartialCandidateItr< typename T::CandidateClass >
89{
90 // friend classses and functions
91 friend class LabeledParticleList< T , typename T::CandidateClass > ;
92
93 public:
94 // constants, enums and typedefs
95
96 // Constructors and destructor
97 PartialItr( const PartialItr< T >& aOtherItr ) ;
98 //virtual ~PartialItr() ;
99
100 // assignment operator(s)
101 const PartialItr< T >& operator=( const PartialItr< T >& aOtherItr ) ;
102
103 // member functions
104 PartialItr< T >& operator++() ;
105 PartialItr< T > operator++( int ) ;
106 PartialItr< T >& operator--() ;
107 PartialItr< T > operator--( int ) ;
108
109 // const member functions
110 const LabeledParticle< T >& operator*() const ;
111
112 // static member functions
113
114 protected:
115 // Constructors and destructor
116 PartialItr( const IndexedLabeledParticles< T , typename T::CandidateClass >* aList ,
117 const typename candidateitr::size_type aIndex ,
118 const typename conjugation::Label aLabel ) :
119 PartialCandidateItr< typename T::CandidateClass >( aList ,
120 aIndex ,
121 aLabel ) {}
122
123 // protected member functions
124
125 // protected const member functions
126
127 private:
128 // Constructors and destructor
129 PartialItr() ; // stop default
130
131 // private member functions
132
133 // private const member functions
134
135 // data members
136
137 // static data members
138
139} ;
140
141// inline function definitions
142
143// user include files
144//
145// constructors and destructor
146//
147
148template < class T >
149inline
151 PartialCandidateItr< typename T::CandidateClass >( aOtherItr )
152{
153}
154
155//
156// assignment operators
157//
158
159template < class T >
160inline
162{
164 return ( *this ) ;
165}
166
167//
168// member functions
169//
170
171template < class T >
172inline
174{
176 return ( *this ) ;
177}
178
179template < class T >
180inline
182{
183 PartialItr< T > tmp( *this ) ;
185 return ( tmp ) ;
186}
187
188template < class T >
189inline
191{
193 return ( *this ) ;
194}
195
196template < class T >
197inline
199{
200 PartialItr< T > tmp( *this ) ;
202 return ( tmp ) ;
203}
204
205//
206// const member functions
207//
208
209template < class T >
210inline
212{
213 return ( ( *(IndexedLabeledParticles< T , typename T::CandidateClass >*)(this->indexedCandidates()) ).labeledParticleClass( this->index() ) ) ;
214}
215}
216
217#endif /* DCHAIN_PARTIALITR_H */
const PartialCandidateItr< CandidateClass > & operator=(const PartialCandidateItr< CandidateClass > &aOtherItr)
PartialCandidateItr< CandidateClass > & operator--()
PartialCandidateItr< CandidateClass > & operator++()
const LabeledParticle< T > & operator*() const
Definition: PartialItr.h:211
const PartialItr< T > & operator=(const PartialItr< T > &aOtherItr)
Definition: PartialItr.h:161
PartialItr< T > & operator--()
Definition: PartialItr.h:190
PartialItr< T > & operator++()
Definition: PartialItr.h:173