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 27 of file DependencyResolver.h.

Constructor & Destructor Documentation

◆ DependencyResolverComparator()

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

Definition at line 30 of file DependencyResolver.h.

31  : _original_order(original_order)
32  {
33  }
const std::vector< T > & _original_order

Member Function Documentation

◆ operator()()

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 35 of file DependencyResolver.h.

36  {
37  auto a_it = std::find(_original_order.begin(), _original_order.end(), a);
38  auto b_it = std::find(_original_order.begin(), _original_order.end(), b);
39 
40  mooseAssert(a_it != _original_order.end(), "Bad DependencyResolverComparator request");
41  mooseAssert(b_it != _original_order.end(), "Bad DependencyResolverComparator request");
42 
46  return a_it < b_it;
47  }
const std::vector< T > & _original_order

Member Data Documentation

◆ _original_order

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

Definition at line 50 of file DependencyResolver.h.

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


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