WSM API v25.0.0 (2025.0.0)
Loading...
Searching...
No Matches
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 class  Type {
  ResetHistory = -3 , Undo = -1 , DeltaClosed = 0 , Redo = 1 ,
  FromCollaboration = 2 , CollabMultiDelta = 3 , CreatedRefdHistory = 4 , DeletedHistory = 5 ,
  DeltasMerged = 6 , DeletingAllHistory = 7 , RedoDeltasDeleted = 8
}
 Type of model change. More...
 

Public Member Functions

 ModelChangeData ()=default
 Constructor.
 
 ModelChangeData (Type nType)
 
 ModelChangeData (size_t nHistoryID, Type nType)
 
 ModelChangeData (Type nType, std::string const &sAPIName, size_t nPreviousDelta, size_t nCurrentDelta)
 
 ModelChangeData (Type nType, size_t nPreviousDelta, size_t nCurrentDelta)
 
 ModelChangeData (size_t nHistoryID, Type nType, std::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.
 
Type m_nType = Type::DeltaClosed
 The type of operation, see the enum above for details.
 
std::string m_sAPIName
 The name of the API, for nDeltaClosed messages.
 
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

enum class WSM::ModelChangeData::Type
strong

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

◆ ModelChangeData() [1/6]

WSM::ModelChangeData::ModelChangeData ( )
default

Constructor.

◆ ModelChangeData() [2/6]

WSM::ModelChangeData::ModelChangeData ( Type  nType)
inline

◆ ModelChangeData() [3/6]

WSM::ModelChangeData::ModelChangeData ( size_t  nHistoryID,
Type  nType 
)
inline

◆ ModelChangeData() [4/6]

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

◆ ModelChangeData() [5/6]

WSM::ModelChangeData::ModelChangeData ( Type  nType,
size_t  nPreviousDelta,
size_t  nCurrentDelta 
)
inline

◆ ModelChangeData() [6/6]

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

Member Data Documentation

◆ m_nCurrentDelta

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

◆ m_nHistoryID

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

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

◆ m_nPreviousDelta

size_t WSM::ModelChangeData::m_nPreviousDelta = WSM::INVALID_ID


◆ m_nType

Type WSM::ModelChangeData::m_nType = Type::DeltaClosed

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

◆ m_sAPIName

std::string WSM::ModelChangeData::m_sAPIName

The name of the API, for nDeltaClosed messages.


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