33 #include "IPMStream.h" 45 FormatID(int32 majorNumber, int32 minorNumber) :
46 fMajorNumber(majorNumber),
47 fMinorNumber(minorNumber)
50 fMajorNumber(other.fMajorNumber),
51 fMinorNumber(other.fMinorNumber)
60 int32 GetMajorVersion()
const 61 {
return fMajorNumber; }
62 void SetMajorVersion(int32 m)
64 int32 GetMinorVersion()
const 65 {
return fMinorNumber; }
66 void SetMinorVersion(int32 m)
69 bool16 IsUnknown()
const 70 {
return ((fMajorNumber == 0) && (fMinorNumber == 0));}
72 {fMajorNumber = fMinorNumber = 0;}
74 bool16 operator <(
const FormatID& other)
const 75 {
return (fMajorNumber == other.fMajorNumber) ? (fMinorNumber < other.fMinorNumber) : (fMajorNumber < other.fMajorNumber);}
76 bool16 operator >(
const FormatID& other)
const 77 {
return (fMajorNumber == other.fMajorNumber) ? (fMinorNumber > other.fMinorNumber) : (fMajorNumber > other.fMajorNumber);}
78 bool16 operator ==(
const FormatID& other)
const 79 {
return (fMajorNumber == other.fMajorNumber) && (fMinorNumber == other.fMinorNumber);}
80 bool16 operator !=(
const FormatID& other)
const 81 {
return !(*
this == other);}
82 bool16 operator <=(
const FormatID& other)
const 83 {
return !(*
this > other);}
84 bool16 operator >=(
const FormatID& other)
const 85 {
return !(*
this < other);}
96 #endif // __FormatID__