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
scene.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/scene.h"
2#ifndef UFE_SCENE_H
3#define UFE_SCENE_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 "sceneItem.h"
16#include "subject.h"
17
18#include <memory>
19
21
22class ObjectAdd;
23class ObjectDelete;
24class ObjectPathChange;
25class SubtreeInvalidate;
26class Path;
27class SceneCompositeNotification;
28
30
45{
46public:
47
48 typedef std::shared_ptr<Scene> Ptr;
49
51 static Scene& instance();
52
58 static void initializeInstance(const Ptr& instance);
59
61 ~Scene() override;
62
64 Scene(const Scene&) = delete;
66 Scene& operator=(const Scene&) = delete;
67
70 void notify(const Notification& notification) override;
71
74 bool inCompositeNotification() const override;
75
76protected:
77
80
85 virtual void postNotifyObjectAdd(const ObjectAdd& notification);
86
91 virtual void postNotifyObjectDelete(const ObjectDelete& notification);
92
97 virtual void postNotifyObjectPathChange(const ObjectPathChange& notification);
98
103 virtual void postNotifySubtreeInvalidate(const SubtreeInvalidate& notification);
104
110
115 void beginNotificationGuard() override;
116 void endNotificationGuard() override;
118
119private:
121 std::unique_ptr<SceneCompositeNotification> fCompositeNotification;
122};
123
124}
125
126#endif /* UFE_SCENE_H */
Base class for all notifications.
Definition: notification.h:30
Base class for object add scene notifications.
Base class for object delete scene notifications.
Base class for object path change scene notifications.
SceneChanged composite notification.
Singleton class to manage UFE scenes.
Definition: scene.h:45
Scene & operator=(const Scene &)=delete
Cannot assign the scene singleton.
virtual void postNotifySceneCompositeChange(const SceneCompositeNotification &notification)
virtual void postNotifyObjectPathChange(const ObjectPathChange &notification)
Scene(const Scene &)=delete
Cannot copy the scene singleton.
bool inCompositeNotification() const override
std::shared_ptr< Scene > Ptr
Definition: scene.h:48
Scene()
Only derived classes can create a scene.
virtual void postNotifySubtreeInvalidate(const SubtreeInvalidate &notification)
virtual void postNotifyObjectDelete(const ObjectDelete &notification)
void notify(const Notification &notification) override
~Scene() override
Destructor.
static void initializeInstance(const Ptr &instance)
void beginNotificationGuard() override
std::unique_ptr< SceneCompositeNotification > fCompositeNotification
Composite notification, when within the scope of a guard.
Definition: scene.h:121
static Scene & instance()
virtual void postNotifyObjectAdd(const ObjectAdd &notification)
void endNotificationGuard() override
Observer pattern Subject class.
Definition: subject.h:42
Subtree invalidate notification.
#define UFE_NS_DEF
Definition: ufe.h:36
Definition of macros for symbol visibility.
#define UFE_SDK_DECL
Definition: ufeExport.h:35