阅读:1032回复:1
请教大家:这2句代码是什么意思?
///////////////////////////////////////////////////////////////////////////////////
// Reason for ISR // typedef enum _PLX9056_ISR_REASON { Plx9056ReasonNone = 0, Plx9056ReasonDoorbell = 1, Plx9056ReasonPciAbort = 2, Plx9056ReasonLocalInput = 4, Plx9056ReasonDma0 = 8, Plx9056ReasonDma1 = 16, Plx9056ReasonOutboundPost = 32 } PLX9056_ISR_REASON; // There is no |= operator for enum type //请教大家:这下面2句代码是什么意思? inline PLX9056_ISR_REASON operator |= (PLX9056_ISR_REASON& a, PLX9056_ISR_REASON b) { return (a = (PLX9056_ISR_REASON)(ULONG(a) | ULONG(b))); } 代码是DS例子里的,我一直没有看明白。谢谢拉 |
|
沙发#
发布于:2007-03-28 23:38
|= 运算符重载.
|
|
|