74 clone = parent->
Clone();
96 Stage( item, aChangeType );
105 for(
unsigned int i = 0; i < aItems.
GetCount(); i++ )
112 change_type = aModFlag;
135 return entry ? entry->
m_type : 0;
165 return aEnt.
m_item == aItem;
184 if( change.m_item == aItem )
EDA_ITEM * GetPickedItemLink(unsigned int aIdx) const
virtual COMMIT & Stage(EDA_ITEM *aItem, CHANGE_TYPE aChangeType)
Flag to indicate the change is already applied, just notify observers (not compatible with CHT_MODIFY...
CHANGE_TYPE m_type
Modification type.
Represent a set of changes (additions, deletions or modifications) of a data model (e....
int GetStatus(EDA_ITEM *aItem)
#define KI_FALLTHROUGH
The KI_FALLTHROUGH macro is to be used when switch statement cases should purposely fallthrough from ...
EDA_ITEM * m_item
Main item that is added/deleted/modified.
UNDO_REDO
Undo Redo considerations: Basically we have 3 cases New item Deleted item Modified item there is also...
virtual void makeEntry(EDA_ITEM *aItem, CHANGE_TYPE aType, EDA_ITEM *aCopy=nullptr)
unsigned GetCount() const
virtual EDA_ITEM * Clone() const
Create a duplicate of this item with linked list members set to NULL.
This file contains miscellaneous commonly used macros and functions.
COMMIT_LINE * findEntry(EDA_ITEM *aItem)
Search for an entry describing change for a particular item.
EDA_ITEM * GetPickedItem(unsigned int aIdx) const
virtual ~COMMIT()
Add a new item to the model.
std::set< EDA_ITEM * > m_changedItems
A holder to handle information on schematic or board items.
COMMIT & createModified(EDA_ITEM *aItem, EDA_ITEM *aCopy, int aExtraFlags=0)
COMMIT & Modified(EDA_ITEM *aItem, EDA_ITEM *aCopy)
CHANGE_TYPE
Types of changes.
std::vector< COMMIT_LINE > m_changes
A base class for most all the KiCad significant classes used in schematics and boards.
UNDO_REDO GetPickedItemStatus(unsigned int aIdx) const
EDA_ITEM * m_copy
Optional copy of the item.
virtual EDA_ITEM * parentObject(EDA_ITEM *aItem) const =0
CHANGE_TYPE convert(UNDO_REDO aType) const
void delete_if(_Container &__c, _Function &&__f)
Deletes all values from __c for which __f returns true.