HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_UndoGeometrySelection.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: SOP_UndoGeometrySelection.h ( SOP Library, C++)
7  *
8  * COMMENTS:
9  */
10 
11 #ifndef __SOP_UndoGeometrySelection__
12 #define __SOP_UndoGeometrySelection__
13 
14 #include "SOP_API.h"
15 
16 #include <GU/GU_SelectionSet.h>
17 #include <UT/UT_UniquePtr.h>
18 #include <UT/UT_StringStream.h>
19 #include <UT/UT_Undo.h>
20 
22 {
23 public:
25  ~SOP_UndoGeometrySelection() override;
26 
27  // UT_Undo overrides
28  void undo() override;
29  void redo() override;
30 
31 private:
32  void swap();
33 
34  bool saveSelectionToStream(std::ostream &os);
35  bool loadSelectionFromStream(std::istream &is);
36 
37  GU_SelectionSetHandle mySelectionSet;
38  UT_UniquePtr<UT_StringStream> myUndoStream;
39 };
40 
41 #endif // __SOP_UndoGeometrySelection__
virtual void redo()=0
void swap(T &lhs, T &rhs)
Definition: pugixml.cpp:7172
UT_SharedPtr< GU_SelectionSet > GU_SelectionSetHandle
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
Definition: UT_UniquePtr.h:39
virtual void undo()=0
#define SOP_API
Definition: SOP_API.h:10