CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

npstat::Element1DAt< Container, Result > Struct Template Reference

#include <SimpleFunctors.h>

Inheritance diagram for npstat::Element1DAt< Container, Result >:
npstat::Functor1< Result, Container >

List of all members.

Public Member Functions

 Element1DAt (const unsigned long index)
Result operator() (const Container &c) const

Private Member Functions

 Element1DAt ()

Private Attributes

unsigned long idx

Detailed Description

template<class Container, class Result = typename Container::value_type>
struct npstat::Element1DAt< Container, Result >

Functor which extracts a given element from a random access linear container with bounds checking

Definition at line 216 of file SimpleFunctors.h.


Constructor & Destructor Documentation

template<class Container , class Result = typename Container::value_type>
npstat::Element1DAt< Container, Result >::Element1DAt ( const unsigned long  index) [inline, explicit]

Definition at line 218 of file SimpleFunctors.h.

: idx(index) {}
template<class Container , class Result = typename Container::value_type>
npstat::Element1DAt< Container, Result >::Element1DAt ( ) [private]

Member Function Documentation

template<class Container , class Result = typename Container::value_type>
Result npstat::Element1DAt< Container, Result >::operator() ( const Container &  c) const [inline, virtual]

Implements npstat::Functor1< Result, Container >.

Definition at line 220 of file SimpleFunctors.h.

References npstat::Element1DAt< Container, Result >::idx.

{return c.at(idx);}

Member Data Documentation

template<class Container , class Result = typename Container::value_type>
unsigned long npstat::Element1DAt< Container, Result >::idx [private]