KiCad PCB EDA Suite
EDIT_CONSTRAINT< EDIT_TYPE > Class Template Referenceabstract

Describe constraints between two edit handles. More...

#include <edit_constraints.h>

Public Member Functions

 EDIT_CONSTRAINT (EDIT_TYPE &aConstrained)
 
virtual ~EDIT_CONSTRAINT ()
 
virtual void Apply (EDIT_TYPE &aHandle)=0
 Correct coordinates of the constrained edit handle. More...
 
void Apply ()
 Correct coordinates of the constrained edit handle. More...
 

Protected Attributes

EDIT_TYPE & m_constrained
 Point that is constrained by rules implemented by Apply(). More...
 

Detailed Description

template<class EDIT_TYPE>
class EDIT_CONSTRAINT< EDIT_TYPE >

Describe constraints between two edit handles.

After the constrained handle is changed, Apply() has to be called to fix its coordinates according to the implemented constraint.

Definition at line 53 of file edit_constraints.h.

Constructor & Destructor Documentation

◆ EDIT_CONSTRAINT()

template<class EDIT_TYPE>
EDIT_CONSTRAINT< EDIT_TYPE >::EDIT_CONSTRAINT ( EDIT_TYPE &  aConstrained)
inline
Parameters
aConstrainedis EDIT_POINT to which the constraint is applied.

Definition at line 59 of file edit_constraints.h.

59 : m_constrained( aConstrained ) {};
EDIT_TYPE & m_constrained
Point that is constrained by rules implemented by Apply().

◆ ~EDIT_CONSTRAINT()

template<class EDIT_TYPE>
virtual EDIT_CONSTRAINT< EDIT_TYPE >::~EDIT_CONSTRAINT ( )
inlinevirtual

Definition at line 61 of file edit_constraints.h.

61 {};

Member Function Documentation

◆ Apply() [1/2]

template<class EDIT_TYPE>
virtual void EDIT_CONSTRAINT< EDIT_TYPE >::Apply ( EDIT_TYPE &  aHandle)
pure virtual

Correct coordinates of the constrained edit handle.

Implemented in EC_PERPLINE, EC_SNAPLINE, EC_CONVERGING, EC_CIRCLE, EC_LINE, EC_45DEGREE, EC_HORIZONTAL, and EC_VERTICAL.

Referenced by EC_CONVERGING::Apply().

◆ Apply() [2/2]

template<class EDIT_TYPE>
void EDIT_CONSTRAINT< EDIT_TYPE >::Apply ( )
inline

Correct coordinates of the constrained edit handle.

Definition at line 71 of file edit_constraints.h.

72  {
74  }
void Apply()
Correct coordinates of the constrained edit handle.
EDIT_TYPE & m_constrained
Point that is constrained by rules implemented by Apply().

Referenced by EDIT_CONSTRAINT< EDIT_LINE >::Apply().

Member Data Documentation

◆ m_constrained

template<class EDIT_TYPE>
EDIT_TYPE& EDIT_CONSTRAINT< EDIT_TYPE >::m_constrained
protected

Point that is constrained by rules implemented by Apply().

Definition at line 77 of file edit_constraints.h.

Referenced by EDIT_CONSTRAINT< EDIT_LINE >::Apply().


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