KiCad PCB EDA Suite
Loading...
Searching...
No Matches
bus_alias.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) 2018 CERN
5 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
6 * @author Jon Evans <[email protected]>
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License along
19 * with this program. If not, see <http://www.gnu.org/licenses/>.
20 */
21
22#ifndef _BUS_ALIAS_H
23#define _BUS_ALIAS_H
24
25#include <memory>
26#include <vector>
27#include <wx/string.h>
28
29
31{
32public:
33 BUS_ALIAS() = default;
34
36 { }
37
38 std::shared_ptr<BUS_ALIAS> Clone() const
39 {
40 return std::make_shared<BUS_ALIAS>( *this );
41 }
42
43 wxString GetName() { return m_name; }
44 void SetName( const wxString& aName ) { m_name = aName; }
45
46 const std::vector<wxString>& Members() const { return m_members; }
47 std::vector<wxString>& Members() { return m_members; }
48
49protected:
50 wxString m_name;
51 std::vector<wxString> m_members;
52};
53
54#endif
void SetName(const wxString &aName)
Definition bus_alias.h:44
std::vector< wxString > & Members()
Definition bus_alias.h:47
wxString GetName()
Definition bus_alias.h:43
std::shared_ptr< BUS_ALIAS > Clone() const
Definition bus_alias.h:38
wxString m_name
Definition bus_alias.h:50
std::vector< wxString > m_members
Definition bus_alias.h:51
BUS_ALIAS()=default
const std::vector< wxString > & Members() const
Definition bus_alias.h:46