A key to sort SubSignalPool. More...
#include <SortKey.h>
Public Member Functions | |
| bool | reversed () const |
| SortKey (const MetaDataIndex &d, bool r=false) | |
| SortKey (int id, bool r=false) | |
| SortKey (const SortKey &o) | |
Static Public Member Functions | |
| static void | add (const SortKey &k) |
| static const SortKey & | at (int index) |
| static void | clear () |
| static int | count () |
| static bool | lessThan (const Signal *sig1, const Signal *sig2) |
A key to sort SubSignalPool.
Sorting signals according to several keys (based on meta data) is not thread safe. It is based on a static list of keys interpreted by lessThan().
| GeopsyCore::SortKey::SortKey | ( | const MetaDataIndex & | d, |
| bool | r = false |
||
| ) | [inline] |
: MetaDataIndex(d) {_reversed=r;}
| GeopsyCore::SortKey::SortKey | ( | int | id, |
| bool | r = false |
||
| ) | [inline] |
: MetaDataIndex(id, 0, 0) {_reversed=r;}
| GeopsyCore::SortKey::SortKey | ( | const SortKey & | o | ) | [inline] |
: MetaDataIndex(o) {_reversed=o._reversed;}
| static void GeopsyCore::SortKey::add | ( | const SortKey & | k | ) | [inline, static] |
Referenced by GeopsyCore::SubSignalPool::associate3Components(), GeopsyCore::SubSignalPool::azimuth(), GeopsyCore::SubSignalPool::mergeStations(), and GeopsyCore::StationSignals::organizeSubPool().
{_keys.append(k);}
| static const SortKey& GeopsyCore::SortKey::at | ( | int | index | ) | [inline, static] |
| static void GeopsyCore::SortKey::clear | ( | ) | [inline, static] |
| static int GeopsyCore::SortKey::count | ( | ) | [inline, static] |
Referenced by GeopsyCore::Signal::compare().
{return _keys.count();}
| bool GeopsyCore::SortKey::lessThan | ( | const Signal * | sig1, |
| const Signal * | sig2 | ||
| ) | [inline, static] |
Referenced by GeopsyCore::SubSignalPool::sort().
{
return *sig1 < *sig2;
}
| bool GeopsyCore::SortKey::reversed | ( | ) | const [inline] |
Referenced by GeopsyCore::Signal::compare(), SortKeys::getKeys(), and SortKeys::SortKeys().
{return _reversed;}