[CONNECT C++] Testing the value of an XAttributeHandlerId

I want to test the value of an XAttributeHandlerID to the constant DgnECProviderId_ECXAttributes (UInt16 type). Is there a better way than this?

XAttributeCollection			xattrCollection(eeh.GetElementRef());
for (XAttributeCollection::const_iterator it = xattrCollection.begin(); it != xattrCollection.end(); ++it)
{
	if ( it.GetHandlerId().GetId() >> 16 == DgnECProviderId_ECXAttributes) //  GetID() returns 32 bit value
	{...}
}

 

 

Thanks,

Bruce