LibrePCB Developers Documentation
bi_airwire.h
Go to the documentation of this file.
1/*
2 * LibrePCB - Professional EDA for everyone!
3 * Copyright (C) 2013 LibrePCB Developers, see AUTHORS.md for contributors.
4 * https://librepcb.org/
5 *
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#ifndef LIBREPCB_CORE_BI_AIRWIRE_H
21#define LIBREPCB_CORE_BI_AIRWIRE_H
22
23/*******************************************************************************
24 * Includes
25 ******************************************************************************/
26#include "bi_base.h"
27
28#include <QtCore>
29
30/*******************************************************************************
31 * Namespace / Forward Declarations
32 ******************************************************************************/
33namespace librepcb {
34
35class BI_NetLineAnchor;
36class NetSignal;
37
38/*******************************************************************************
39 * Class BI_AirWire
40 ******************************************************************************/
41
45class BI_AirWire final : public BI_Base {
46 Q_OBJECT
47
48public:
49 // Constructors / Destructor
50 BI_AirWire() = delete;
51 BI_AirWire(const BI_AirWire& other) = delete;
52 BI_AirWire(Board& board, const NetSignal& netsignal,
53 const BI_NetLineAnchor& p1, const BI_NetLineAnchor& p2);
54 ~BI_AirWire() noexcept;
55
56 // Getters
57 const NetSignal& getNetSignal() const noexcept { return mNetSignal; }
58 const BI_NetLineAnchor& getP1() const noexcept { return mP1; }
59 const BI_NetLineAnchor& getP2() const noexcept { return mP2; }
60 bool isVertical() const noexcept;
61
62 // General Methods
63 void addToBoard() override;
64 void removeFromBoard() override;
65
66 // Operator Overloadings
67 BI_AirWire& operator=(const BI_AirWire& rhs) = delete;
68
69private:
73};
74
75/*******************************************************************************
76 * End of File
77 ******************************************************************************/
78
79} // namespace librepcb
80
81#endif
The BI_AirWire class.
Definition: bi_airwire.h:45
BI_AirWire(const BI_AirWire &other)=delete
void removeFromBoard() override
Definition: bi_airwire.cpp:65
~BI_AirWire() noexcept
Definition: bi_airwire.cpp:43
bool isVertical() const noexcept
Definition: bi_airwire.cpp:50
const BI_NetLineAnchor & mP2
Definition: bi_airwire.h:72
const BI_NetLineAnchor & mP1
Definition: bi_airwire.h:71
const BI_NetLineAnchor & getP1() const noexcept
Definition: bi_airwire.h:58
const NetSignal & getNetSignal() const noexcept
Definition: bi_airwire.h:57
const NetSignal & mNetSignal
Definition: bi_airwire.h:70
void addToBoard() override
Definition: bi_airwire.cpp:58
const BI_NetLineAnchor & getP2() const noexcept
Definition: bi_airwire.h:59
The Board Item Base (BI_Base) class.
Definition: bi_base.h:45
Definition: bi_netline.h:46
The Board class represents a PCB of a project and is always part of a circuit.
Definition: board.h:73
The NetSignal class.
Definition: netsignal.h:50
Definition: occmodel.cpp:77