Loading...
Searching...
No Matches
rendererPluginHandle.h
1//
2// Copyright 2020 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
7#ifndef PXR_IMAGING_HD_RENDERER_PLUGIN_HANDLE_H
8#define PXR_IMAGING_HD_RENDERER_PLUGIN_HANDLE_H
9
10#include "pxr/pxr.h"
11#include "pxr/imaging/hd/api.h"
12#include "pxr/imaging/hd/renderDelegate.h"
13
14#include "pxr/base/tf/token.h"
15
16#include <cstddef>
17
18PXR_NAMESPACE_OPEN_SCOPE
19
22
31{
32public:
33 HdRendererPluginHandle() : _plugin(nullptr) { }
34 HdRendererPluginHandle(const std::nullptr_t &) : _plugin(nullptr) { }
35
36 HD_API
38
39 HD_API
41
42 HD_API
44
45 HD_API
47
48 HD_API
50
51 HD_API
52 HdRendererPluginHandle &operator=(const std::nullptr_t &);
53
55 HdRendererPlugin *Get() const { return _plugin; }
56
57 HdRendererPlugin *operator->() const { return _plugin; }
58 HdRendererPlugin &operator*() const { return *_plugin; }
59
61 explicit operator bool() const { return _plugin; }
62
63private:
64 friend class HdRendererPluginRegistry;
65 friend class HdRendererPlugin;
66
68 : _plugin(plugin) { }
69
70 HdRendererPlugin *_plugin;
71};
72
73PXR_NAMESPACE_CLOSE_SCOPE
74
75#endif
A (movable) handle for a render delegate that was created using a a plugin.
A handle for HdRendererPlugin also storing the plugin id.
HdRendererPlugin * Get() const
Get the wrapped HdRendererPlugin.
This class defines a renderer plugin interface for Hydra.
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...