1 /*========================================================================= 2 3 Program: Visualization Toolkit 4 Module: vtkGraphEdge.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 2008 Sandia Corporation. 17 Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, 18 the U.S. Government retains certain rights in this software. 19 -------------------------------------------------------------------------*/ 20 /** 21 * @class vtkGraphEdge 22 * @brief Representation of a single graph edge. 23 * 24 * 25 * A heavy-weight (vtkObject subclass) graph edge object that may be used 26 * instead of the vtkEdgeType struct, for use with wrappers. 27 * The edge contains the source and target vertex ids, and the edge id. 28 * 29 * @sa 30 * vtkGraph 31 */ 32 33 #ifndef vtkGraphEdge_h 34 #define vtkGraphEdge_h 35 36 #include "vtkCommonDataModelModule.h" // For export macro 37 #include "vtkObject.h" 38 39 class VTKCOMMONDATAMODEL_EXPORT vtkGraphEdge : public vtkObject 40 { 41 public: 42 static vtkGraphEdge* New(); 43 vtkTypeMacro(vtkGraphEdge, vtkObject); 44 void PrintSelf(ostream& os, vtkIndent indent) override; 45 46 ///@{ 47 /** 48 * The source of the edge. 49 */ 50 vtkSetMacro(Source, vtkIdType); 51 vtkGetMacro(Source, vtkIdType); 52 ///@} 53 54 ///@{ 55 /** 56 * The target of the edge. 57 */ 58 vtkSetMacro(Target, vtkIdType); 59 vtkGetMacro(Target, vtkIdType); 60 ///@} 61 62 ///@{ 63 /** 64 * The id of the edge. 65 */ 66 vtkSetMacro(Id, vtkIdType); 67 vtkGetMacro(Id, vtkIdType); 68 ///@} 69 70 protected: 71 vtkGraphEdge(); 72 ~vtkGraphEdge() override; 73 74 vtkIdType Source; 75 vtkIdType Target; 76 vtkIdType Id; 77 78 private: 79 vtkGraphEdge(const vtkGraphEdge&) = delete; 80 void operator=(const vtkGraphEdge&) = delete; 81 }; 82 83 #endif 84