22 #ifndef DBA_MSG_DEFS_H
23 #define DBA_MSG_DEFS_H
46 const char* encoding_name(Encoding enc);
51 static const int MISSING_INT = INT_MAX;
68 bool operator==(
const Level& l)
const
74 bool operator!=(
const Level& l)
const
76 return ltype1 != l.ltype1 ||
l1 != l.l1
90 if ((res =
l1 - l.
l1))
return res;
100 void format(std::ostream& out,
const char* undef=
"-")
const;
102 static inline Level cloud(
int ltype2,
int l2=MISSING_INT) {
return Level(256, MISSING_INT, ltype2,
l2); }
103 static inline Level ana() {
return Level(257); }
106 std::ostream& operator<<(std::ostream& out,
const Level& l);
117 Trange(
int pind=MISSING_INT,
int p1=MISSING_INT,
int p2=MISSING_INT)
119 Trange(
const char*
pind,
const char*
p1=NULL,
const char*
p2=NULL);
121 bool operator==(
const Trange& tr)
const
126 bool operator!=(
const Trange& tr)
const
128 return pind != tr.pind ||
p1 != tr.p1 ||
p2 != tr.p2;
140 if ((res =
pind - t.
pind))
return res;
141 if ((res =
p1 - t.
p1))
return res;
150 void format(std::ostream& out,
const char* undef=
"-")
const;
152 static inline Trange instant() {
return Trange(254, 0, 0); }
153 static inline Trange ana() {
return Trange(); }
156 std::ostream& operator<<(std::ostream& out,
const Trange& l);