VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
vtkTableExtentTranslator.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkTableExtentTranslator.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
25 #ifndef __vtkTableExtentTranslator_h
26 #define __vtkTableExtentTranslator_h
27 
28 #include "vtkCommonExecutionModelModule.h" // For export macro
29 #include "vtkExtentTranslator.h"
30 
32 {
33 public:
35  void PrintSelf(ostream& os, vtkIndent indent);
36 
37  static vtkTableExtentTranslator* New();
38 
39 
40  // Set the number of pieces into which the whole extent will be
41  // split. If this is 1 then the whole extent will be returned. If
42  // this is more than the number of pieces in the table then the
43  // extra pieces will be empty data. If this is more than one but
44  // less than the number of pieces in the table then only this many
45  // pieces will be returned (FIXME).
46  void SetNumberOfPieces(int pieces);
47 
49 
50  void SetNumberOfPiecesInTable(int pieces);
51  vtkGetMacro(NumberOfPiecesInTable, int);
53 
56  int PieceToExtent();
57 
60 
62 
63  int PieceToExtentThreadSafe(int piece, int numPieces,
64  int ghostLevel, int *wholeExtent,
65  int *resultExtent, int splitMode,
66  int byPoints);
68 
71  virtual void SetExtentForPiece(int piece, int* extent);
72 
74 
77  virtual void GetExtentForPiece(int piece, int* extent);
78  virtual int* GetExtentForPiece(int piece);
80 
82 
85  vtkSetMacro(MaximumGhostLevel, int);
86  vtkGetMacro(MaximumGhostLevel, int);
88 
90 
92  virtual void SetPieceAvailable(int piece, int available);
93  virtual int GetPieceAvailable(int piece);
95 
96 protected:
99 
100  // Store the extent table in a single array. Every 6 values form an extent.
104 
105  // Store a flag for the availability of each piece.
107 
108 private:
109  vtkTableExtentTranslator(const vtkTableExtentTranslator&); // Not implemented.
110  void operator=(const vtkTableExtentTranslator&); // Not implemented.
111 };
112 
113 #endif
#define VTKCOMMONEXECUTIONMODEL_EXPORT
virtual void SetNumberOfPieces(int)
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:83
Generates a structured extent from unstructured.
static vtkExtentTranslator * New()
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:619
a simple class to control print indentation
Definition: vtkIndent.h:38
virtual int PieceToExtentByPoints()
virtual int PieceToExtent()
Extent translation through lookup table.
void PrintSelf(ostream &os, vtkIndent indent)
#define vtkSetMacro(name, type)
Definition: vtkSetGet.h:69
virtual int PieceToExtentThreadSafe(int piece, int numPieces, int ghostLevel, int *wholeExtent, int *resultExtent, int splitMode, int byPoints)