1 /*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkContextMapper2D.cxx
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 =========================================================================*/
15
16 #include "vtkContextMapper2D.h"
17
18 #include "vtkTable.h"
19 #include "vtkInformation.h"
20 #include "vtkExecutive.h"
21
22 #include "vtkObjectFactory.h"
23
24 vtkStandardNewMacro(vtkContextMapper2D);
25 //-----------------------------------------------------------------------------
vtkContextMapper2D()26 vtkContextMapper2D::vtkContextMapper2D()
27 {
28 // We take 1 input and no outputs
29 this->SetNumberOfInputPorts(1);
30 this->SetNumberOfOutputPorts(0);
31 }
32
33 //-----------------------------------------------------------------------------
~vtkContextMapper2D()34 vtkContextMapper2D::~vtkContextMapper2D()
35 {
36 }
37
38 //----------------------------------------------------------------------------
SetInputData(vtkTable * input)39 void vtkContextMapper2D::SetInputData(vtkTable *input)
40 {
41 this->SetInputDataInternal(0, input);
42 }
43
44 //----------------------------------------------------------------------------
GetInput()45 vtkTable * vtkContextMapper2D::GetInput()
46 {
47 return vtkTable::SafeDownCast(this->GetExecutive()->GetInputData(0, 0));
48 }
49
50 //-----------------------------------------------------------------------------
FillInputPortInformation(int,vtkInformation * info)51 int vtkContextMapper2D::FillInputPortInformation(int, vtkInformation *info)
52 {
53 info->Set(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkTable");
54 return 1;
55 }
56
57
58 //-----------------------------------------------------------------------------
PrintSelf(ostream & os,vtkIndent indent)59 void vtkContextMapper2D::PrintSelf(ostream &os, vtkIndent indent)
60 {
61 this->Superclass::PrintSelf(os, indent);
62 }
63