ufe  1.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 "E:/jenkins/workspace/ufe-full-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 Path;
25 
27 
41 {
42 public:
43 
44  typedef std::shared_ptr<Scene> Ptr;
45 
47  static Scene& instance();
48 
54  static void initializeInstance(const Ptr& instance);
55 
57  virtual ~Scene();
58 
60  Scene(const Scene&) = delete;
62  Scene& operator=(const Scene&) = delete;
63 
65  static void notifyObjectAdd(const ObjectAdd& notification);
67  static bool addObjectAddObserver(const Observer::Ptr& obs);
68  static bool removeObjectAddObserver(const Observer::Ptr& obs);
69  static bool hasObjectAddObserver(const Observer::Ptr& obs);
71 
73  static void notifyObjectDelete(const ObjectDelete& notification);
75  static bool addObjectDeleteObserver(const Observer::Ptr& obs);
76  static bool removeObjectDeleteObserver(const Observer::Ptr& obs);
77  static bool hasObjectDeleteObserver(const Observer::Ptr& obs);
79 
81  static void notifyObjectPathChange(const ObjectPathChange& notification);
83  static bool addObjectPathChangeObserver(const Observer::Ptr& obs);
84  static bool removeObjectPathChangeObserver(const Observer::Ptr& obs);
85  static bool hasObjectPathChangeObserver(const Observer::Ptr& obs);
87 
88 protected:
89 
91  Scene();
92 
97  virtual void postNotifyObjectAdd(const ObjectAdd& notification);
98 
103  virtual void postNotifyObjectDelete(const ObjectDelete& notification);
104 
109  virtual void postNotifyObjectPathChange(const ObjectPathChange& notification);
110 
111 private:
112 
114  Subject fAddObject;
120 };
121 
122 }
123 
124 #endif /* _scene */
Base class for object add scene notifications.
Singleton class to manage UFE scenes.
Definition: scene.h:40
Subject fPathChangeObject
Definition: scene.h:118
std::shared_ptr< Observer > Ptr
Definition: observer.h:36
Definition of macros for symbol visibility.
Observer pattern Subject class.
Definition: subject.h:40
Base class for object path change scene notifications.
#define UFE_NS_DEF
Definition: ufe.h:35
std::shared_ptr< Scene > Ptr
Definition: scene.h:44
void initializeInstance(const Ptr &globalSelection)
Subject fDeleteObject
Definition: scene.h:117
Base class for object delete scene notifications.
#define UFE_SDK_DECL
Definition: ufeExport.h:36