![]() | InDesign SDK 20.5 |
#include <ListLazyNotificationData.h>

Public Member Functions | |
| ListLazyNotificationData () | |
| virtual void | Add (const LazyNotificationData *other) |
| virtual LazyNotificationData * | Clone (bool16 undoData) const |
| virtual void | MarkShouldRebuildAll () |
| void | ItemAdded (ItemType itemID) |
| void | ItemDeleted (ItemType itemID) |
| void | ItemChanged (ItemType itemID) |
| void | BreakoutChanges (K2Vector< ItemType > *addedItems, K2Vector< ItemType > *deletedItems, K2Vector< ItemType > *changedItems) const |
| bool | ShouldRebuildAll () const |
| virtual void | Validate (IDataBase *db) |
Public Member Functions inherited from LazyNotificationData | |
| virtual | ~LazyNotificationData () |
This class should be used to indicate to observers which items in a list have changed and how they have actually changed.
| inline |
Default Constructor
| virtual |
Use this to add another cookie (of the same type) into this cookie All of the appropriate rules for merging cookies will be followed. While this method can be called by anybody it was created to allow the multiple cookies created from a string of commands to be combined into a single cookie for passing to the appropriate observers.
| other | - The other item to add into this one. NOTE: This method assumes that the two objects can be downcast to the same type of object. |
Implements LazyNotificationData.
| void ListLazyNotificationData< ItemType >::BreakoutChanges | ( | K2Vector< ItemType > * | addedItems, |
| K2Vector< ItemType > * | deletedItems, | ||
| K2Vector< ItemType > * | changedItems | ||
| ) | const |
Use this method to determine what changes have actually happened to the model. Items will be separated into three lists for you. This method should be called by the observer in LazyUpdate to figure out which items actually changed and how.
| addedItems | - OPTIONAL IN/OUT will be filled with the list of items which were added. Pass nil to ignore added items |
| deletedItems | - OPTIONAL IN/OUT will be filled with the list of items which were deleted. Pass nil to ignore deleted items |
| changedItems | - OPTIONAL IN/OUT will be filled with the list of items which were changed. Pass nil to ignore changed items |
| virtual |
This method is used to create a copy of its class which may or may not be setup for undo rather than do or redo. The meaning of undo is that added items are switched to deleted items and deleted items are switched to added. the changed items are not modified. While this method can be called by anybody it was created to allow cookies to be stored sot hat they can be sent to appropriate observers more than once and with undo information if needed.
| undoData | - IN kTrue - Swap the adds and deletes |
Implements LazyNotificationData.
| void ListLazyNotificationData< ItemType >::ItemChanged | ( | ItemType | itemID | ) |
Indicate that an item of ItemType was changed in the model. This method should be called by the command when creating the cookie to be passed to ModelChange.
| itemID | - IN The item that was changed. |
| void ListLazyNotificationData< ItemType >::ItemDeleted | ( | ItemType | itemID | ) |
Indicate that an item of ItemType was removed from the model. This method should be called by the command when creating the cookie to be passed to ModelChange.
| itemID | - IN The item that was deleted. |
| virtual |
Indicate that a new item of ItemType was added to the model. This method should be called by the command when creating the cookie to be passed to ModelChange.
| itemID | - IN The item that was added.Mark the cookie indicating that all needs rebuilding |
Implements LazyNotificationData.
| inlinevirtual |
Implements LazyNotificationData.
| virtual |
Validate the cookie against the model. This is only really used for UIDs. There are some problems with deleting objects twice which will cause the cookie to think that an item which never existed actually existed and was deleted. This call will verify that items which are currently marked for add (undo of a delete) exist in the database. NOTE: This call will not do anything in the release build
| db | - The database that is associated with this cookie |
Implements LazyNotificationData.