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
scene.h
Go to the documentation of this file.
1#line 1 "S:/jenkins/workspace/ECP/ufe/ufe-full-python3.11-windows/ufe/include/scene.h"
2#ifndef _scene
3#define _scene
4// ===========================================================================
5// Copyright 2018 Autodesk, Inc. All rights reserved.
6//
7// Use of this software is subject to the terms of the Autodesk license
8// agreement provided at the time of installation or download, or which
9// otherwise accompanies this software in either electronic or hard copy form.
10// ===========================================================================
11
12#include "common/ufeExport.h"
13
14#include "sceneItem.h"
15#include "subject.h"
16
17#include <memory>
18
20
21class ObjectAdd;
22class ObjectDelete;
23class ObjectPathChange;
24class SubtreeInvalidate;
25class Path;
26class SceneCompositeNotification;
27
29
44{
45public:
46
47 typedef std::shared_ptr<Scene> Ptr;
48
50 static Scene& instance();
51
57 static void initializeInstance(const Ptr& instance);
58
60 ~Scene() override;
61
63 Scene(const Scene&) = delete;
65 Scene& operator=(const Scene&) = delete;
66
69 void notify(const Notification& notification) override;
70
73 bool inCompositeNotification() const override;
74
75protected:
76
79
84 virtual void postNotifyObjectAdd(const ObjectAdd& notification);
85
90 virtual void postNotifyObjectDelete(const ObjectDelete& notification);
91
96 virtual void postNotifyObjectPathChange(const ObjectPathChange& notification);
97
102 virtual void postNotifySubtreeInvalidate(const SubtreeInvalidate& notification);
103
109
111
114 void beginNotificationGuard() override;
115 void endNotificationGuard() override;
117
118private:
120 std::unique_ptr<SceneCompositeNotification> fCompositeNotification;
121};
122
123}
124
125#endif /* _scene */
Base class for all notifications.
Definition: notification.h:29
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:44
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:47
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:120
static Scene & instance()
virtual void postNotifyObjectAdd(const ObjectAdd &notification)
void endNotificationGuard() override
Observer pattern Subject class.
Definition: subject.h:41
Subtree invalidate notification.
#define UFE_NS_DEF
Definition: ufe.h:35
Definition of macros for symbol visibility.
#define UFE_SDK_DECL
Definition: ufeExport.h:36