vtkSMUndoElement.h 1.75 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
/*=========================================================================

  Program:   ParaView
  Module:    vtkSMUndoElement.h

  Copyright (c) Kitware, Inc.
  All rights reserved.
  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.

     This software is distributed WITHOUT ANY WARRANTY; without even
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
     PURPOSE.  See the above copyright notice for more information.

=========================================================================*/
// .NAME vtkSMUndoElement - abstract superclass for Server Manager undo 
// elements.
// .SECTION Description
// Abstract superclass for Server Manager undo elements. 
19 20
// This class keeps the session, so undoelement could work accross a set of
// communication Sessions.
21 22 23 24 25

#ifndef __vtkSMUndoElement_h
#define __vtkSMUndoElement_h

#include "vtkUndoElement.h"
Utkarsh Ayachit's avatar
Utkarsh Ayachit committed
26
#include "vtkWeakPointer.h" // needed for vtkWeakPointer.
27

28
class vtkSMSession;
29
class vtkSMSessionProxyManager;
30

31 32 33
class VTK_EXPORT vtkSMUndoElement : public vtkUndoElement
{
public:
34
  vtkTypeMacro(vtkSMUndoElement, vtkUndoElement);
35 36
  void PrintSelf(ostream& os, vtkIndent indent);

37
  // Get/Set the Session that has been used to generate that undoElement.
38
  virtual vtkSMSession* GetSession();
39
  virtual void SetSession(vtkSMSession*);
40

41 42 43 44
  // Description:
  // Return the corresponding ProxyManager if any.
  virtual vtkSMSessionProxyManager* GetSessionProxyManager();

45 46 47
protected:
  vtkSMUndoElement();
  ~vtkSMUndoElement();
48

49
  // Identifies the session to which this object is related.
50
  vtkWeakPointer<vtkSMSession> Session;
51

52 53 54 55 56 57 58 59
private:
  vtkSMUndoElement(const vtkSMUndoElement&); // Not implemented.
  void operator=(const vtkSMUndoElement&); // Not implemented.
};


#endif