TraceMaker
C++ API of the engine
Loading...
Searching...
No Matches
tmk::model::DesignRules Struct Reference

#include <model/rules.hpp>

Public Member Functions

const NetClass & default_class () const
const NetClass & class_for (const std::string &net_name) const
 Effective net class for a net name (explicit assignment, then the first matching pattern, else Default).
const NetClass * find_class (const std::string &name) const

Public Attributes

BoardMinimums minimums
std::vector< NetClass > classes
 classes[0] is "Default"
std::vector< std::pair< std::string, std::string > > patterns
 (net-name pattern, class name), in file order
std::map< std::string, std::vector< std::string > > assignments
 explicit net → class names
std::vector< CustomRule > custom
std::map< std::string, std::string > severities
 KiCad violation type -> error | warning | ignore.
bool use_height_for_length = true
 KiCad's "Include stackup height in track length calculations" (on unless the project turns it off): vias add the stackup height between the layers they join to a net's length (route/bus.hpp, via_heights).
std::vector< std::string > warnings
 anything that could not be interpreted

Detailed Description

Definition at line 62 of file rules.hpp.

Member Function Documentation

◆ class_for()

const NetClass & tmk::model::DesignRules::class_for ( const std::string & net_name) const

Effective net class for a net name (explicit assignment, then the first matching pattern, else Default).

◆ default_class()

const NetClass & tmk::model::DesignRules::default_class ( ) const
inline

Definition at line 74 of file rules.hpp.

◆ find_class()

const NetClass * tmk::model::DesignRules::find_class ( const std::string & name) const

Member Data Documentation

◆ assignments

std::map<std::string, std::vector<std::string> > tmk::model::DesignRules::assignments

explicit net → class names

Definition at line 66 of file rules.hpp.

◆ classes

std::vector<NetClass> tmk::model::DesignRules::classes

classes[0] is "Default"

Definition at line 64 of file rules.hpp.

◆ custom

std::vector<CustomRule> tmk::model::DesignRules::custom

Definition at line 67 of file rules.hpp.

◆ minimums

BoardMinimums tmk::model::DesignRules::minimums

Definition at line 63 of file rules.hpp.

◆ patterns

std::vector<std::pair<std::string, std::string> > tmk::model::DesignRules::patterns

(net-name pattern, class name), in file order

Definition at line 65 of file rules.hpp.

◆ severities

std::map<std::string, std::string> tmk::model::DesignRules::severities

KiCad violation type -> error | warning | ignore.

Definition at line 68 of file rules.hpp.

◆ use_height_for_length

bool tmk::model::DesignRules::use_height_for_length = true

KiCad's "Include stackup height in track length calculations" (on unless the project turns it off): vias add the stackup height between the layers they join to a net's length (route/bus.hpp, via_heights).

Definition at line 71 of file rules.hpp.

◆ warnings

std::vector<std::string> tmk::model::DesignRules::warnings

anything that could not be interpreted

Definition at line 72 of file rules.hpp.


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