ProteoWizard
Public Types | Public Member Functions | Private Attributes | List of all members
pwiz::math::OrderedPairContainerRef Class Reference

wrapper class for accessing contiguous data as a container of OrderedPairs; note that it does not own the underlying data More...

#include <OrderedPair.hpp>

Public Types

typedef const OrderedPairconst_iterator
 

Public Member Functions

 OrderedPairContainerRef (const void *begin, const void *end)
 constructor for wrapping array of contiguous data More...
 
template<typename T >
 OrderedPairContainerRef (const std::vector< T > &v)
 template constructor for automatic conversion from vector; e.g. More...
 
const_iterator begin () const
 
const_iterator end () const
 
size_t size () const
 
const OrderedPairoperator[] (size_t index) const
 

Private Attributes

const OrderedPairbegin_
 
const OrderedPairend_
 

Detailed Description

wrapper class for accessing contiguous data as a container of OrderedPairs; note that it does not own the underlying data

Definition at line 83 of file OrderedPair.hpp.

Member Typedef Documentation

§ const_iterator

Definition at line 101 of file OrderedPair.hpp.

Constructor & Destructor Documentation

§ OrderedPairContainerRef() [1/2]

pwiz::math::OrderedPairContainerRef::OrderedPairContainerRef ( const void *  begin,
const void *  end 
)
inline

constructor for wrapping array of contiguous data

Definition at line 88 of file OrderedPair.hpp.

89  : begin_(reinterpret_cast<const OrderedPair*>(begin)),
90  end_(reinterpret_cast<const OrderedPair*>(end))
91  {}

§ OrderedPairContainerRef() [2/2]

template<typename T >
pwiz::math::OrderedPairContainerRef::OrderedPairContainerRef ( const std::vector< T > &  v)
inline

template constructor for automatic conversion from vector; e.g.

vector<double>, vector<OrderedPair>, vector<CustomPair>

Definition at line 96 of file OrderedPair.hpp.

97  : begin_(reinterpret_cast<const OrderedPair*>(&v[0])),
98  end_(reinterpret_cast<const OrderedPair*>(&v[0]+v.size()))
99  {}

Member Function Documentation

§ begin()

const_iterator pwiz::math::OrderedPairContainerRef::begin ( ) const
inline

Definition at line 103 of file OrderedPair.hpp.

Referenced by testContainer().

103 {return begin_;}

§ end()

const_iterator pwiz::math::OrderedPairContainerRef::end ( ) const
inline

Definition at line 104 of file OrderedPair.hpp.

Referenced by testContainer().

104 {return end_;}

§ size()

size_t pwiz::math::OrderedPairContainerRef::size ( ) const
inline

Definition at line 105 of file OrderedPair.hpp.

Referenced by testContainer().

105 {return end_-begin_;}

§ operator[]()

const OrderedPair& pwiz::math::OrderedPairContainerRef::operator[] ( size_t  index) const
inline

Definition at line 106 of file OrderedPair.hpp.

106 {return *(begin_+index);}

Member Data Documentation

§ begin_

const OrderedPair* pwiz::math::OrderedPairContainerRef::begin_
private

Definition at line 110 of file OrderedPair.hpp.

§ end_

const OrderedPair* pwiz::math::OrderedPairContainerRef::end_
private

Definition at line 111 of file OrderedPair.hpp.


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