OpenMS  2.8.0
Functions
OpenMS::Helpers Namespace Reference

Functions

template<class ContainerType >
Size indexOf (const ContainerType &cont, const typename ContainerType::value_type &val)
 
template<class T >
const std::vector< boost::shared_ptr< const T > > & constifyPointerVector (const std::vector< boost::shared_ptr< T > > &vec)
 Helper function to add constness to a vector of shared pointers. More...
 
template<class PtrType >
bool cmpPtrSafe (const PtrType &a, const PtrType &b)
 Helper comparing two pointers for equality (taking NULL into account) More...
 
template<class ContainerType >
bool cmpPtrContainer (const ContainerType &a, const ContainerType &b)
 Helper function to compare two pointer-containers for equality of all elements. More...
 

Function Documentation

◆ cmpPtrContainer()

bool OpenMS::Helpers::cmpPtrContainer ( const ContainerType &  a,
const ContainerType &  b 
)
inline

Helper function to compare two pointer-containers for equality of all elements.

References cmpPtrSafe().

◆ cmpPtrSafe()

bool OpenMS::Helpers::cmpPtrSafe ( const PtrType &  a,
const PtrType &  b 
)
inline

Helper comparing two pointers for equality (taking NULL into account)

Referenced by cmpPtrContainer().

◆ constifyPointerVector()

const std::vector<boost::shared_ptr<const T> >& OpenMS::Helpers::constifyPointerVector ( const std::vector< boost::shared_ptr< T > > &  vec)

Helper function to add constness to a vector of shared pointers.

◆ indexOf()

Size OpenMS::Helpers::indexOf ( const ContainerType &  cont,
const typename ContainerType::value_type &  val 
)

return the index of an element in a container useful for matching 'names_of_...' arrays to their enum value

Referenced by TOPPViewBase::loadFiles().