KiCad PCB EDA Suite
EDIT_CONSTRAINT< EDIT_TYPE > Class Template Referenceabstract

Class EDIT_CONSTRAINT. More...

#include <edit_constraints.h>

Public Member Functions

 EDIT_CONSTRAINT (EDIT_TYPE &aConstrained)
 Constructor. More...
 
virtual ~EDIT_CONSTRAINT ()
 
virtual void Apply (EDIT_TYPE &aHandle)=0
 Function Apply() More...
 
void Apply ()
 Function Apply() 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 >

Class EDIT_CONSTRAINT.

Allows to 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 42 of file edit_constraints.h.

Constructor & Destructor Documentation

template<class EDIT_TYPE>
EDIT_CONSTRAINT< EDIT_TYPE >::EDIT_CONSTRAINT ( EDIT_TYPE &  aConstrained)
inline

Constructor.

Parameters
aConstrainedis EDIT_POINT to which the constraint is applied.

Definition at line 50 of file edit_constraints.h.

50 : m_constrained( aConstrained ) {};
EDIT_TYPE & m_constrained
Point that is constrained by rules implemented by Apply()
template<class EDIT_TYPE>
virtual EDIT_CONSTRAINT< EDIT_TYPE >::~EDIT_CONSTRAINT ( )
inlinevirtual

Definition at line 52 of file edit_constraints.h.

52 {};

Member Function Documentation

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

Function Apply()

Corrects coordinates of the constrained edit handle.

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

Referenced by EC_CONVERGING::Apply().

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

Function Apply()

Corrects coordinates of the constrained edit handle.

Definition at line 66 of file edit_constraints.h.

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

67  {
69  }
void Apply()
Function Apply()
EDIT_TYPE & m_constrained
Point that is constrained by rules implemented by Apply()

Member Data Documentation

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 72 of file edit_constraints.h.

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


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