ome-xml  5.5.1
Public Member Functions | Private Attributes | List of all members
ome::xml::model::detail::OMEModelObject::compare_element< T > Class Template Reference

Comparison functor. More...

#include <ome/xml/model/detail/OMEModelObject.h>

Public Member Functions

 compare_element (const std::shared_ptr< const T > &cmp)
 Constructor. More...
 
bool operator() (const std::shared_ptr< T > &element)
 Compare element with another element. More...
 
bool operator() (const std::shared_ptr< const T > &element)
 Compare element with another element. More...
 
bool operator() (const std::weak_ptr< T > &element)
 Compare element with another element. More...
 
bool operator() (const std::weak_ptr< const T > &element)
 Compare element with another element. More...
 

Private Attributes

const std::shared_ptr< const T > & cmp
 The element to compare other elements with.
 

Detailed Description

template<typename T>
class ome::xml::model::detail::OMEModelObject::compare_element< T >

Comparison functor.

Compares the referenced object with the object reference passed by the function operator. All objects must be shared_ptr or weak_ptr of the same type (or castable to the same type).

Note
This is a shared_ptr comparison, not a value comparison.

Constructor & Destructor Documentation

template<typename T >
ome::xml::model::detail::OMEModelObject::compare_element< T >::compare_element ( const std::shared_ptr< const T > &  cmp)
inline

Constructor.

Parameters
cmpthe element to compare other elements with.

Member Function Documentation

template<typename T >
bool ome::xml::model::detail::OMEModelObject::compare_element< T >::operator() ( const std::shared_ptr< T > &  element)
inline

Compare element with another element.

Parameters
elementthe element to compare the original element with.
Returns
true if the elements are the same, otherwise false.

References ome::xml::model::detail::OMEModelObject::compare_element< T >::cmp.

template<typename T >
bool ome::xml::model::detail::OMEModelObject::compare_element< T >::operator() ( const std::shared_ptr< const T > &  element)
inline

Compare element with another element.

Parameters
elementthe element to compare the original element with.
Returns
true if the elements are the same, otherwise false.

References ome::xml::model::detail::OMEModelObject::compare_element< T >::cmp.

template<typename T >
bool ome::xml::model::detail::OMEModelObject::compare_element< T >::operator() ( const std::weak_ptr< T > &  element)
inline

Compare element with another element.

Parameters
elementthe element to compare the original element with.
Returns
true if the elements are the same, otherwise false.

References ome::xml::model::detail::OMEModelObject::compare_element< T >::cmp.

template<typename T >
bool ome::xml::model::detail::OMEModelObject::compare_element< T >::operator() ( const std::weak_ptr< const T > &  element)
inline

Compare element with another element.

Parameters
elementthe element to compare the original element with.
Returns
true if the elements are the same, otherwise false.

References ome::xml::model::detail::OMEModelObject::compare_element< T >::cmp.


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