A Discrete-Event Network Simulator
API
Array2D< T > Class Template Reference

2D array used in nix-vector-routing example "nms-p2p-nix.cc" More...

+ Collaboration diagram for Array2D< T >:

Public Member Functions

 Array2D (const size_t x, const size_t y)
 Constructor. More...
 
 ~Array2D (void)
 
T * operator[] (const size_t i)
 Accessor operator. More...
 

Private Attributes

const size_t m_xMax
 maximum number of rows More...
 
T ** p
 Stored elements. More...
 

Detailed Description

template<typename T>
class Array2D< T >

2D array used in nix-vector-routing example "nms-p2p-nix.cc"

Definition at line 75 of file nms-p2p-nix.cc.

Constructor & Destructor Documentation

◆ Array2D()

template<typename T >
Array2D< T >::Array2D ( const size_t  x,
const size_t  y 
)
inline

Constructor.

Parameters
xnumber of rows
ynumber of columns

Definition at line 83 of file nms-p2p-nix.cc.

References Array2D< T >::m_xMax, and Array2D< T >::p.

◆ ~Array2D()

template<typename T >
Array2D< T >::~Array2D ( void  )
inline

Definition at line 90 of file nms-p2p-nix.cc.

References Array2D< T >::m_xMax, and Array2D< T >::p.

Member Function Documentation

◆ operator[]()

template<typename T >
T * Array2D< T >::operator[] ( const size_t  i)
inline

Accessor operator.

Parameters
iindex to be retrieved
Returns
a pointer to the indexed element

Definition at line 103 of file nms-p2p-nix.cc.

References Array2D< T >::p.

Member Data Documentation

◆ m_xMax

template<typename T >
const size_t Array2D< T >::m_xMax
private

maximum number of rows

Definition at line 109 of file nms-p2p-nix.cc.

Referenced by Array2D< T >::Array2D(), and Array2D< T >::~Array2D().

◆ p

template<typename T >
T** Array2D< T >::p
private

Stored elements.

Definition at line 108 of file nms-p2p-nix.cc.

Referenced by Array2D< T >::Array2D(), Array2D< T >::~Array2D(), and Array2D< T >::operator[]().


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