ufe 5.5
Universal Front End is a DCC-agnostic component that will allow a DCC to browse and edit data in multiple data models
handlerInterface.h
Go to the documentation of this file.
1#line 1 "S:/jenkins/workspace/ECP/ufe/ufe-full-python3.11-windows/ufe/include/handlerInterface.h"
2#ifndef _handlerInterface
3#define _handlerInterface
4// =======================================================================
5// Copyright 2023 Autodesk, Inc. All rights reserved.
6//
7// This computer source code and related instructions and comments are the
8// unpublished confidential and proprietary information of Autodesk, Inc.
9// and are protected under applicable copyright and trade secret law. They
10// may not be disclosed to, copied or used by any third party without the
11// prior written consent of Autodesk, Inc.
12// =======================================================================
13
14#include "common/ufeExport.h"
15
16#include <memory>
17#include <string>
18
20
21 /*
22 * Superclass for all dynamic handler interface extensions.
23 *
24 * When creating a new interface the following steps are required:
25 * - Subclass from HandlerInterface
26 * - Provide a statically accessible unique id string for that interface.
27 * It doesn't have to be human-readable, just unique, as it is only
28 * used for internal dispatching.
29 * - It will also be useful to define a Ptr alias for shared_ptr as well
30 * as a static creation function to hide the fetching from the manager.
31 * Can be kept in the header as the main intention is to avoid changing
32 * call sites if the new interface ever moves to ufe core.
33 *
34 * For example:
35 *
36 * \code
37 * class ExampleHandler: public HandlerInterface
38 * {
39 * public:
40 * using Ptr = std::shared_ptr<ExampleHandler>;
41 *
42 * static constexpr auto id = "ExampleHandler";
43 *
44 * static Ptr create(const Rtid& rtId)
45 * {
46 * return Ufe::RunTimeMgr::instance().handler<ExampleHandler>(rtId);
47 * }
48 *
49 * // Interface functions here...
50 * };
51 * \endcode
52 */
54 {
55 public:
56 using Ptr = std::shared_ptr<HandlerInterface>;
57
58 HandlerInterface() = default;
63
65 };
66}
67
68#endif /* _handlerInterface */
HandlerInterface(HandlerInterface &&)=default
HandlerInterface(const HandlerInterface &)=default
HandlerInterface & operator=(const HandlerInterface &)=default
HandlerInterface()=default
HandlerInterface & operator=(HandlerInterface &&)=default
virtual ~HandlerInterface()
std::shared_ptr< HandlerInterface > Ptr
#define UFE_NS_DEF
Definition: ufe.h:35
Definition of macros for symbol visibility.
#define UFE_SDK_DECL
Definition: ufeExport.h:36