HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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  virtual ~SOP_UndoGeometrySelection();
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(UT::ArraySet< Key, MULTI, MAX_LOAD_FACTOR_256, Clearer, Hash, KeyEqual > &a, UT::ArraySet< Key, MULTI, MAX_LOAD_FACTOR_256, Clearer, Hash, KeyEqual > &b)
Definition: UT_ArraySet.h:1561
virtual void undo()=0
#define SOP_API
Definition: SOP_API.h:10