view pointpair.cpp @ 591:0242e5d1643c

Address portability issues in database creation Define a getpagesize() macro which returns The Right Thing on WIN32 Use Windows permissions flags in open() with O_CREAT.
author mas01cr
date Tue, 11 Aug 2009 21:42:24 +0000
parents 9119f2fa3efe
children
line wrap: on
line source
extern "C" {
#include "audioDB_API.h"
}
#include "audioDB-internals.h"

PointPair::PointPair(uint32_t a, uint32_t b, uint32_t c) :
  trackID(a), qpos(b), spos(c) {
};

bool operator<(const PointPair& a, const PointPair& b) {
  return ((a.trackID < b.trackID) ||
          ((a.trackID == b.trackID) &&
           ((a.spos < b.spos) || ((a.spos == b.spos) && (a.qpos < b.qpos)))));
}

bool operator>(const PointPair& a, const PointPair& b) {
  return ((a.trackID > b.trackID) ||
          ((a.trackID == b.trackID) &&
           ((a.spos > b.spos) || ((a.spos == b.spos) && (a.qpos > b.qpos)))));
}

bool operator==(const PointPair& a, const PointPair& b) {
  return ((a.trackID == b.trackID) &&
          (a.qpos == b.qpos) &&
          (a.spos == b.spos));
}