www.mooseframework.org
Public Member Functions | Private Attributes | List of all members
DependencyResolverComparator< T > Class Template Reference

#include <DependencyResolver.h>

Public Member Functions

 DependencyResolverComparator (const std::vector< T > &original_order)
 
bool operator() (const T &a, const T &b) const
 

Private Attributes

const std::vector< T > & _original_order
 

Detailed Description

template<typename T>
class DependencyResolverComparator< T >

Definition at line 32 of file DependencyResolver.h.

Constructor & Destructor Documentation

template<typename T>
DependencyResolverComparator< T >::DependencyResolverComparator ( const std::vector< T > &  original_order)
inline

Definition at line 35 of file DependencyResolver.h.

36  : _original_order(original_order)
37  {
38  }
const std::vector< T > & _original_order

Member Function Documentation

template<typename T>
bool DependencyResolverComparator< T >::operator() ( const T &  a,
const T &  b 
) const
inline

Compare the iterators based on their original ordering.

Definition at line 40 of file DependencyResolver.h.

Referenced by DependencyResolver< std::string >::~DependencyResolver().

41  {
42  auto a_it = std::find(_original_order.begin(), _original_order.end(), a);
43  auto b_it = std::find(_original_order.begin(), _original_order.end(), b);
44 
45  mooseAssert(a_it != _original_order.end(), "Bad DependencyResolverComparator request");
46  mooseAssert(b_it != _original_order.end(), "Bad DependencyResolverComparator request");
47 
51  return a_it < b_it;
52  }
const std::vector< T > & _original_order

Member Data Documentation

template<typename T>
const std::vector<T>& DependencyResolverComparator< T >::_original_order
private

Definition at line 55 of file DependencyResolver.h.

Referenced by DependencyResolverComparator< T >::operator()().


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