ufe  3.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.9-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 
68  void notify(const Notification& notification) override;
69 
72  bool inCompositeNotification() const override;
73 
74 protected:
75 
77  Scene();
78 
83  virtual void postNotifyObjectAdd(const ObjectAdd& notification);
84 
89  virtual void postNotifyObjectDelete(const ObjectDelete& notification);
90 
95  virtual void postNotifyObjectPathChange(const ObjectPathChange& notification);
96 
101  virtual void postNotifySubtreeInvalidate(const SubtreeInvalidate& notification);
102 
107  virtual void postNotifySceneCompositeChange(const SceneCompositeNotification& notification);
108 
110  void beginNotificationGuard() override;
114  void endNotificationGuard() override;
116 
117 private:
119  std::unique_ptr<SceneCompositeNotification> fCompositeNotification;
120 };
121 
122 }
123 
124 #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:27
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:119
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.