25namespace P4::DBPrint {
57 TableNoActions = 0x10,
61int dbgetflags(std::ostream &out);
62int dbsetflags(std::ostream &out,
int val,
int mask = ~0U);
64inline int getprec(std::ostream &out) {
return dbgetflags(out) & DBPrint::Precedence; }
69 setflags_helper(
int v,
int m) : val(v), mask(m) { assert((val & ~mask) == 0); }
74 void set(std::ostream &out)
const { dbsetflags(out, val, mask); }
91inline std::ostream &operator<<(std::ostream &out,
const DBPrint::dbprint_flags fl) {
92 DBPrint::dbsetflags(out, fl, fl ? fl : ~0);