ufe 7.0
Universal Front End is a DCC-agnostic component that will allow a DCC to browse and edit data in multiple data models
sceneNotification.h
Go to the documentation of this file.
1#line 1 "D:/Jenkins/workspace/EMS/ECG/ufe/full/ufe-full-python3.13-windows/ufe/include/sceneNotification.h"
2#ifndef UFE_SCENENOTIFICATION_H
3#define UFE_SCENENOTIFICATION_H
4
5// ===========================================================================
6// Copyright 2025 Autodesk, Inc. All rights reserved.
7//
8// The use of this software is subject to the Autodesk Terms of Use or other
9// license agreement provided at the time of installation or download, or
10// which otherwise accompanies this software.
11// ===========================================================================
12
13#include "notification.h"
14#include "sceneItem.h"
15
16#include <list>
17#include <bitset>
18
20
22
27{
28public:
29 enum OpType : unsigned char {
35 };
36
37 using SubOpStorageType = unsigned char;
38 constexpr static SubOpStorageType SubOpTypeNone = 0;
39
41 SceneChanged(const SceneChanged&) = default;
42
44 ~SceneChanged() override;
45
48 virtual Path changedPath() const;
49
51 OpType opType() const;
52
54 virtual SubOpStorageType subOpType() const;
55
56protected:
59private:
61};
62
64
69{
70public:
73
75 ObjectAdd(const ObjectAdd&) = default;
76
78 ~ObjectAdd() override;
79
82
84 Path changedPath() const override;
85
86private:
88};
89
91
100{
101public:
103 None = SubOpTypeNone,
107 };
108
111
113 ObjectDelete(const ObjectDelete&) = default;
114
116 ~ObjectDelete() override;
117
119 Path path() const;
120
122 Path changedPath() const override;
123
125 SubOpStorageType subOpType() const override;
126
127protected:
129 ObjectDelete(const Path& path, SubOpType objectDeleteOpType);
130
131private:
132 const Path fPath;
134};
135
137
143{
144public:
147
150
153
156
157private:
159};
160
162
168{
169public:
172
175
178
181
182private:
184};
185
187
193{
194public:
197
200
203};
204
206
213{
214public:
216 None = SubOpTypeNone,
221 };
222
225
228
231
233 SubOpStorageType subOpType() const override;
234
235protected:
237 ObjectPathChange(SubOpType objectPathChangeOpType);
239};
240
242
249{
250public:
252 ObjectRename(const SceneItem::Ptr& item, const Path& previousPath);
253
255 ObjectRename(const ObjectRename&) = default;
256
258 ~ObjectRename() override;
259
262
265
267 Path changedPath() const override;
268
269private:
272};
273
275
293{
294public:
296 ObjectReparent(const SceneItem::Ptr& item, const Path& previousPath);
297
300
302 ~ObjectReparent() override;
303
306
309
311 Path changedPath() const override;
312
313private:
316};
317
319
329{
330public:
333
335 ObjectPathAdd(const ObjectPathAdd&) = default;
336
338 ~ObjectPathAdd() override;
339
342
344 Path changedPath() const override;
345
346private:
348};
349
351
362{
363public:
365 ObjectPathRemove(const Path& removedPath);
366
369
372
375
377 Path changedPath() const override;
378
379private:
381};
382
384
397{
398public:
401
404
407
410
412 Path changedPath() const override;
413
414private:
416};
417
418
420
428{
429public:
431 Op(OpType opTypeArg, SubOpStorageType subOpTypeArg)
432 : opType(opTypeArg), subOpType(subOpTypeArg){}
433
434 Op(OpType opTypeArg, const SceneItem::Ptr& itemArg)
435 : opType(opTypeArg), item(itemArg), path(itemArg->path()) {}
436
437 Op(OpType opTypeArg, SubOpStorageType subOpTypeArg, const SceneItem::Ptr& itemArg)
438 : opType(opTypeArg), subOpType(subOpTypeArg), item(itemArg), path(itemArg->path()) {}
439
440 Op(OpType opTypeArg, const Path& pathArg)
441 : opType(opTypeArg), path(pathArg){}
442
443 Op(OpType opTypeArg, SubOpStorageType subOpTypeArg, const Path& pathArg)
444 : opType(opTypeArg), subOpType(subOpTypeArg), path(pathArg){}
445
446 Op(OpType opTypeArg, SubOpStorageType subOpTypeArg, const SceneItem::Ptr& itemArg, const Path& pathArg)
447 : opType(opTypeArg), subOpType(subOpTypeArg), item(itemArg), path(pathArg){}
448
449 Op(const SceneChanged& sceneChanged);
450
455 };
456
457 typedef std::list<Op> Ops;
458
461
464
467
470 Path changedPath() const override;
471
472 void appendSceneChanged(const SceneChanged& sceneChanged);
473
474 void appendOp(const Op& op);
475
477 inline Ops opsList() const { return fOps; }
478
480 std::size_t size() const;
481
483 bool empty() const;
484
487 Ops::const_iterator cbegin() const;
488 Ops::const_iterator begin() const;
489 Ops::const_iterator cend() const;
490 Ops::const_iterator end() const;
491 Ops::iterator begin();
492 Ops::iterator end();
494
495private:
497};
498
499}
500
501#endif /* UFE_SCENENOTIFICATION_H */
Base class for all notifications.
Definition: notification.h:30
Base class for object add scene notifications.
const SceneItem::Ptr fItem
ObjectAdd(const SceneItem::Ptr &item)
Constructor.
SceneItem::Ptr item() const
ObjectAdd(const ObjectAdd &)=default
Default copy constructor.
Path changedPath() const override
~ObjectAdd() override
Destructor.
Base class for object delete scene notifications.
ObjectDelete(const Path &path)
Constructor.
Path changedPath() const override
Path path() const
ObjectDelete(const Path &path, SubOpType objectDeleteOpType)
Constructor.
const SubOpType fSubOpType
SubOpStorageType subOpType() const override
~ObjectDelete() override
Destructor.
ObjectDelete(const ObjectDelete &)=default
Default copy constructor.
Object destroyed scene notification that occurs once an object is destroyed.
ObjectDestroyed(const Path &path)
Constructor.
~ObjectDestroyed() override
Destructor.
ObjectDestroyed(const ObjectDestroyed &)=default
Default copy constructor.
Path added to object scene notification.
Path changedPath() const override
const SceneItem::Ptr fItem
ObjectPathAdd(const SceneItem::Ptr &item)
Constructor.
~ObjectPathAdd() override
Destructor.
ObjectPathAdd(const ObjectPathAdd &)=default
Default copy constructor.
SceneItem::Ptr item() const
Base class for object path change scene notifications.
ObjectPathChange(SubOpType objectPathChangeOpType)
Constructor.
SubOpStorageType subOpType() const override
~ObjectPathChange() override
Destructor.
ObjectPathChange()
Constructor.
ObjectPathChange(const ObjectPathChange &)=default
Default copy constructor.
const SubOpType fSubOpType
Path removed from object scene notification.
Path changedPath() const override
ObjectPathRemove(const ObjectPathRemove &)=default
Default copy constructor.
Path removedPath() const
ObjectPathRemove(const Path &removedPath)
Constructor.
~ObjectPathRemove() override
Destructor.
Object delete scene notifications that occur after the object was deleted.
SceneItem::Ptr item() const
~ObjectPostDelete() override
Destructor.
const SceneItem::Ptr fItem
ObjectPostDelete(const SceneItem::Ptr &item)
Constructor.
ObjectPostDelete(const ObjectPostDelete &)=default
Default copy constructor.
Object delete scene notifications that occur before the object is deleted.
ObjectPreDelete(const ObjectPreDelete &)=default
Default copy constructor.
ObjectPreDelete(const SceneItem::Ptr &item)
Constructor.
const SceneItem::Ptr fItem
SceneItem::Ptr item() const
~ObjectPreDelete() override
Destructor.
Object renamed scene notification.
const SceneItem::Ptr fItem
SceneItem::Ptr item() const
ObjectRename(const SceneItem::Ptr &item, const Path &previousPath)
Constructor.
Path changedPath() const override
ObjectRename(const ObjectRename &)=default
Default copy constructor.
~ObjectRename() override
Destructor.
Path previousPath() const
Object reparented scene notification.
SceneItem::Ptr item() const
ObjectReparent(const SceneItem::Ptr &item, const Path &previousPath)
Constructor.
~ObjectReparent() override
Destructor.
ObjectReparent(const ObjectReparent &)=default
Default copy constructor.
const SceneItem::Ptr fItem
Path previousPath() const
Path changedPath() const override
Identify an object or 3D path in the scene.
Definition: path.h:40
Base class for all scene notifications.
OpType opType() const
const OpType fOpType
~SceneChanged() override
Destructor.
SceneChanged(OpType opType)
Constructor.
virtual SubOpStorageType subOpType() const
virtual Path changedPath() const
SceneChanged(const SceneChanged &)=default
Default copy constructor.
unsigned char SubOpStorageType
SceneChanged composite notification.
Ops::const_iterator begin() const
void appendSceneChanged(const SceneChanged &sceneChanged)
Ops::const_iterator cbegin() const
Ops::const_iterator end() const
SceneCompositeNotification()
Constructor.
Ops::const_iterator cend() const
SceneCompositeNotification(const SceneCompositeNotification &)=default
Default copy constructor.
~SceneCompositeNotification() override
Destructor.
Path changedPath() const override
std::shared_ptr< SceneItem > Ptr
Definition: sceneItem.h:45
Subtree invalidate notification.
SubtreeInvalidate(const SceneItem::Ptr &item)
Constructor.
SubtreeInvalidate(const SubtreeInvalidate &)=default
Default copy constructor.
const SceneItem::Ptr fRoot
Path changedPath() const override
~SubtreeInvalidate() override
Destructor.
SceneItem::Ptr root() const
Path path(const std::string &pathString)
Op(const SceneChanged &sceneChanged)
Op(OpType opTypeArg, const Path &pathArg)
Op(OpType opTypeArg, const SceneItem::Ptr &itemArg)
Op(OpType opTypeArg, SubOpStorageType subOpTypeArg)
Op(OpType opTypeArg, SubOpStorageType subOpTypeArg, const SceneItem::Ptr &itemArg)
Op(OpType opTypeArg, SubOpStorageType subOpTypeArg, const SceneItem::Ptr &itemArg, const Path &pathArg)
Op(OpType opTypeArg, SubOpStorageType subOpTypeArg, const Path &pathArg)
#define UFE_NS_DEF
Definition: ufe.h:36
#define UFE_SDK_DECL
Definition: ufeExport.h:35