VTK  9.2.6
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
59#ifndef vtkDIMACSGraphReader_h
60#define vtkDIMACSGraphReader_h
61
62#include "vtkGraphAlgorithm.h"
63#include "vtkIOInfovisModule.h" // For export macro
64#include "vtkStdString.h" // For string API
65
66class VTKIOINFOVIS_EXPORT vtkDIMACSGraphReader : public vtkGraphAlgorithm
67{
68
69public:
72 void PrintSelf(ostream& os, vtkIndent indent) override;
73
75
81
83
86 vtkGetStringMacro(VertexAttributeArrayName);
87 vtkSetStringMacro(VertexAttributeArrayName);
89
91
94 vtkGetStringMacro(EdgeAttributeArrayName);
95 vtkSetStringMacro(EdgeAttributeArrayName);
97
98protected:
101
103
104 int buildGenericGraph(vtkGraph* output, vtkStdString& defaultVertexAttrArrayName,
105 vtkStdString& defaultEdgeAttrArrayName);
106
109
114 vtkInformationVector* outputVector) override;
115
117
118private:
119 bool fileOk;
120 bool Directed;
121 char* FileName;
122 char* VertexAttributeArrayName;
123 char* EdgeAttributeArrayName;
124
125 int numVerts;
126 int numEdges;
127 vtkStdString dimacsProblemStr;
128
130 void operator=(const vtkDIMACSGraphReader&) = delete;
131};
132
133#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:296
a simple class to control print indentation
Definition vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Wrapper around std::string to keep symbols short.