ufe  4.2
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.10-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 
19 UFE_NS_DEF {
20 
21 class ObjectAdd;
22 class ObjectDelete;
23 class ObjectPathChange;
24 class SubtreeInvalidate;
25 class Path;
26 class SceneCompositeNotification;
27 
29 
43 class UFE_SDK_DECL Scene : public Subject
44 {
45 public:
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 
75 protected:
76 
78  Scene();
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 
108  virtual void postNotifySceneCompositeChange(const SceneCompositeNotification& notification);
109 
111  void beginNotificationGuard() override;
115  void endNotificationGuard() override;
117 
118 private:
120  std::unique_ptr<SceneCompositeNotification> fCompositeNotification;
121 };
122 
123 }
124 
125 #endif /* _scene */
Base class for object add scene notifications.
virtual void notify(const Notification &notification)
Singleton class to manage UFE scenes.
Definition: scene.h:43
Definition of macros for symbol visibility.
virtual bool inCompositeNotification() const
Observer pattern Subject class.
Definition: subject.h:40
Base class for object path change scene notifications.
Subtree invalidate notification.
Subject & operator=(const Subject &)
Assignment operator. Does nothing, as observers are not copied.
SceneChanged composite notification.
#define UFE_NS_DEF
Definition: ufe.h:35
Base class for all notifications.
Definition: notification.h:28
std::shared_ptr< Scene > Ptr
Definition: scene.h:47
void initializeInstance(const Ptr &globalSelection)
virtual void beginNotificationGuard()
Notification guard interface. Implementation in this class is a no-op.
std::unique_ptr< SceneCompositeNotification > fCompositeNotification
Composite notification, when within the scope of a guard.
Definition: scene.h:120
Base class for object delete scene notifications.
#define UFE_SDK_DECL
Definition: ufeExport.h:36
virtual void endNotificationGuard()
Notification guard interface. Implementation in this class is a no-op.