INET Framework for OMNeT++/OMNEST
inet::SpatialGrid::Triplet< T > Class Template Reference

#include <SpatialGrid.h>

Public Member Functions

 Triplet ()
 
 Triplet (T xNum, T yNum, T zNum)
 
Toperator[] (int i)
 
const Toperator[] (int i) const
 

Public Attributes

T x
 
T y
 
T z
 

Constructor & Destructor Documentation

template<typename T>
inet::SpatialGrid::Triplet< T >::Triplet ( )
inline
45 : x(0), y(0), z(0) {}
T z
Definition: SpatialGrid.h:44
T x
Definition: SpatialGrid.h:42
T y
Definition: SpatialGrid.h:43
template<typename T>
inet::SpatialGrid::Triplet< T >::Triplet ( T  xNum,
T  yNum,
T  zNum 
)
inline
46  :
47  x(xNum), y(yNum), z(zNum) {}
T z
Definition: SpatialGrid.h:44
T x
Definition: SpatialGrid.h:42
T y
Definition: SpatialGrid.h:43

Member Function Documentation

template<typename T>
T& inet::SpatialGrid::Triplet< T >::operator[] ( int  i)
inline
49  {
50  switch (i)
51  {
52  case 0: return x;
53  case 1: return y;
54  case 2: return z;
55  default:
56  throw cRuntimeError("Out of range with index: %d", i);
57  }
58  }
T z
Definition: SpatialGrid.h:44
T x
Definition: SpatialGrid.h:42
T y
Definition: SpatialGrid.h:43
template<typename T>
const T& inet::SpatialGrid::Triplet< T >::operator[] ( int  i) const
inline
60  {
61  switch (i)
62  {
63  case 0: return x;
64  case 1: return y;
65  case 2: return z;
66  default:
67  throw cRuntimeError("Out of range with index: %d", i);
68  }
69  }
T z
Definition: SpatialGrid.h:44
T x
Definition: SpatialGrid.h:42
T y
Definition: SpatialGrid.h:43

Member Data Documentation


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