OpenDDS::DCPS::FieldComparator< Sample, Field > Class Template Reference

#include <Comparator_T.h>

Inheritance diagram for OpenDDS::DCPS::FieldComparator< Sample, Field >:

Inheritance graph
[legend]
Collaboration diagram for OpenDDS::DCPS::FieldComparator< Sample, Field >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef Field Sample::* MemberPtr

Public Member Functions

 FieldComparator (MemberPtr mp, ComparatorBase::Ptr next)
bool less (void *lhs_void, void *rhs_void) const
bool equal (void *lhs_void, void *rhs_void) const

Private Attributes

MemberPtr mp_

Detailed Description

template<class Sample, class Field>
class OpenDDS::DCPS::FieldComparator< Sample, Field >

Definition at line 48 of file Comparator_T.h.


Member Typedef Documentation

template<class Sample, class Field>
typedef Field Sample::* OpenDDS::DCPS::FieldComparator< Sample, Field >::MemberPtr

Definition at line 50 of file Comparator_T.h.


Constructor & Destructor Documentation

template<class Sample, class Field>
OpenDDS::DCPS::FieldComparator< Sample, Field >::FieldComparator ( MemberPtr  mp,
ComparatorBase::Ptr  next 
) [inline]

Definition at line 51 of file Comparator_T.h.

00052   : ComparatorBase(next)
00053   , mp_(mp) {}


Member Function Documentation

template<class Sample, class Field>
bool OpenDDS::DCPS::FieldComparator< Sample, Field >::equal ( void *  lhs_void,
void *  rhs_void 
) const [inline, virtual]

Implements OpenDDS::DCPS::ComparatorBase.

Definition at line 62 of file Comparator_T.h.

References OpenDDS::DCPS::FieldComparator< Sample, Field >::mp_.

00062                                                    {
00063     Sample* lhs = static_cast<Sample*>(lhs_void);
00064     Sample* rhs = static_cast<Sample*>(rhs_void);
00065     const Field& field_l = lhs->*mp_;
00066     const Field& field_r = rhs->*mp_;
00067     using ::operator<; // TAO::String_Manager's operator< is in global NS
00068     return !(field_l < field_r) && !(field_r < field_l);
00069   }

template<class Sample, class Field>
bool OpenDDS::DCPS::FieldComparator< Sample, Field >::less ( void *  lhs_void,
void *  rhs_void 
) const [inline, virtual]

Implements OpenDDS::DCPS::ComparatorBase.

Definition at line 55 of file Comparator_T.h.

References OpenDDS::DCPS::FieldComparator< Sample, Field >::mp_.

00055                                                   {
00056     Sample* lhs = static_cast<Sample*>(lhs_void);
00057     Sample* rhs = static_cast<Sample*>(rhs_void);
00058     using ::operator<; // TAO::String_Manager's operator< is in global NS
00059     return lhs->*mp_ < rhs->*mp_;
00060   }


Member Data Documentation

template<class Sample, class Field>
MemberPtr OpenDDS::DCPS::FieldComparator< Sample, Field >::mp_ [private]

Definition at line 72 of file Comparator_T.h.

Referenced by OpenDDS::DCPS::FieldComparator< Sample, Field >::equal(), and OpenDDS::DCPS::FieldComparator< Sample, Field >::less().


The documentation for this class was generated from the following file:
Generated on Fri Feb 12 20:06:11 2016 for OpenDDS by  doxygen 1.4.7