The  VU_ID class


Inline Implementation!
public:
  VU_ID() : creator_(0), num_(0) {}
  VU_ID(VU_SESSION_ID sessionpart, VU_ID_NUMBER idpart)
          : creator_(sessionpart), num_(idpart) {}

  operator == (VU_ID rhs)
    { return (num_ == rhs.num_ ? (creator_ == rhs.creator_ ? TRUE : FALSE)
                                        : FALSE); }
  operator != (VU_ID rhs)
    { return (num_ == rhs.num_ ? (creator_ == rhs.creator_ ? FALSE : TRUE)
                                        : TRUE); }

  operator > (VU_ID rhs)
    { return (creator_ > rhs.creator_ ? TRUE :
                (creator_ == rhs.creator_ && num_ > rhs.num_ ? TRUE : FALSE)); }
  operator >= (VU_ID rhs)
    { return (creator_ > rhs.creator_ ? TRUE :
                (creator_ == rhs.creator_ && num_ >= rhs.num_ ? TRUE : FALSE));}
  operator < (VU_ID rhs)
    { return (creator_ < rhs.creator_ ? TRUE :
                (creator_ == rhs.creator_ && num_ < rhs.num_ ? TRUE : FALSE)); }
  operator <= (VU_ID rhs)
    { return (creator_ < rhs.creator_ ? TRUE :
                (creator_ == rhs.creator_ && num_ <= rhs.num_ ? TRUE : FALSE));}
  operator VU_KEY()
    { return (VU_KEY)(((unsigned short)creator_<<16) | ((unsigned short)num_));}

// note: these are private to prevent (mis)use
private:
  int operator == (VU_KEY rhs);
  int operator != (VU_KEY rhs);
  int operator > (VU_KEY rhs);
  int operator >= (VU_KEY rhs);
  int operator < (VU_KEY rhs);
  int operator <= (VU_KEY rhs);

// DATA
public:
  VU_ID_NUMBER          num_;
  VU_SESSION_ID         creator_;