FormIt C++ API  v23.0.0 (2023.0.0)
WSM::ModelChangeData Struct Reference

Description

The type of data passed to a callback that will be called upon the completion of each Delta or Undo/Redo operation within any non-temporary History, and the creation or deletion of non-temporary histories.

#include <WSM_Constants.h>

Public Types

enum  Type {
  Type::ResetHistory = -3, Type::Undo = -1, Type::DeltaClosed = 0, Type::Redo = 1,
  Type::FromCollaboration = 2, Type::CollabMultiDelta = 3, Type::CreatedRefdHistory = 4, Type::DeletedHistory = 5,
  Type::DeltasMerged = 6, Type::DeletingAllHistory = 7, Type::RedoDeltasDeleted = 8
}
 Type of model change. More...
 

Public Member Functions

 ModelChangeData ()=default
 
 ModelChangeData (Type nType)
 
 ModelChangeData (size_t nHistoryID, Type nType)
 
 ModelChangeData (Type nType, 1::string const &sAPIName, size_t nPreviousDelta, size_t nCurrentDelta)
 
 ModelChangeData (Type nType, size_t nPreviousDelta, size_t nCurrentDelta)
 
 ModelChangeData (size_t nHistoryID, Type nType, 1::string const &sAPIName, size_t nPreviousDelta, size_t nCurrentDelta)
 

Public Attributes

size_t m_nHistoryID = WSM::INVALID_ID
 The history in which the operation happened, for history-specific messages. More...
 
Type m_nType = Type::DeltaClosed
 The type of operation, see the enum above for details. More...
 
::string m_sAPIName
 The name of the API, for nDeltaClosed messages. More...
 
Delta IDs

For undo, redo, and delta closed operations, the previous active and new active delta IDs.

size_t m_nPreviousDelta = WSM::INVALID_ID
 
size_t m_nCurrentDelta = WSM::INVALID_ID
 

Member Enumeration Documentation

Type of model change.

The DeletedHistory value is broadcast for all histories, even temporary histories. The rest are only for non-temporary histories.

Enumerator
ResetHistory 

Sent when the main history is reset, only broadcast by the app, not by WSM itself.

Undo 

An undo operation has been completed.

DeltaClosed 

An operation has been completed, and the Delta is complete.

Redo 

A redo operation has been completed.

FromCollaboration 

A completed operation has been received from a collaboration server, only broadcast by the collaboration manager, not by WSM itself.

CollabMultiDelta 

Possible multiple Deltas have been affected, for example when making an Instance unique or when loading a file with History.

Also when completed operation has been received from a collaboration server, and inserted in the middle of existing Deltas.

CreatedRefdHistory 

A new referenced history has been created.

DeletedHistory 

A history has been deleted, including a temporary history.

DeltasMerged 

Deltas were merged in the given History.

DeletingAllHistory 

Deleting all Histories.

RedoDeltasDeleted 

Deltas for redo were deleted in the given History.

Constructor & Destructor Documentation

WSM::ModelChangeData::ModelChangeData ( )
default
WSM::ModelChangeData::ModelChangeData ( Type  nType)
inline
WSM::ModelChangeData::ModelChangeData ( size_t  nHistoryID,
Type  nType 
)
inline
WSM::ModelChangeData::ModelChangeData ( Type  nType,
1::string const &  sAPIName,
size_t  nPreviousDelta,
size_t  nCurrentDelta 
)
inline
WSM::ModelChangeData::ModelChangeData ( Type  nType,
size_t  nPreviousDelta,
size_t  nCurrentDelta 
)
inline
WSM::ModelChangeData::ModelChangeData ( size_t  nHistoryID,
Type  nType,
1::string const &  sAPIName,
size_t  nPreviousDelta,
size_t  nCurrentDelta 
)
inline

Member Data Documentation

size_t WSM::ModelChangeData::m_nCurrentDelta = WSM::INVALID_ID
size_t WSM::ModelChangeData::m_nHistoryID = WSM::INVALID_ID

The history in which the operation happened, for history-specific messages.

size_t WSM::ModelChangeData::m_nPreviousDelta = WSM::INVALID_ID
Type WSM::ModelChangeData::m_nType = Type::DeltaClosed

The type of operation, see the enum above for details.

::string WSM::ModelChangeData::m_sAPIName

The name of the API, for nDeltaClosed messages.


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