IODIdGenerator Class

class IODIdGenerator

Component ID generator interface.

This interface is used by  CODComponent to obtain unique IDs. It is implemented by  CODModel so that component IDs are unique within a given diagram model. The  CODComponent::GetIdGenerator method enables individual components to get a pointer to an IODIdGenerator interface and obtain a unique ID. The current implementation of CODComponent::GetIdGenerator will return a pointer to the diagram model's IODIdGenerator interface.

To implement your own ID generation scheme, override  CODModel::CreateUniqueID.

Defined in: OdComponentId.h

Class Members

virtual ODComponentId CreateUniqueID()

Creates a unique ID to register for a component.

virtual BOOL RegisterID(ODComponentId lID, CODComponent* pComp)

Registers the ID as unique to the component within this model.

virtual BOOL UnregisterID(ODComponentId lID)

Unregisters an ID as unique

virtual BOOL UnregisterID(CODComponent* pComp)

Unregisters an ID as unique

virtual CODComponent* GetComponent(ODComponentId lID)

Gets a component by ID