VTK  9.1.0
vtkDIMACSGraphReader.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkDIMACSGraphReader.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=========================================================================*/
15/*----------------------------------------------------------------------------
16 Copyright (c) Sandia Corporation
17 See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
18----------------------------------------------------------------------------*/
19
56#ifndef vtkDIMACSGraphReader_h
57#define vtkDIMACSGraphReader_h
58
59#include "vtkGraphAlgorithm.h"
60#include "vtkIOInfovisModule.h" // For export macro
61#include "vtkStdString.h" // For string API
62
63class VTKIOINFOVIS_EXPORT vtkDIMACSGraphReader : public vtkGraphAlgorithm
64{
65
66public:
69 void PrintSelf(ostream& os, vtkIndent indent) override;
70
72
78
80
83 vtkGetStringMacro(VertexAttributeArrayName);
84 vtkSetStringMacro(VertexAttributeArrayName);
86
88
91 vtkGetStringMacro(EdgeAttributeArrayName);
92 vtkSetStringMacro(EdgeAttributeArrayName);
94
95protected:
98
100
101 int buildGenericGraph(vtkGraph* output, vtkStdString& defaultVertexAttrArrayName,
102 vtkStdString& defaultEdgeAttrArrayName);
103
106
111 vtkInformationVector* outputVector) override;
112
114
115private:
116 bool fileOk;
117 bool Directed;
118 char* FileName;
119 char* VertexAttributeArrayName;
120 char* EdgeAttributeArrayName;
121
122 int numVerts;
123 int numEdges;
124 vtkStdString dimacsProblemStr;
125
127 void operator=(const vtkDIMACSGraphReader&) = delete;
128};
129
130#endif // vtkDIMACSGraphReader_h
reads vtkGraph data from a DIMACS formatted file
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
~vtkDIMACSGraphReader() override
vtkSetFilePathMacro(FileName)
The DIMACS file name.
int buildGenericGraph(vtkGraph *output, vtkStdString &defaultVertexAttrArrayName, vtkStdString &defaultEdgeAttrArrayName)
int RequestDataObject(vtkInformation *, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
Creates directed or undirected output based on Directed flag.
vtkGetFilePathMacro(FileName)
The DIMACS file name.
int buildColoringGraph(vtkGraph *output)
static vtkDIMACSGraphReader * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int buildMaxflowGraph(vtkGraph *output)
Superclass for algorithms that produce only graph as output.
Base class for graph data types.
Definition: vtkGraph.h:339
a simple class to control print indentation
Definition: vtkIndent.h:113
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:105