KiCad PCB EDA Suite
Loading...
Searching...
No Matches
hash_eda.h File Reference
#include <cstdlib>
#include <functional>

Go to the source code of this file.

Enumerations

enum  HASH_FLAGS {
  HASH_POS = 0x01 , REL_COORD = 0x02 , REL_POS = 0x04 , HASH_ROT = 0x08 ,
  HASH_LAYER = 0x10 , HASH_NET = 0x20 , HASH_REF = 0x40 , HASH_VALUE = 0x80 ,
  HASH_ALL = 0xff
}
 Enables/disables properties that will be used for calculating the hash. More...
 

Functions

std::size_t hash_fp_item (const EDA_ITEM *aItem, int aFlags=HASH_FLAGS::HASH_ALL)
 Calculate hash of an EDA_ITEM.
 

Enumeration Type Documentation

◆ HASH_FLAGS

enum HASH_FLAGS

Enables/disables properties that will be used for calculating the hash.

The properties might be combined using the bitwise 'or' operator.

Enumerator
HASH_POS 

use coordinates relative to the parent object

REL_COORD 

use coordinates relative to the shape position

REL_POS 
HASH_ROT 
HASH_LAYER 
HASH_NET 
HASH_REF 
HASH_VALUE 
HASH_ALL 

Definition at line 41 of file hash_eda.h.

Function Documentation

◆ hash_fp_item()

std::size_t hash_fp_item ( const EDA_ITEM aItem,
int  aFlags = HASH_FLAGS::HASH_ALL 
)

Calculate hash of an EDA_ITEM.

Parameters
aItemis the item for which the hash will be computed.
Returns
Hash value.

Definition at line 55 of file hash_eda.cpp.

References PADSTACK::ALL_LAYERS, ARC, EDA_ANGLE::AsDegrees(), BEZIER, CHAMFERED_RECT, CIRCLE, SHAPE_POLY_SET::CIterateWithHoles(), CUSTOM, ERROR_INSIDE, EDA_SHAPE::GetArcMid(), EDA_SHAPE::GetBezierC1(), EDA_SHAPE::GetBezierC2(), PCB_TABLE::GetBorderStroke(), PCB_SHAPE::GetCenter(), EDA_SHAPE::GetEnd(), EDA_TEXT::GetHorizJustify(), EDA_SHAPE::GetLineStyle(), FOOTPRINT::GetOrientation(), BOARD_ITEM::GetParentFootprint(), EDA_SHAPE::GetPolyShape(), FOOTPRINT::GetPosition(), PCB_SHAPE::GetPosition(), EDA_SHAPE::GetRadius(), PCB_TABLE::GetSeparatorsStroke(), EDA_SHAPE::GetShape(), EDA_SHAPE::GetStart(), EDA_TEXT::GetText(), EDA_TEXT::GetTextAngle(), EDA_TEXT::GetTextHeight(), EDA_TEXT::GetTextWidth(), EDA_TEXT::GetVertJustify(), PCB_SHAPE::GetWidth(), FOOTPRINT::GraphicalItems(), hash_board_item(), hash_combine(), hash_fp_item(), HASH_NET, HASH_POS, HASH_REF, HASH_ROT, HASH_VALUE, EDA_TEXT::IsBold(), EDA_SHAPE::IsFilled(), EDA_TEXT::IsItalic(), EDA_TEXT::IsMirrored(), KI_FALLTHROUGH, NPTH, pad, FOOTPRINT::Pads(), PCB_FIELD_T, PCB_FOOTPRINT_T, PCB_PAD_T, PCB_SHAPE_T, PCB_TABLE_T, PCB_TABLECELL_T, PCB_TEXT_T, PCB_TEXTBOX_T, PCB_VIA_T, POLY, PTH, REL_COORD, REL_POS, RotatePoint(), ROUNDRECT, PCB_TABLE::StrokeColumns(), PCB_TABLE::StrokeExternal(), PCB_TABLE::StrokeHeader(), PCB_TABLE::StrokeRows(), text, TRAPEZOID, EDA_ITEM::Type(), via, VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by EDA_DATA::AddPackage(), PCB_IO_IPC2581::addPackage(), PCB_IO_IPC2581::addPadStack(), PCB_IO_IPC2581::addShape(), PCB_IO_IPC2581::generateBOMSection(), PCB_IO_IPC2581::generateLayerSetDrill(), hash_fp_item(), hashFootprint(), ODB_STEP_ENTITY::InitEdaData(), and PCB_IO_IPC2581::shapeHash().