ufe  4.2
Universal Front End is a DCC-agnostic component that will allow a DCC to browse and edit data in multiple data models
connectionHandler.h
Go to the documentation of this file.
1 #line 1 "S:/jenkins/workspace/ECP/ufe/ufe-full-python3.10-windows/ufe/include/connectionHandler.h"
2 #ifndef _ufe_connectionHandler
3 #define _ufe_connectionHandler
4 
5 // =======================================================================
6 // Copyright 2022 Autodesk, Inc. All rights reserved.
7 //
8 // This computer source code and related instructions and comments are the
9 // unpublished confidential and proprietary information of Autodesk, Inc.
10 // and are protected under applicable copyright and trade secret law. They
11 // may not be disclosed to, copied or used by any third party without the
12 // prior written consent of Autodesk, Inc.
13 // =======================================================================
14 
15 #include "common/ufeExport.h"
16 
17 #include "connections.h"
18 #include "sceneItem.h"
19 
20 #include <memory>
21 
22 UFE_NS_DEF {
23 
24 class UndoableCommand;
25 class ConnectionResultUndoableCommand;
26 
40 {
41 public:
42  typedef std::shared_ptr<ConnectionHandler> Ptr;
43 
47  ConnectionHandler(const ConnectionHandler &) = default;
49  virtual ~ConnectionHandler();
50 
58  virtual Connections::Ptr sourceConnections(const SceneItem::Ptr &item) const = 0;
59 
61 
72  Connection::Ptr connect(const AttributeInfo &srcInfo, const AttributeInfo &dstInfo) const;
77  Connection::Ptr connect(const Attribute::Ptr &srcAttr, const Attribute::Ptr &dstAttr) const;
79 
81 
89  void disconnect(const AttributeInfo &srcInfo, const AttributeInfo &dstInfo) const;
94  void disconnect(const Attribute::Ptr &srcAttr, const Attribute::Ptr &dstAttr) const;
96 
106  virtual std::shared_ptr<ConnectionResultUndoableCommand> createConnectionCmd(
107  const Attribute::Ptr &srcAttr, const Attribute::Ptr &dstAttr) const = 0;
108 
115  virtual std::shared_ptr<UndoableCommand> deleteConnectionCmd(
116  const Attribute::Ptr &srcAttr, const Attribute::Ptr &dstAttr) const = 0;
117 };
118 }
119 
120 #endif
std::shared_ptr< Attribute > Ptr
Definition: attribute.h:40
Factory base class for connection interface.
Definition of macros for symbol visibility.
#define UFE_NS_DEF
Definition: ufe.h:35
std::shared_ptr< Connection > Ptr
Definition: connection.h:34
std::shared_ptr< SceneItem > Ptr
Definition: sceneItem.h:40
This class keeps information of an attribute.
Definition: attributeInfo.h:34
std::shared_ptr< ConnectionHandler > Ptr
#define UFE_SDK_DECL
Definition: ufeExport.h:36
std::shared_ptr< Connections > Ptr
Definition: connections.h:30