nidas  v1.2-1520
Public Member Functions | List of all members
nidas::core::SampleHeaderComparator Class Reference

Timetag and Id comparator of pointers to Samples: if two timetags are the same, then compare Ids, and if they're equal, compare data length. More...

#include <SortedSampleSet.h>

Public Member Functions

bool operator() (const Sample *x, const Sample *y) const
 Return true if x is less than y. More...
 

Detailed Description

Timetag and Id comparator of pointers to Samples: if two timetags are the same, then compare Ids, and if they're equal, compare data length.

This is useful when merging archives, where one expects duplicate samples. Otherwise, if one doesn't expect duplicates, which is the usual case, this is less efficient than the simple SampleTimetagComparator above. Warning: if a sensor can generate multiple samples with the same time tag AND the same data length but differing data, then a set using this comparator will discard all but one of the samples whose timetag and length match.

Member Function Documentation

bool nidas::core::SampleHeaderComparator::operator() ( const Sample x,
const Sample y 
) const
inline

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