File: vtkTableExtentTranslator.h

package info (click to toggle)
paraview 5.4.1%2Bdfsg4-3.1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 218,616 kB
  • sloc: cpp: 2,331,508; ansic: 322,365; python: 111,051; xml: 79,203; tcl: 47,013; yacc: 4,877; java: 4,438; perl: 3,238; sh: 2,920; lex: 1,908; f90: 748; makefile: 273; pascal: 228; objc: 83; fortran: 31
file content (125 lines) | stat: -rw-r--r-- 4,048 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
/*=========================================================================

  Program:   Visualization Toolkit
  Module:    vtkTableExtentTranslator.h

  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
  All rights reserved.
  See Copyright.txt or http://www.kitware.com/Copyright.htm 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.

=========================================================================*/
/**
 * @class   vtkTableExtentTranslator
 * @brief   Extent translation through lookup table.
 *
 * vtkTableExtentTranslator provides a vtkExtentTranslator that is
 * programmed with a specific extent corresponding to each piece
 * number.  Readers can provide this to an application to allow the
 * pipeline to execute using the same piece breakdown that is provided
 * in the input file.
*/

#ifndef vtkTableExtentTranslator_h
#define vtkTableExtentTranslator_h

#include "vtkExtentTranslator.h"
#include "vtkPVClientServerCoreRenderingModule.h" // For export macro

class VTKPVCLIENTSERVERCORERENDERING_EXPORT vtkTableExtentTranslator : public vtkExtentTranslator
{
public:
  vtkTypeMacro(vtkTableExtentTranslator, vtkExtentTranslator);
  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;

  static vtkTableExtentTranslator* New();

  // Set the number of pieces into which the whole extent will be
  // split.  If this is 1 then the whole extent will be returned.  If
  // this is more than the number of pieces in the table then the
  // extra pieces will be empty data.  If this is more than one but
  // less than the number of pieces in the table then only this many
  // pieces will be returned (FIXME).
  void SetNumberOfPieces(int pieces) VTK_OVERRIDE;

  //@{
  /**
   * Set the real number of pieces in the extent table.
   */
  void SetNumberOfPiecesInTable(int pieces);
  vtkGetMacro(NumberOfPiecesInTable, int);
  //@}

  /**
   * Called to translate the current piece into an extent.  This is
   * not thread safe.
   */
  int PieceToExtent() VTK_OVERRIDE;

  /**
   * Not supported by this subclass of vtkExtentTranslator.
   */
  int PieceToExtentByPoints() VTK_OVERRIDE;

  /**
   * Not supported by this subclass of vtkExtentTranslator.
   */
  int PieceToExtentThreadSafe(int piece, int numPieces, int ghostLevel, int* wholeExtent,
    int* resultExtent, int splitMode, int byPoints) VTK_OVERRIDE;

  /**
   * Set the extent to be used for a piece.  This sets the extent table
   * entry for the piece.
   */
  virtual void SetExtentForPiece(int piece, int* extent);

  //@{
  /**
   * Get the extent table entry for the given piece.  This is only for
   * code that is setting up the table.  Extent translation should
   * always be done through the PieceToExtent method.
   */
  virtual void GetExtentForPiece(int piece, int* extent);
  virtual int* GetExtentForPiece(int piece);
  //@}

  //@{
  /**
   * Set the maximum ghost level that can be requested.  This can be
   * used by a reader to make sure an extent request does not go
   * outside the boundaries of the piece's file.
   */
  vtkSetMacro(MaximumGhostLevel, int);
  vtkGetMacro(MaximumGhostLevel, int);
  //@}

  //@{
  /**
   * Get/Set whether the given piece is available.  Requesting a piece
   * that is not available will produce errors in the pipeline.
   */
  virtual void SetPieceAvailable(int piece, int available);
  virtual int GetPieceAvailable(int piece);
  //@}

protected:
  vtkTableExtentTranslator();
  ~vtkTableExtentTranslator();

  // Store the extent table in a single array.  Every 6 values form an extent.
  int* ExtentTable;
  int NumberOfPiecesInTable;
  int MaximumGhostLevel;

  // Store a flag for the availability of each piece.
  int* PieceAvailable;

private:
  vtkTableExtentTranslator(const vtkTableExtentTranslator&) VTK_DELETE_FUNCTION;
  void operator=(const vtkTableExtentTranslator&) VTK_DELETE_FUNCTION;
};

#endif