KiCad PCB EDA Suite
Loading...
Searching...
No Matches
hash_eda.h
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright (C) 2017 CERN
5 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
6 *
7 * @author Maciej Suminski <[email protected]>
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 2
12 * of the License, or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program. If not, see <https://www.gnu.org/licenses/>.
21 */
22
23#ifndef HASH_EDA_H_
24#define HASH_EDA_H_
25
30
31#include <cstdlib>
32#include <functional>
33
34class EDA_ITEM;
35
42{
43 HASH_POS = 0x01,
44
46 REL_COORD = 0x02,
47
49 REL_POS = 0x04,
50 HASH_ROT = 0x08,
51 HASH_LAYER = 0x10,
52 HASH_NET = 0x20,
53 HASH_REF = 0x40,
54 HASH_VALUE = 0x80,
55 HASH_ALL = 0xff
56};
57
64std::size_t hash_fp_item( const EDA_ITEM* aItem, int aFlags = HASH_FLAGS::HASH_ALL );
65
66#endif
A base class for most all the KiCad significant classes used in schematics and boards.
Definition eda_item.h:96
std::size_t hash_fp_item(const EDA_ITEM *aItem, int aFlags=HASH_FLAGS::HASH_ALL)
Calculate hash of an EDA_ITEM.
Definition hash_eda.cpp:54
HASH_FLAGS
Enable/disable properties that will be used for calculating the hash.
Definition hash_eda.h:42
@ HASH_POS
Definition hash_eda.h:43
@ HASH_VALUE
Definition hash_eda.h:54
@ REL_COORD
Use coordinates relative to the parent object.
Definition hash_eda.h:46
@ HASH_LAYER
Definition hash_eda.h:51
@ HASH_REF
Definition hash_eda.h:53
@ REL_POS
Use coordinates relative to the shape position.
Definition hash_eda.h:49
@ HASH_ALL
Definition hash_eda.h:55
@ HASH_ROT
Definition hash_eda.h:50
@ HASH_NET
Definition hash_eda.h:52