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
|
Singleton class to manage UFE scenes. More...
#include <scene.h>
Public Types | |
typedef std::shared_ptr< Scene > | Ptr |
Public Member Functions | |
~Scene () override | |
Destructor. More... | |
Scene (const Scene &)=delete | |
Cannot copy the scene singleton. More... | |
Scene & | operator= (const Scene &)=delete |
Cannot assign the scene singleton. More... | |
void | notify (const Notification ¬ification) override |
bool | inCompositeNotification () const override |
Public Member Functions inherited from Ufe::Subject | |
Subject () | |
Constructor. More... | |
Subject (const Subject &) | |
Copy constructor. Observers are not copied. More... | |
Subject (Subject &&) | |
Move constructor. Observers are not moved. More... | |
virtual | ~Subject () |
Destructor. More... | |
Subject & | operator= (const Subject &) |
Assignment operator. Does nothing, as observers are not copied. More... | |
Subject & | operator= (Subject &&) |
Move assignment operator. Does nothing, as observers are not moved. More... | |
bool | addObserver (const Observer::Ptr &obs) |
bool | removeObserver (const Observer::Ptr &obs) |
bool | hasObserver (const Observer::Ptr &obs) const |
std::size_t | nbObservers () const |
virtual void | notify (const Notification ¬ification) |
virtual bool | inCompositeNotification () const |
Static Public Member Functions | |
static Scene & | instance () |
static void | initializeInstance (const Ptr &instance) |
Protected Member Functions | |
Scene () | |
Only derived classes can create a scene. More... | |
virtual void | postNotifyObjectAdd (const ObjectAdd ¬ification) |
virtual void | postNotifyObjectDelete (const ObjectDelete ¬ification) |
virtual void | postNotifyObjectPathChange (const ObjectPathChange ¬ification) |
virtual void | postNotifySubtreeInvalidate (const SubtreeInvalidate ¬ification) |
virtual void | postNotifySceneCompositeChange (const SceneCompositeNotification ¬ification) |
void | beginNotificationGuard () override |
void | endNotificationGuard () override |
virtual void | beginNotificationGuard () |
Notification guard interface. Implementation in this class is a no-op. More... | |
virtual void | endNotificationGuard () |
Private Attributes | |
std::unique_ptr< SceneCompositeNotification > | fCompositeNotification |
Composite notification, when within the scope of a guard. More... | |
Singleton class to manage UFE scenes.
This singleton class can be thought of as a "container" of scene objects, and so is responsible notifications which affect its objects. The Ufe scene is organized into scene segments which form a tree.
It also has post-notification hooks, which are indented to be implemented by the DCC app.
The application must provide the scene singleton, and initialize it in UFE with the initializeInstance() call. There is no Python binding for initializing the instance, which must therefore be done in C++.
typedef std::shared_ptr<Scene> Ufe::Scene::Ptr |
|
override |
Destructor.
|
delete |
Cannot copy the scene singleton.
|
protected |
Only derived classes can create a scene.
|
overrideprotectedvirtual |
Scene Notification guard interface. creates a SceneCompositeNotification on begin, and notifies observers with the composite notification on end.
Reimplemented from Ufe::Subject.
|
overrideprotectedvirtual |
Reimplemented from Ufe::Subject.
|
overridevirtual |
Composite notification predicate.
Reimplemented from Ufe::Subject.
|
static |
Initialize the scene singleton. The application should call this once, on startup, to initialize, and to clean up once on shut down, with a null pointer.
instance | The scene instance. |
std::invalid_argument | if the scene instance is initialized with a non-null pointer more than once. |
|
static |
|
overridevirtual |
Notify observers.
notification | The notification, must be derived from SceneChanged. |
Reimplemented from Ufe::Subject.
|
protectedvirtual |
notifyObjectAdd() hook method, called after observer notification. Implementation in this class is empty.
notification | Object add notification for the added object. |
|
protectedvirtual |
notifyObjectDelete() hook method, called after observer notification. Implementation in this class is empty.
notification | Object delete notification for the deleted object. |
|
protectedvirtual |
notifyObjectPathChange() hook method, called after observer notification. Implementation in this class is empty.
notification | Object path change notification for the object whose path was changed. |
|
protectedvirtual |
notifySceneCompositeChange() hook method, called after observer notification. Implementation in this class is empty.
notification | scene composite notification. |
|
protectedvirtual |
notifySubtreeInvalidate() hook method, called after observer notification. Implementation in this class is empty.
notification | Subtree invalidate notification for the subtree which was invalidated. |
|
private |