KiCad PCB EDA Suite
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  * @author Maciej Suminski <maciej.suminski@cern.ch>
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, you may find one here:
19  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20  * or you may search the http://www.gnu.org website for the version 2 license,
21  * or you may write to the Free Software Foundation, Inc.,
22  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23  */
24 
29 #include <cstdlib>
30 
31 class EDA_ITEM;
32 
36 {
37  POSITION = 0x01,
38 
40  REL_COORD = 0x02,
41  ROTATION = 0x04,
42  LAYER = 0x08,
43  NET = 0x10,
44  REFERENCE = 0x20,
45  VALUE = 0x40,
46  ALL = 0xff
47 };
48 
49 /*
50  * Calculates hash of an EDA_ITEM.
51  * @param aItem is the item for which the hash will be computed.
52  * @return Hash value.
53  */
54 std::size_t hash_eda( const EDA_ITEM* aItem, int aFlags = HASH_FLAGS::ALL );
std::size_t hash_eda(const EDA_ITEM *aItem, int aFlags=HASH_FLAGS::ALL)
Definition: hash_eda.cpp:48
use coordinates relative to the parent object
Definition: hash_eda.h:40
Definition: hash_eda.h:45
Definition: hash_eda.h:46
Definition: hash_eda.h:43
HASH_FLAGS
Enables/disables properties that will be used for calculating the hash.
Definition: hash_eda.h:35
Class LAYER holds information pertinent to a layer of a BOARD.
Definition: class_board.h:86
Class EDA_ITEM is a base class for most all the KiCad significant classes, used in schematics and boa...
Definition: base_struct.h:154