vtkPVClassNameInformation.h 2.98 KB
Newer Older
1 2 3 4 5
/*=========================================================================

  Program:   ParaView
  Module:    vtkPVClassNameInformation.h

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

10 11 12
     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.
13 14

=========================================================================*/
15 16 17 18 19 20 21 22
/**
 * @class   vtkPVClassNameInformation
 * @brief   Holds class name
 *
 * This information object gets the class name of the input VTK object.  This
 * is separate from vtkPVDataInformation because it can be determined before
 * Update is called and because it operates on any VTK object.
*/
23

24 25
#ifndef vtkPVClassNameInformation_h
#define vtkPVClassNameInformation_h
26

27
#include "vtkPVClientServerCoreCoreModule.h" //needed for exports
28 29
#include "vtkPVInformation.h"

30
class VTKPVCLIENTSERVERCORECORE_EXPORT vtkPVClassNameInformation : public vtkPVInformation
31 32 33
{
public:
  static vtkPVClassNameInformation* New();
34
  vtkTypeMacro(vtkPVClassNameInformation, vtkPVInformation);
Cory Quammen's avatar
Cory Quammen committed
35
  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
36

37 38 39 40 41 42 43 44 45
  //@{
  /**
   * Port number controls which output port the information is gathered from.
   * This is only applicable when the vtkObject from which the information being
   * gathered is a vtkAlgorithm. Set it to -1(default), to return the classname
   * of the vtkAlgorithm itself.
   * This is the only parameter that can be set on  the client-side before
   * gathering the information.
   */
46
  vtkSetMacro(PortNumber, int);
47
  //@}
48

49 50 51 52
  //@{
  /**
   * Get class name of VTK object.
   */
53
  vtkGetStringMacro(VTKClassName);
54
  //@}
55

56 57 58
  /**
   * Transfer information about a single object into this object.
   */
59
  void CopyFromObject(vtkObject*) VTK_OVERRIDE;
60

61 62 63
  /**
   * Merge another information object.
   */
64
  void AddInformation(vtkPVInformation*) VTK_OVERRIDE;
65

66 67 68 69
  //@{
  /**
   * Manage a serialized version of the information.
   */
70 71
  void CopyToStream(vtkClientServerStream*) VTK_OVERRIDE;
  void CopyFromStream(const vtkClientServerStream*) VTK_OVERRIDE;
72 73 74 75 76 77 78 79 80
  //@}

  //@{
  /**
   * Serialize/Deserialize the parameters that control how/what information is
   * gathered. This are different from the ivars that constitute the gathered
   * information itself. For example, PortNumber on vtkPVDataInformation
   * controls what output port the data-information is gathered from.
   */
81 82
  void CopyParametersToStream(vtkMultiProcessStream&) VTK_OVERRIDE;
  void CopyParametersFromStream(vtkMultiProcessStream&) VTK_OVERRIDE;
83
  //@}
84

85 86
protected:
  vtkPVClassNameInformation();
87
  ~vtkPVClassNameInformation() override;
88

89
  int PortNumber;
90
  char* VTKClassName;
91
  vtkSetStringMacro(VTKClassName);
Kitware Robot's avatar
Kitware Robot committed
92

93
private:
94 95
  vtkPVClassNameInformation(const vtkPVClassNameInformation&) = delete;
  void operator=(const vtkPVClassNameInformation&) = delete;
96 97 98
};

#endif