Subclassing Custom Reactors

AutoCAD Map 3D ObjectARX

Subclassing Custom Reactors

The following sample code illustrates subclassing custom reactors from AcMapOSE[xx]Reactor classes.

Classes and functions are declared, but function definitions, which would be highly implementation specific, are not shown. This is an example of what MyMapOracleReactors.h, one of the include files in the "Connecting to an Oracle Database" sample, would contain.

Managing reactors

Connecting to an Oracle Spatial Database

Code samples

#include "AdMapOracleReactor.h"
class MyConnectionReactor : public AcMapOSEConnectionReactor
virtual ~MyConnectionReactor();
virtual void Connected();
virtual void Disconnected();
virtual void BeforeConnect();
virtual void BeforeDisconnect();
class MyExportReactor : public AcMapOSEExportReactor
virtual ~MyExportReactor();
virtual void BeforeObjectCached(AcDbEntity *);
virtual void ObjectCached(AcDbEntity *,OValue);
virtual void ObjectRejected(AcDbEntity *);
virtual void BeforeObjectsExported(std::vector<OValue> &);
virtual void ObjectsExported(std::vector<OValue> &);
class MyImportReactor : public AcMapOSEImportReactor
virtual ~MyImportReactor();
virtual void BeforeRecordImport(const ODynaset &);
virtual void RecordImported(const ODynaset &,AcDbEntity *);
virtual void RecordRejected(const ODynaset &);