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
selectionNotification.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/selectionNotification.h"
2#ifndef UFE_SELECTIONNOTIFICATION_H
3#define UFE_SELECTIONNOTIFICATION_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
28{
29public:
30 enum OpType {Append, Remove, Insert, Clear, ReplaceWith, SelectionCompositeNotification};
31
34
37
40
44 OpType opType() const;
45private:
47};
48
50
57{
58public:
59
63
66
69
72
73private:
75};
76
78
85{
86public:
90
93
96
99
100private:
102};
103
105
114{
115public:
120 const SceneItem::Ptr& position,
121 const SceneItem::Ptr& item
122 );
123
126
129
132
135
136private:
139};
140
141class Selection;
142
144
150{
151public:
153 SelectionCleared(const Selection& previous);
154
157
160
162
163private:
165};
166
168
175{
176public:
177
179 SelectionReplaced(const Selection& previous);
180
183
186
188
189private:
191};
192
194
202{
203public:
204
206 Op(OpType opTypeArg) : opType(opTypeArg) {}
207 Op(OpType opTypeArg, const SceneItem::Ptr& itemArg)
208 : opType(opTypeArg), item(itemArg) {}
209 Op(OpType opTypeArg,
210 const SceneItem::Ptr& positionArg,
211 const SceneItem::Ptr& itemArg)
212 : opType(opTypeArg), item(itemArg), position(positionArg) {}
213
215
217 SceneItem::Ptr item{nullptr};
218 SceneItem::Ptr position{nullptr};
219 };
220
221 typedef std::list<Op> Ops;
222
225
228
231
234
237
240 const SceneItem::Ptr& position,
241 const SceneItem::Ptr& item
242 );
243
246
252
254 std::size_t size() const;
255
257 bool empty() const;
258
261 Ops::const_iterator cbegin() const;
262 Ops::const_iterator begin() const;
263 Ops::const_iterator cend() const;
264 Ops::const_iterator end() const;
265 Ops::iterator begin();
266 Ops::iterator end();
268
269private:
270
272};
273
274}
275
276#endif /* UFE_SELECTIONNOTIFICATION_H */
Base class for all notifications.
Definition: notification.h:30
std::shared_ptr< SceneItem > Ptr
Definition: sceneItem.h:45
Base class for all selection notifications.
OpType opType() const
~SelectionChanged() override
Destructor.
SelectionChanged(const SelectionChanged &)=default
Default copy constructor.
SelectionChanged(OpType opType)
Constructor.
Selection cleared notification.
SelectionCleared(const Selection &previous)
Constructor.
~SelectionCleared() override
Destructor.
const Selection & previousSelection() const
const Selection & fPreviousSelection
SelectionCleared(const SelectionCleared &)=default
Default copy constructor.
Selection composite notification.
void appendClearOp()
Append a clear operation to the list of operations.
Ops::const_iterator cbegin() const
void appendRemoveOp(const SceneItem::Ptr &item)
Append a remove operation to the list of operations.
~SelectionCompositeNotification() override
Destructor.
void appendInsertOp(const SceneItem::Ptr &position, const SceneItem::Ptr &item)
Append an insert operation to the list of operations.
SelectionCompositeNotification(const SelectionCompositeNotification &)=default
Default copy constructor.
Ops::const_iterator cend() const
Ops::const_iterator end() const
Ops::const_iterator begin() const
void appendAppendOp(const SceneItem::Ptr &item)
Append an append operation to the list of operations.
Selection list for objects in the scene.
Definition: selection.h:29
Item added to selection notification.
~SelectionItemAppended() override
Destructor.
SceneItem::Ptr item() const
SelectionItemAppended(const SceneItem::Ptr &item)
SelectionItemAppended(const SelectionItemAppended &)=default
Default copy constructor.
Item inserted into selection notification.
SceneItem::Ptr item() const
SceneItem::Ptr position() const
~SelectionItemInserted() override
Destructor.
SelectionItemInserted(const SceneItem::Ptr &position, const SceneItem::Ptr &item)
SelectionItemInserted(const SelectionItemInserted &)=default
Default copy constructor.
Item removed from selection notification.
SceneItem::Ptr item() const
SelectionItemRemoved(const SceneItem::Ptr &item)
SelectionItemRemoved(const SelectionItemRemoved &)=default
Default copy constructor.
~SelectionItemRemoved() override
Destructor.
Selection replaced notification.
SelectionReplaced(const Selection &previous)
Constructor.
SelectionReplaced(const SelectionReplaced &)=default
Default copy constructor.
~SelectionReplaced() override
Destructor.
const Selection & previousSelection() const
const Selection & fPreviousSelection
Op(OpType opTypeArg, const SceneItem::Ptr &itemArg)
Op(OpType opTypeArg, const SceneItem::Ptr &positionArg, const SceneItem::Ptr &itemArg)
#define UFE_NS_DEF
Definition: ufe.h:36
#define UFE_SDK_DECL
Definition: ufeExport.h:35