KiCad PCB EDA Suite
MINOPTMAX< T > Class Template Reference

#include <minoptmax.h>

Public Member Functions

Min () const
 
Max () const
 
Opt () const
 
bool HasMin () const
 
bool HasMax () const
 
bool HasOpt () const
 
void SetMin (T v)
 
void SetMax (T v)
 
void SetOpt (T v)
 
bool IsNull () const
 

Private Attributes

bool m_isNull
 
m_min
 
m_opt
 
m_max
 
bool m_hasMin = false
 
bool m_hasOpt = false
 
bool m_hasMax = false
 

Detailed Description

template<class T = int>
class MINOPTMAX< T >

Definition at line 28 of file minoptmax.h.

Member Function Documentation

◆ HasMax()

◆ HasMin()

◆ HasOpt()

template<class T = int>
bool MINOPTMAX< T >::HasOpt ( ) const
inline

Definition at line 37 of file minoptmax.h.

37 { return m_hasOpt; }
bool m_hasOpt
Definition: minoptmax.h:51

◆ IsNull()

template<class T = int>
bool MINOPTMAX< T >::IsNull ( ) const
inline

Definition at line 43 of file minoptmax.h.

43 { return m_isNull; }
bool m_isNull
Definition: minoptmax.h:46

◆ Max()

template<class T = int>
T MINOPTMAX< T >::Max ( ) const
inline

◆ Min()

◆ Opt()

template<class T = int>
T MINOPTMAX< T >::Opt ( ) const
inline

Definition at line 33 of file minoptmax.h.

33 { return m_hasOpt ? m_opt : Min(); };
T Min() const
Definition: minoptmax.h:31
bool m_hasOpt
Definition: minoptmax.h:51

Referenced by PNS_PCBNEW_RULE_RESOLVER::Clearance(), PNS_KICAD_IFACE_BASE::ImportSizes(), and ROUTER_TOOL::onViaCommand().

◆ SetMax()

template<class T = int>
void MINOPTMAX< T >::SetMax ( v)
inline

Definition at line 40 of file minoptmax.h.

40 { m_isNull = false; m_max = v; m_hasMax = true; }
bool m_isNull
Definition: minoptmax.h:46
bool m_hasMax
Definition: minoptmax.h:52

Referenced by DRC_RULES_PARSER::parseConstraint().

◆ SetMin()

template<class T = int>
void MINOPTMAX< T >::SetMin ( v)
inline

Definition at line 39 of file minoptmax.h.

39 { m_isNull = false; m_min = v; m_hasMin = true; }
bool m_hasMin
Definition: minoptmax.h:50
bool m_isNull
Definition: minoptmax.h:46

Referenced by DRC_ENGINE::EvalRulesForItems(), DRC_ENGINE::loadImplicitRules(), and DRC_RULES_PARSER::parseConstraint().

◆ SetOpt()

template<class T = int>
void MINOPTMAX< T >::SetOpt ( v)
inline

Definition at line 41 of file minoptmax.h.

41 { m_isNull = false; m_opt = v; m_hasOpt = true; }
bool m_hasOpt
Definition: minoptmax.h:51
bool m_isNull
Definition: minoptmax.h:46

Referenced by DRC_ENGINE::loadImplicitRules(), and DRC_RULES_PARSER::parseConstraint().

Member Data Documentation

◆ m_hasMax

template<class T = int>
bool MINOPTMAX< T >::m_hasMax = false
private

◆ m_hasMin

template<class T = int>
bool MINOPTMAX< T >::m_hasMin = false
private

◆ m_hasOpt

template<class T = int>
bool MINOPTMAX< T >::m_hasOpt = false
private

◆ m_isNull

template<class T = int>
bool MINOPTMAX< T >::m_isNull
private

◆ m_max

template<class T = int>
T MINOPTMAX< T >::m_max
private

Definition at line 49 of file minoptmax.h.

Referenced by MINOPTMAX< int >::Max(), and MINOPTMAX< int >::SetMax().

◆ m_min

template<class T = int>
T MINOPTMAX< T >::m_min
private

Definition at line 47 of file minoptmax.h.

Referenced by MINOPTMAX< int >::Min(), and MINOPTMAX< int >::SetMin().

◆ m_opt

template<class T = int>
T MINOPTMAX< T >::m_opt
private

Definition at line 48 of file minoptmax.h.

Referenced by MINOPTMAX< int >::Opt(), and MINOPTMAX< int >::SetOpt().


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