ProteoWizard
Public Types | Public Member Functions | Private Attributes
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>

List of all members.

Public Types

typedef const OrderedPairconst_iterator

Public Member Functions

 OrderedPairContainerRef (const void *begin, const void *end)
 constructor for wrapping array of contiguous data
template<typename T >
 OrderedPairContainerRef (const std::vector< T > &v)
 template constructor for automatic conversion from vector; e.g.
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

Definition at line 101 of file OrderedPair.hpp.


Constructor & Destructor Documentation

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.

: begin_(reinterpret_cast<const OrderedPair*>(begin)),
end_(reinterpret_cast<const OrderedPair*>(end))
{}
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.

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

Member Function Documentation

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

Definition at line 103 of file OrderedPair.hpp.

References begin_.

Referenced by testContainer().

{return begin_;}
const_iterator pwiz::math::OrderedPairContainerRef::end ( ) const
inline

Definition at line 104 of file OrderedPair.hpp.

References end_.

Referenced by testContainer().

{return end_;}
size_t pwiz::math::OrderedPairContainerRef::size ( ) const
inline

Definition at line 105 of file OrderedPair.hpp.

References begin_, and end_.

Referenced by testContainer().

{return end_-begin_;}
const OrderedPair& pwiz::math::OrderedPairContainerRef::operator[] ( size_t  index) const
inline

Definition at line 106 of file OrderedPair.hpp.

References begin_.

{return *(begin_+index);}

Member Data Documentation

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

Definition at line 110 of file OrderedPair.hpp.

Referenced by begin(), operator[](), and size().

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

Definition at line 111 of file OrderedPair.hpp.

Referenced by end(), and size().


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