Classes | Public Member Functions | List of all members
DgnModelAppData Struct Referenceabstract

Application-defined object that is stored with a DgnModel. More...

#include <DgnModel.h>

Inheritance diagram for DgnModelAppData:
DgnGCS

Classes

struct  Key
 A unique Key to identify each subclass of DgnModelAppData. More...
 

Public Member Functions

virtual ~DgnModelAppData ()
 
virtual void _OnCleanup (DgnModelR host)=0
 Override this method to be notified when host DgnModel is about to be deleted from memory or when this appdata is being dropped from the host model. More...
 
virtual void _OnFilled (DgnModelR host)
 Override this method to be notified after host DgnModel has been filled. More...
 
virtual bool _OnEmpty (DgnModelR host)
 Override this method to be notified when host DgnModel is about to be emptied. More...
 
virtual bool _OnEmptied (DgnModelR host)
 Override this method to be notified after host DgnModel has been emptied. Won't be called unless _OnEmpty returns false. More...
 
virtual void _OnModelDelete (DgnModelR host)
 Override this method to be notified before the persistent MicroStation Model is marked for delete. More...
 
virtual void _OnModelUnDelete (DgnModelR host)
 Override this method to be notified after the persistent MicroStation Model is undeleted. More...
 
virtual void _OnElementAdded (DgnModelR host, PersistentElementRef &elem, bool isGraphicsList)
 Override this method to be notified when a (top-level) element is added to the host DgnModel. More...
 
virtual void _OnSaveModelProperties (DgnModelR host, ModelInfoCR original)
 Override this method to be notified when a model's properties are changed. More...
 

Detailed Description

Application-defined object that is stored with a DgnModel.

This object is notified as significant events occur for its "host" DgnModel. By creating a subclass of this class, applications can maintain relevant information about a DgnModel with the DgnModel for efficient lookup and lifecycle management.

See also
DgnModel::AddAppData

Constructor & Destructor Documentation

virtual ~DgnModelAppData ( )
virtual

Member Function Documentation

virtual void _OnCleanup ( DgnModelR  host)
pure virtual

Override this method to be notified when host DgnModel is about to be deleted from memory or when this appdata is being dropped from the host model.

Note
The persistent DgnModel is not being deleted, just this in-memory copy of it.
virtual void _OnElementAdded ( DgnModelR  host,
PersistentElementRef elem,
bool  isGraphicsList 
)
virtual

Override this method to be notified when a (top-level) element is added to the host DgnModel.

Remarks
This is called before the element is added to the range index.
Parameters
hostThe host model.
elemThe element that was just added to the host model. Note that only top-level elements are reported.
isGraphicsListIs this element in the graphics list of the host model?
virtual bool _OnEmptied ( DgnModelR  host)
virtual

Override this method to be notified after host DgnModel has been emptied. Won't be called unless _OnEmpty returns false.

virtual bool _OnEmpty ( DgnModelR  host)
virtual

Override this method to be notified when host DgnModel is about to be emptied.

Returns
true to be dropped from host (_OnCleanup will be called.)
virtual void _OnFilled ( DgnModelR  host)
virtual

Override this method to be notified after host DgnModel has been filled.

virtual void _OnModelDelete ( DgnModelR  host)
virtual

Override this method to be notified before the persistent MicroStation Model is marked for delete.

The actual delete happens when the DgnFile holding the DgnModel is closed.

virtual void _OnModelUnDelete ( DgnModelR  host)
virtual

Override this method to be notified after the persistent MicroStation Model is undeleted.

virtual void _OnSaveModelProperties ( DgnModelR  host,
ModelInfoCR  original 
)
virtual

Override this method to be notified when a model's properties are changed.

Parameters
hostThe host model.
originalThe model's original properties

The documentation for this struct was generated from the following file:

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.