1 #ifndef _ots_TableVersion_h_
2 #define _ots_TableVersion_h_
16 static const unsigned int INVALID;
17 static const unsigned int DEFAULT;
18 static const unsigned int SCRATCH;
25 unsigned int version(
void)
const;
26 bool isTemporaryVersion(
void)
const;
27 bool isScratchVersion(
void)
const;
28 bool isMockupVersion(
void)
const;
29 bool isInvalid(
void)
const;
30 std::string toString(
void)
const;
34 bool operator==(
unsigned int version)
const;
36 bool operator!=(
unsigned int version)
const;
40 bool operator<=(
const TableVersion& version)
const {
return !operator>(version); }
41 bool operator>=(
const TableVersion& version)
const {
return !operator<(version); }
43 friend std::ostream& operator<<(std::ostream& out,
const TableVersion& version)
45 if(version.isScratchVersion())
46 out <<
"ScratchVersion";
47 else if(version.isMockupVersion())
49 else if(version.isInvalid())
50 out <<
"InvalidVersion";
52 out << version.toString();
62 NUM_OF_TEMP_VERSIONS = 10000
65 unsigned int version_;
66 std::string versionString_;