X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=extras%2Fvom%2Fvom%2Fenum_base.hpp;h=015410a57c58825d09c9ff386a1b782f23c191ae;hb=7c0eb56f4;hp=6756e2498de1806a5c233a0354c1774c36f0fd3c;hpb=164e5f8c63652028ecb9c3570e1ea8618b163071;p=vpp.git diff --git a/extras/vom/vom/enum_base.hpp b/extras/vom/vom/enum_base.hpp index 6756e2498de..015410a57c5 100644 --- a/extras/vom/vom/enum_base.hpp +++ b/extras/vom/vom/enum_base.hpp @@ -51,6 +51,27 @@ public: return (*this); } + /** + * bitwise or assignemnt + */ + enum_base& operator|=(const enum_base& e) + { + m_value += e.m_value; + m_desc += ":" + e.m_desc; + + return *this; + } + + /** + * bitwise or + */ + enum_base operator|(const enum_base& e1) const + { + enum_base e = *this; + e |= e1; + return e; + } + /** * Comparison operator */