KiCad PCB EDA Suite
BUS_ALIAS Class Reference

#include <bus_alias.h>

Public Member Functions

 BUS_ALIAS (SCH_SCREEN *aParent=NULL)
 
 ~BUS_ALIAS ()
 
std::shared_ptr< BUS_ALIASClone () const
 
wxString GetName ()
 
void SetName (const wxString &aName)
 
void ClearMembers ()
 
void AddMember (const wxString &aName)
 
int GetMemberCount ()
 
std::vector< wxString > & Members ()
 
bool Contains (const wxString &aName)
 
SCH_SCREENGetParent ()
 
void SetParent (SCH_SCREEN *aParent)
 

Protected Attributes

wxString m_name
 
std::vector< wxString > m_members
 
SCH_SCREENm_parent
 The bus alias editor dialog can edit aliases from all open sheets. More...
 

Detailed Description

Definition at line 32 of file bus_alias.h.

Constructor & Destructor Documentation

◆ BUS_ALIAS()

BUS_ALIAS::BUS_ALIAS ( SCH_SCREEN aParent = NULL)

Definition at line 26 of file bus_alias.cpp.

26  :
27  m_parent( aParent )
28 {
29 }
SCH_SCREEN * m_parent
The bus alias editor dialog can edit aliases from all open sheets.
Definition: bus_alias.h:97

◆ ~BUS_ALIAS()

BUS_ALIAS::~BUS_ALIAS ( )

Definition at line 32 of file bus_alias.cpp.

33 {
34 }

Member Function Documentation

◆ AddMember()

void BUS_ALIAS::AddMember ( const wxString &  aName)
inline

Definition at line 59 of file bus_alias.h.

60  {
61  m_members.push_back( aName );
62  }
std::vector< wxString > m_members
Definition: bus_alias.h:90

References m_members.

◆ ClearMembers()

void BUS_ALIAS::ClearMembers ( )
inline

Definition at line 54 of file bus_alias.h.

55  {
56  m_members.clear();
57  }
std::vector< wxString > m_members
Definition: bus_alias.h:90

References m_members.

◆ Clone()

std::shared_ptr< BUS_ALIAS > BUS_ALIAS::Clone ( ) const
inline

Definition at line 39 of file bus_alias.h.

40  {
41  return std::make_shared< BUS_ALIAS >( *this );
42  }

◆ Contains()

bool BUS_ALIAS::Contains ( const wxString &  aName)

Definition at line 37 of file bus_alias.cpp.

38 {
39  return ( std::find( m_members.begin(), m_members.end(), aName )
40  != m_members.end() );
41 }
std::vector< wxString > m_members
Definition: bus_alias.h:90

References m_members.

◆ GetMemberCount()

int BUS_ALIAS::GetMemberCount ( )
inline

Definition at line 64 of file bus_alias.h.

65  {
66  return m_members.size();
67  }
std::vector< wxString > m_members
Definition: bus_alias.h:90

References m_members.

◆ GetName()

wxString BUS_ALIAS::GetName ( )
inline

Definition at line 44 of file bus_alias.h.

45  {
46  return m_name;
47  }
wxString m_name
Definition: bus_alias.h:88

References m_name.

◆ GetParent()

SCH_SCREEN* BUS_ALIAS::GetParent ( )
inline

Definition at line 76 of file bus_alias.h.

77  {
78  return m_parent;
79  }
SCH_SCREEN * m_parent
The bus alias editor dialog can edit aliases from all open sheets.
Definition: bus_alias.h:97

References m_parent.

◆ Members()

std::vector< wxString >& BUS_ALIAS::Members ( )
inline

Definition at line 69 of file bus_alias.h.

70  {
71  return m_members;
72  }
std::vector< wxString > m_members
Definition: bus_alias.h:90

References m_members.

◆ SetName()

void BUS_ALIAS::SetName ( const wxString &  aName)
inline

Definition at line 49 of file bus_alias.h.

50  {
51  m_name = aName;
52  }
wxString m_name
Definition: bus_alias.h:88

References m_name.

◆ SetParent()

void BUS_ALIAS::SetParent ( SCH_SCREEN aParent)
inline

Definition at line 81 of file bus_alias.h.

82  {
83  m_parent = aParent;
84  }
SCH_SCREEN * m_parent
The bus alias editor dialog can edit aliases from all open sheets.
Definition: bus_alias.h:97

References m_parent.

Member Data Documentation

◆ m_members

std::vector< wxString > BUS_ALIAS::m_members
protected

Definition at line 90 of file bus_alias.h.

Referenced by AddMember(), ClearMembers(), Contains(), GetMemberCount(), and Members().

◆ m_name

wxString BUS_ALIAS::m_name
protected

Definition at line 88 of file bus_alias.h.

Referenced by GetName(), and SetName().

◆ m_parent

SCH_SCREEN* BUS_ALIAS::m_parent
protected

The bus alias editor dialog can edit aliases from all open sheets.

This means we have to store a reference back to our parent so that the dialog can update the parent if aliases are changed or removed.

Definition at line 97 of file bus_alias.h.

Referenced by GetParent(), and SetParent().


The documentation for this class was generated from the following files: