KiCad PCB EDA Suite
CN_EDGE Class Reference

#include <connectivity_algo.h>

Public Member Functions

 CN_EDGE ()
 
 CN_EDGE (CN_ANCHOR_PTR aSource, CN_ANCHOR_PTR aTarget, int aWeight=0)
 
CN_ANCHOR_PTR GetSourceNode () const
 
CN_ANCHOR_PTR GetTargetNode () const
 
int GetWeight () const
 
void SetSourceNode (const CN_ANCHOR_PTR &aNode)
 
void SetTargetNode (const CN_ANCHOR_PTR &aNode)
 
void SetWeight (unsigned int weight)
 
void SetVisible (bool aVisible)
 
bool IsVisible () const
 
const VECTOR2I GetSourcePos () const
 
const VECTOR2I GetTargetPos () const
 

Private Attributes

CN_ANCHOR_PTR m_source
 
CN_ANCHOR_PTR m_target
 
unsigned int m_weight = 0
 
bool m_visible = true
 

Detailed Description

Definition at line 58 of file connectivity_algo.h.

Constructor & Destructor Documentation

CN_EDGE::CN_EDGE ( )
inline

Definition at line 61 of file connectivity_algo.h.

61 {};
CN_EDGE::CN_EDGE ( CN_ANCHOR_PTR  aSource,
CN_ANCHOR_PTR  aTarget,
int  aWeight = 0 
)
inline

Definition at line 62 of file connectivity_algo.h.

62  :
63  m_source( aSource ),
64  m_target( aTarget ),
65  m_weight( aWeight ) {}
CN_ANCHOR_PTR m_target
unsigned int m_weight
CN_ANCHOR_PTR m_source

Member Function Documentation

CN_ANCHOR_PTR CN_EDGE::GetSourceNode ( ) const
inline

Definition at line 67 of file connectivity_algo.h.

References m_source.

Referenced by RN_NET::compute().

67 { return m_source; }
CN_ANCHOR_PTR m_source
const VECTOR2I CN_EDGE::GetSourcePos ( ) const
inline

Definition at line 85 of file connectivity_algo.h.

References m_source.

86  {
87  return m_source->Pos();
88  }
CN_ANCHOR_PTR m_source
CN_ANCHOR_PTR CN_EDGE::GetTargetNode ( ) const
inline

Definition at line 68 of file connectivity_algo.h.

References m_target.

68 { return m_target; }
CN_ANCHOR_PTR m_target
const VECTOR2I CN_EDGE::GetTargetPos ( ) const
inline

Definition at line 90 of file connectivity_algo.h.

References m_target.

91  {
92  return m_target->Pos();
93  }
CN_ANCHOR_PTR m_target
int CN_EDGE::GetWeight ( ) const
inline

Definition at line 69 of file connectivity_algo.h.

References m_weight.

Referenced by sortWeight().

69 { return m_weight; }
unsigned int m_weight
bool CN_EDGE::IsVisible ( ) const
inline

Definition at line 80 of file connectivity_algo.h.

References m_visible.

81  {
82  return m_visible;
83  }
void CN_EDGE::SetSourceNode ( const CN_ANCHOR_PTR aNode)
inline

Definition at line 71 of file connectivity_algo.h.

References m_source.

71 { m_source = aNode; }
CN_ANCHOR_PTR m_source
void CN_EDGE::SetTargetNode ( const CN_ANCHOR_PTR aNode)
inline

Definition at line 72 of file connectivity_algo.h.

References m_target.

72 { m_target = aNode; }
CN_ANCHOR_PTR m_target
void CN_EDGE::SetVisible ( bool  aVisible)
inline

Definition at line 75 of file connectivity_algo.h.

References m_visible.

76  {
77  m_visible = aVisible;
78  }
void CN_EDGE::SetWeight ( unsigned int  weight)
inline

Definition at line 73 of file connectivity_algo.h.

References m_weight.

73 { m_weight = weight; }
unsigned int m_weight

Member Data Documentation

CN_ANCHOR_PTR CN_EDGE::m_source
private

Definition at line 96 of file connectivity_algo.h.

Referenced by GetSourceNode(), GetSourcePos(), and SetSourceNode().

CN_ANCHOR_PTR CN_EDGE::m_target
private

Definition at line 97 of file connectivity_algo.h.

Referenced by GetTargetNode(), GetTargetPos(), and SetTargetNode().

bool CN_EDGE::m_visible = true
private

Definition at line 99 of file connectivity_algo.h.

Referenced by IsVisible(), and SetVisible().

unsigned int CN_EDGE::m_weight = 0
private

Definition at line 98 of file connectivity_algo.h.

Referenced by GetWeight(), and SetWeight().


The documentation for this class was generated from the following file: