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 (C) 2020-2021 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, you may find one here:
21 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
22 * or you may search the http://www.gnu.org website for the version 2 license,
23 * or you may write to the Free Software Foundation, Inc.,
24 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
25 */
26
27#ifndef HASH_EDA_H_
28#define HASH_EDA_H_
29
34#include <cstdlib>
35#include <functional>
36
37class EDA_ITEM;
38
42{
43 HASH_POS = 0x01,
44
46 REL_COORD = 0x02,
48 REL_POS = 0x04,
49 HASH_ROT = 0x08,
50 HASH_LAYER = 0x10,
51 HASH_NET = 0x20,
52 HASH_REF = 0x40,
53 HASH_VALUE = 0x80,
54 HASH_ALL = 0xff
55};
56
63std::size_t hash_fp_item( const EDA_ITEM* aItem, int aFlags = HASH_FLAGS::HASH_ALL );
64
65#endif
A base class for most all the KiCad significant classes used in schematics and boards.
Definition: eda_item.h:89
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:55
HASH_FLAGS
Enables/disables properties that will be used for calculating the hash.
Definition: hash_eda.h:42
@ HASH_POS
use coordinates relative to the parent object
Definition: hash_eda.h:43
@ HASH_VALUE
Definition: hash_eda.h:53
@ REL_COORD
use coordinates relative to the shape position
Definition: hash_eda.h:46
@ HASH_LAYER
Definition: hash_eda.h:50
@ HASH_REF
Definition: hash_eda.h:52
@ REL_POS
Definition: hash_eda.h:48
@ HASH_ALL
Definition: hash_eda.h:54
@ HASH_ROT
Definition: hash_eda.h:49
@ HASH_NET
Definition: hash_eda.h:51