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
handlerInterface.h
Go to the documentation of this file.
1#line 1 "D:/Jenkins/workspace/EMS/ECG/ufe/full/ufe-full-python3.13-windows/ufe/include/handlerInterface.h"
2#ifndef UFE_HANDLERINTERFACE_H
3#define UFE_HANDLERINTERFACE_H
4
5// ===========================================================================
6// Copyright 2025 Autodesk, Inc. All rights reserved.
7//
8// The use of this software is subject to the Autodesk Terms of Use or other
9// license agreement provided at the time of installation or download, or
10// which otherwise accompanies this software.
11// ===========================================================================
12
13#include "common/ufeExport.h"
14
15#include <memory>
16#include <string>
17
19
20 /*
21 * Superclass for all dynamic handler interface extensions.
22 *
23 * When creating a new interface the following steps are required:
24 * - Subclass from HandlerInterface
25 * - Provide a statically accessible unique id string for that interface.
26 * It doesn't have to be human-readable, just unique, as it is only
27 * used for internal dispatching.
28 * - It will also be useful to define a Ptr alias for shared_ptr as well
29 * as a static creation function to hide the fetching from the manager.
30 * Can be kept in the header as the main intention is to avoid changing
31 * call sites if the new interface ever moves to ufe core.
32 *
33 * For example:
34 *
35 * \code
36 * class ExampleHandler: public HandlerInterface
37 * {
38 * public:
39 * using Ptr = std::shared_ptr<ExampleHandler>;
40 *
41 * static constexpr auto id = "ExampleHandler";
42 *
43 * static Ptr create(const Rtid& rtId)
44 * {
45 * return Ufe::RunTimeMgr::instance().handler<ExampleHandler>(rtId);
46 * }
47 *
48 * // Interface functions here...
49 * };
50 * \endcode
51 */
53 {
54 public:
55 using Ptr = std::shared_ptr<HandlerInterface>;
56
57 HandlerInterface() = default;
62
64 };
65}
66
67#endif /* UFE_HANDLERINTERFACE_H */
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:36
Definition of macros for symbol visibility.
#define UFE_SDK_DECL
Definition: ufeExport.h:35