ufe 7.0
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)
 

Static Public Attributes

DuplicateOptions Keys:

Available options for duplicateSelectionCmd.

static constexpr char kInputConnections [] = "inputConnections"
 
static constexpr char kDstParentPath [] = "dstParentPath"
 

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 28 of file batchOpsHandler.h.

Member Typedef Documentation

◆ Ptr

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

Definition at line 31 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. See DuplicateOptions.

◆ 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. See DuplicateOptions.

Member Data Documentation

◆ kDstParentPath

constexpr char Ufe::BatchOpsHandler::kDstParentPath[] = "dstParentPath"
staticconstexpr

DuplicateOptions key: dstParentPath, value type = string

  • If not specified, all registered BatchOpsHandlers will prepare a command that duplicates the items in the specified selection that belong to their runtime. It will result in all items being duplicated in place.
  • If the path string of a valid scene item is specified, the specified selection will be duplicated to this parent item. The command will be prepared by the BatchOpsHandler registered for the runtime of the parent item. If the parent item is a gateway item, the nested runtime will be used instead. All items in the selection, which are not part of that runtime are ignored.
  • If an invalid path string is specified, a null pointer is returned.
Attention
This option is mutually exclusive with kInputConnections.

Definition at line 74 of file batchOpsHandler.h.

◆ kInputConnections

constexpr char Ufe::BatchOpsHandler::kInputConnections[] = "inputConnections"
staticconstexpr

DuplicateOptions key: inputConnections, value type = bool, default = false

  • If set to false, the duplicate command will only copy connections between items in the specified selection. Any connections to items outside of the selection won't be copied to the duplicated items.
  • If set to true, all upstream connections of the items within the selection will be copied, even if the upstream items are not part of the selection.
Attention
This option is mutually exclusive with kDstParentPath.

Definition at line 58 of file batchOpsHandler.h.


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