BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
|
Simple two vector that's templated so the right type can be used. More...
#include <BDSTwoVector.hh>
Public Member Functions | |
BDSTwoVector () | |
Default constructor. | |
BDSTwoVector (T x, T y) | |
Alternate constructor. | |
BDSTwoVector (const BDSTwoVector &other) | |
Copy constructor. | |
BDSTwoVector & | operator= (const BDSTwoVector &rhs) |
Assignment operator. | |
T & | operator[] (const G4int index) |
Access / set a single element. | |
const T & | operator[] (const G4int index) const |
const T & | x () const |
Accessor by name. | |
const T & | y () const |
Accessor by name. | |
Private Attributes | |
T | values [2] |
Member data - x,y. | |
Friends | |
std::ostream & | operator<< (std::ostream &out, BDSTwoVector const &v) |
Output stream. | |
Simple two vector that's templated so the right type can be used.
Only the assigment operator is provided, other than that it's simple access and setting only.
Definition at line 37 of file BDSTwoVector.hh.
|
inline |
Default constructor.
Definition at line 41 of file BDSTwoVector.hh.
References BDSTwoVector< T >::values.
|
inline |
Alternate constructor.
Definition at line 45 of file BDSTwoVector.hh.
References BDSTwoVector< T >::values, BDSTwoVector< T >::x(), and BDSTwoVector< T >::y().
|
inline |
Copy constructor.
Definition at line 49 of file BDSTwoVector.hh.
References BDSTwoVector< T >::values.
|
inline |
Assignment operator.
Definition at line 56 of file BDSTwoVector.hh.
References BDSTwoVector< T >::values.
|
inline |
Access / set a single element.
Definition at line 66 of file BDSTwoVector.hh.
References BDSTwoVector< T >::values.
|
inline |
Definition at line 74 of file BDSTwoVector.hh.
|
inline |
Accessor by name.
Definition at line 82 of file BDSTwoVector.hh.
References BDSTwoVector< T >::values.
Referenced by BDSTwoVector< T >::BDSTwoVector().
|
inline |
Accessor by name.
Definition at line 83 of file BDSTwoVector.hh.
References BDSTwoVector< T >::values.
Referenced by BDSTwoVector< T >::BDSTwoVector().
|
friend |
Output stream.
Definition at line 87 of file BDSTwoVector.hh.
|
private |
Member data - x,y.
Definition at line 92 of file BDSTwoVector.hh.
Referenced by BDSTwoVector< T >::BDSTwoVector(), BDSTwoVector< T >::operator=(), BDSTwoVector< T >::operator[](), BDSTwoVector< T >::x(), and BDSTwoVector< T >::y().