ufe 5.3
Universal Front End is a DCC-agnostic component that will allow a DCC to browse and edit data in multiple data models
Ufe::BatchOpsHandler Class Referenceabstract

Provides services to properly manage complex sequences of operations using bracketed guards. More...

#include <batchOpsHandler.h>

Inheritance diagram for Ufe::BatchOpsHandler:

Public Types

typedef std::shared_ptr< BatchOpsHandlerPtr
 

Public Member Functions

 BatchOpsHandler ()
 Constructor. More...
 
 BatchOpsHandler (const BatchOpsHandler &)=default
 Default copy constructor. More...
 
virtual ~BatchOpsHandler ()
 Destructor. More...
 

Static Public Member Functions

static SelectionUndoableCommand::Ptr duplicateSelectionCmd (const Selection &selection, const ValueDictionary &duplicateOptions)
 

Protected Member Functions

virtual SelectionUndoableCommand::Ptr duplicateSelectionCmd_ (const Selection &selection, const ValueDictionary &duplicateOptions)=0
 

Detailed Description

Provides services to properly manage complex sequences of operations using bracketed guards.

This handler provides begin/end callbacks for operations that will be done in batch on a large selection, providing services to allow storing options to be used on each operations. This will also allow doing extra processing at the end of the batch.

Definition at line 27 of file batchOpsHandler.h.

Member Typedef Documentation

◆ Ptr

typedef std::shared_ptr<BatchOpsHandler> Ufe::BatchOpsHandler::Ptr

Definition at line 30 of file batchOpsHandler.h.

Constructor & Destructor Documentation

◆ BatchOpsHandler() [1/2]

Ufe::BatchOpsHandler::BatchOpsHandler ( )

Constructor.

◆ BatchOpsHandler() [2/2]

Ufe::BatchOpsHandler::BatchOpsHandler ( const BatchOpsHandler )
default

Default copy constructor.

◆ ~BatchOpsHandler()

virtual Ufe::BatchOpsHandler::~BatchOpsHandler ( )
virtual

Destructor.

Member Function Documentation

◆ duplicateSelectionCmd()

static SelectionUndoableCommand::Ptr Ufe::BatchOpsHandler::duplicateSelectionCmd ( const Selection selection,
const ValueDictionary duplicateOptions 
)
static

Asks all registered BatchOpsHandlers to prepare a command that can duplicate in batch the items in the selection list that belong to their runtimes. These sub commands will be gathered in a composite command that will be returned here. The returned command is not executed.

Parameters
selectionThe list of items to duplicate.
duplicateOptionsOptions affecting the batched duplicate operation.

◆ duplicateSelectionCmd_()

virtual SelectionUndoableCommand::Ptr Ufe::BatchOpsHandler::duplicateSelectionCmd_ ( const Selection selection,
const ValueDictionary duplicateOptions 
)
protectedpure virtual

Ask a runtime handler to create a command that can be executed to duplicate all the items in the selection list that are supported by that runtime. The returned command is not executed.

Runtimes are expected to:

  • Only process SceneItems from their own runtime.
  • Return nullptr if none of the items in the selection can be duplicated.
    Parameters
    selectionThe list of items to duplicate.
    duplicateOptionsOptions affecting the batched duplicate operation.

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