Share

AcDbCustomOsnapInfo

Class Hierarchy

AcRxObject
    AcDbCustomOsnapInfo

C++

class AcDbCustomOsnapInfo : public AcRxObject;

File

dbosnap.h

Description

The class AcDbCustomOsnapInfo defines protocol that every custom OSNAP mode will implement for every relevant entity class. The specific class for a custom OSNAP mode must be derived from this class and then registered with AcRx. Actual implementations for a given custom OSNAP mode must then be derived from that explicitly registered class, and then associated with appropriate AcRxClass objects as is done with protocol extension.

During processing, when a given custom OSNAP mode is active, its corresponding protocol extension class is used to look up the appropriate protocol extension object for each entity. The object is then cast to AcDbCustomOsnapPoint (the parent class of its parent class) and invoked. In other words, this is a two-level protocol extension, with the parent class defining the protocol, and the derived classes distinguishing one custom OSNAP mode from another during protocol extension lookup. The protocol is identical to AcDbEntity::getOsnapPoints() except:

  • Either points, AcGeCurve3d geometry, or both can be returned from this callout.
  • Under no circumstances should any user interface be conducted from this callback. It should just compute and return the appropriate values.
  • The osnapMode argument is omitted because it is implicit in the class looked up through protocol extension.
  • The entity selected is passed in because protocol extension needs its virtual "this" to be explicitly passed in, as opposed to direct AcDbEntity protocol.

Links

AcDbCustomOsnapInfo Methods

See Also

AcDbCustomOsnapManager, AcDbCustomOsnapMode, AcEdInputContextReactor, AcEdInputPointFilter, AcEdInputPointManager, AcEdInputPointMonitor, AcGiGlyph

Was this information helpful?