List of all members | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes
utl::BasicVector< HepVector >::CCartesian Class Reference

Class to have a type for indicating cartesian coordinate components. More...

#include <BasicVector.h>

Inheritance diagram for utl::BasicVector< HepVector >::CCartesian:
Inheritance graph
[legend]

Public Types

enum  Kind { eCartesian = 0, eCylindrical = 1, eSpherical = 2 }
 Coordinate type integral typification. More...
 
typedef
utl::ConsecutiveEnumFactory
< Kind, eSpherical, fgKindTags,
utl::ThrowPolicy< Kind,
CoordinateSystemException > > 
KindCreator
 Convenience typedef for creation of Kind enumerators. More...
 

Public Member Functions

virtual double X (double x, double, double) const override
 
virtual double Y (double, double y, double) const override
 
virtual double Z (double, double, double z) const override
 

Static Public Member Functions

static const CoordinateTypeCreate (const Kind k)
 Factory method via enumeration. More...
 

Static Public Attributes

static const char *const fgKindTags [3] = { "cartesian", "cylindrical", "spherical" }
 

Detailed Description

template<class HepVector>
class utl::BasicVector< HepVector >::CCartesian

Class to have a type for indicating cartesian coordinate components.

Using a constant of this class allows to use virtual calls or overload resolution to select the correct constructor or transformation therein, when initialising the cartesian representation of a vector. Check the way the constructors of this class are defined.

The concrete implementations of this class provide the functions x, y, and z to compute the transformation from a given coordinate representation to Cartesian coordinates.

Only a single instance of this class exists as a public, static, constant member of this class.

Definition at line 116 of file BasicVector.h.

Member Typedef Documentation

Convenience typedef for creation of Kind enumerators.

Definition at line 79 of file BasicVector.h.

Member Enumeration Documentation

template<class HepVector>
enum utl::BasicVector::CoordinateType::Kind
inherited

Coordinate type integral typification.

Alternative typification via integral values for ease of streaming. Note that the values are explicitly defined with the integral value to be used in XML, binary files or database.

Enumerator
eCartesian 
eCylindrical 
eSpherical 

Definition at line 62 of file BasicVector.h.

Member Function Documentation

template<class HepVector>
static const CoordinateType& utl::BasicVector< HepVector >::CoordinateType::Create ( const Kind  k)
inlinestaticinherited
template<class HepVector>
virtual double utl::BasicVector< HepVector >::CCartesian::X ( double  x,
double  ,
double   
) const
inlineoverridevirtual

Implements utl::BasicVector< HepVector >::CoordinateType.

Definition at line 118 of file BasicVector.h.

template<class HepVector>
virtual double utl::BasicVector< HepVector >::CCartesian::Y ( double  ,
double  y,
double   
) const
inlineoverridevirtual

Implements utl::BasicVector< HepVector >::CoordinateType.

Definition at line 119 of file BasicVector.h.

template<class HepVector>
virtual double utl::BasicVector< HepVector >::CCartesian::Z ( double  ,
double  ,
double  z 
) const
inlineoverridevirtual

Implements utl::BasicVector< HepVector >::CoordinateType.

Definition at line 120 of file BasicVector.h.

Member Data Documentation

template<class HepVector>
const char *const utl::BasicVector< HepVector >::CoordinateType::fgKindTags = { "cartesian", "cylindrical", "spherical" }
staticinherited

Coordinate type string typification Alternative typification via strings for ease of streaming and clarity.

Definition at line 71 of file BasicVector.h.


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

, generated on Tue Sep 26 2023.