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
selectionNotification.h
Go to the documentation of this file.
1#line 1 "S:/jenkins/workspace/ECP/ufe/ufe-full-python3.11-windows/ufe/include/selectionNotification.h"
2#ifndef _ufeSelectionNotification
3#define _ufeSelectionNotification
4// ===========================================================================
5// Copyright 2020 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 "notification.h"
13#include "sceneItem.h"
14
15#include <list>
16#include <bitset>
17
19
21
27{
28public:
29 enum OpType {Append, Remove, Insert, Clear, ReplaceWith, SelectionCompositeNotification};
30
33
36
39
43 OpType opType() const;
44private:
46};
47
49
56{
57public:
58
62
65
68
71
72private:
74};
75
77
84{
85public:
89
92
95
98
99private:
101};
102
104
113{
114public:
119 const SceneItem::Ptr& position,
120 const SceneItem::Ptr& item
121 );
122
125
128
131
134
135private:
138};
139
140class Selection;
141
143
149{
150public:
152 SelectionCleared(const Selection& previous);
153
156
159
161
162private:
164};
165
167
174{
175public:
176
178 SelectionReplaced(const Selection& previous);
179
182
185
187
188private:
190};
191
193
201{
202public:
203
205 Op(OpType opTypeArg) : opType(opTypeArg) {}
206 Op(OpType opTypeArg, const SceneItem::Ptr& itemArg)
207 : opType(opTypeArg), item(itemArg) {}
208 Op(OpType opTypeArg,
209 const SceneItem::Ptr& positionArg,
210 const SceneItem::Ptr& itemArg)
211 : opType(opTypeArg), item(itemArg), position(positionArg) {}
212
214
216 SceneItem::Ptr item{nullptr};
217 SceneItem::Ptr position{nullptr};
218 };
219
220 typedef std::list<Op> Ops;
221
224
227
230
233
236
239 const SceneItem::Ptr& position,
240 const SceneItem::Ptr& item
241 );
242
245
251
253 std::size_t size() const;
254
256 bool empty() const;
257
259
260 Ops::const_iterator cbegin() const;
261 Ops::const_iterator begin() const;
262 Ops::const_iterator cend() const;
263 Ops::const_iterator end() const;
264 Ops::iterator begin();
265 Ops::iterator end();
267
268private:
269
271};
272
273}
274
275#endif /* _ufeSelectionNotification */
Base class for all notifications.
Definition: notification.h:29
std::shared_ptr< SceneItem > Ptr
Definition: sceneItem.h:44
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
Iteration interface on operations.
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:28
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:35
#define UFE_SDK_DECL
Definition: ufeExport.h:36