AcRxProtocolReactor Macros

To simplify the registration and storage of protocol reactor class objects, the protocol reactor API provides a set of convenience macros. These macros return pointers to the principal framework components and typically reduce several lines of complex code to a single line. The following macros are defined in the rxprotevnt.h header file:

For example, if you have created a protocol reactor class named AsdkInsertionPoints that derives from the AcDbBlockInsertionPoints class, you would use the following code to instantiate a class object and register it with the proper reactor manager:

AsdkInsertionPoints* pPts = NULL;
pPts = new AsdkInsertionPoints();
ACRX_PROTOCOL_REACTOR_LIST_AT(AcDbBlockTableRecord::desc(),
	AsdkInsertionPoints::desc())->addReactor(pPts);

When you have finished using the reactor, or when your application exits, you remove the reactor and destroy it.

if (pPts)
{
ACRX_PROTOCOL_REACTOR_LIST_AT(AcDbBlockTableRecord::desc(), 
    AsdkInsertionPoints::desc())->removeReactor(pPts);
delete pPts;
}