KiCad PCB EDA Suite
COMPONENT Class Reference

COMPONENT is used to store components and all of their related information found in a netlist. More...

#include <pcb_netlist.h>

Public Member Functions

 COMPONENT (const LIB_ID &aFPID, const wxString &aReference, const wxString &aValue, const KIID_PATH &aPath, const std::vector< KIID > &aKiids)
 
virtual ~COMPONENT ()
 
void AddNet (const wxString &aPinName, const wxString &aNetName, const wxString &aPinFunction, const wxString &aPinType)
 
unsigned GetNetCount () const
 
const COMPONENT_NETGetNet (unsigned aIndex) const
 
const COMPONENT_NETGetNet (const wxString &aPinName) const
 
void SortPins ()
 
void SetName (const wxString &aName)
 
const wxString & GetName () const
 
void SetLibrary (const wxString &aLibrary)
 
const wxString & GetLibrary () const
 
const wxString & GetReference () const
 
const wxString & GetValue () const
 
void SetProperties (std::map< wxString, wxString > &aProps)
 
const std::map< wxString, wxString > & GetProperties () const
 
void SetFPID (const LIB_ID &aFPID)
 
const LIB_IDGetFPID () const
 
void SetAltFPID (const LIB_ID &aFPID)
 
const LIB_IDGetAltFPID () const
 
const KIID_PATHGetPath () const
 
const std::vector< KIID > & GetKIIDs () const
 
void SetFootprintFilters (const wxArrayString &aFilters)
 
const wxArrayString & GetFootprintFilters () const
 
void SetPinCount (int aPinCount)
 
int GetPinCount () const
 
FOOTPRINTGetFootprint (bool aRelease=false)
 
void SetFootprint (FOOTPRINT *aFootprint)
 
bool IsLibSource (const wxString &aLibrary, const wxString &aName) const
 
void Format (OUTPUTFORMATTER *aOut, int aNestLevel, int aCtl)
 

Private Attributes

COMPONENT_NETS m_nets
 list of nets shared by the component pins More...
 
wxArrayString m_footprintFilters
 Footprint filters found in netlist. More...
 
int m_pinCount
 Number of pins found in netlist. More...
 
wxString m_reference
 The component reference designator found in netlist. More...
 
wxString m_value
 The component value found in netlist. More...
 
KIID_PATH m_path
 A fully specified path to the component (but not the component: [ sheetUUID, sheetUUID, .. ]. More...
 
std::vector< KIIDm_kiids
 A vector of possible KIIDs corresponding to all units in a symbol. More...
 
wxString m_name
 The name of the component in m_library used when it was placed on the schematic.. More...
 
wxString m_library
 The name of the component library where m_name was found. More...
 
LIB_ID m_fpid
 The LIB_ID of the footprint assigned to the component. More...
 
LIB_ID m_altFpid
 The alt LIB_ID of the footprint, when there are 2 different assigned footprints, One from the netlist, the other from the .cmp file. More...
 
std::unique_ptr< FOOTPRINTm_footprint
 The FOOTPRINT loaded for #m_FPID. More...
 
std::map< wxString, wxString > m_properties
 Component-specific properties found in the netlist. More...
 

Static Private Attributes

static COMPONENT_NET m_emptyNet
 

Detailed Description

COMPONENT is used to store components and all of their related information found in a netlist.

Definition at line 85 of file pcb_netlist.h.

Constructor & Destructor Documentation

◆ COMPONENT()

COMPONENT::COMPONENT ( const LIB_ID aFPID,
const wxString &  aReference,
const wxString &  aValue,
const KIID_PATH aPath,
const std::vector< KIID > &  aKiids 
)
inline

Definition at line 122 of file pcb_netlist.h.

127  {
128  m_fpid = aFPID;
129  m_reference = aReference;
130  m_value = aValue;
131  m_pinCount = 0;
132  m_path = aPath;
133  m_kiids = aKiids;
134  }
KIID_PATH m_path
A fully specified path to the component (but not the component: [ sheetUUID, sheetUUID,...
Definition: pcb_netlist.h:94
std::vector< KIID > m_kiids
A vector of possible KIIDs corresponding to all units in a symbol.
Definition: pcb_netlist.h:97
LIB_ID m_fpid
The LIB_ID of the footprint assigned to the component.
Definition: pcb_netlist.h:106
wxString m_value
The component value found in netlist.
Definition: pcb_netlist.h:91
wxString m_reference
The component reference designator found in netlist.
Definition: pcb_netlist.h:90
int m_pinCount
Number of pins found in netlist.
Definition: pcb_netlist.h:89

References m_fpid, m_kiids, m_path, m_pinCount, m_reference, and m_value.

◆ ~COMPONENT()

virtual COMPONENT::~COMPONENT ( )
inlinevirtual

Definition at line 136 of file pcb_netlist.h.

136 { };

Member Function Documentation

◆ AddNet()

void COMPONENT::AddNet ( const wxString &  aPinName,
const wxString &  aNetName,
const wxString &  aPinFunction,
const wxString &  aPinType 
)
inline

Definition at line 138 of file pcb_netlist.h.

140  {
141  m_nets.push_back( COMPONENT_NET( aPinName, aNetName, aPinFunction, aPinType ) );
142  }
COMPONENT_NETS m_nets
list of nets shared by the component pins
Definition: pcb_netlist.h:87
COMPONENT_NET is used to store the component pin name to net name (and pin function) associations sto...
Definition: pcb_netlist.h:44

References m_nets.

Referenced by PCB_EDIT_FRAME::KiwayMailIn(), LEGACY_NETLIST_READER::loadNet(), and KICAD_NETLIST_PARSER::parseNet().

◆ Format()

void COMPONENT::Format ( OUTPUTFORMATTER aOut,
int  aNestLevel,
int  aCtl 
)

Definition at line 73 of file pcb_netlist.cpp.

74 {
75  int nl = aNestLevel;
76 
77  aOut->Print( nl, "(ref %s ", aOut->Quotew( m_reference ).c_str() );
78  aOut->Print( 0, "(fpid %s)\n", aOut->Quotew( m_fpid.Format() ).c_str() );
79 
80  if( ! ( aCtl & CTL_OMIT_EXTRA ) )
81  {
82  aOut->Print( nl+1, "(value %s)\n", aOut->Quotew( m_value ).c_str() );
83  aOut->Print( nl+1, "(name %s)\n", aOut->Quotew( m_name ).c_str() );
84  aOut->Print( nl+1, "(library %s)\n", aOut->Quotew( m_library ).c_str() );
85 
86  wxString path;
87 
88  for( const KIID& pathStep : m_path )
89  path += '/' + pathStep.AsString();
90 
91  if( !m_kiids.empty() )
92  path += '/' + m_kiids.front().AsString();
93 
94  aOut->Print( nl+1, "(timestamp %s)\n", aOut->Quotew( path ).c_str() );
95  }
96 
97  if( !( aCtl & CTL_OMIT_FILTERS ) && m_footprintFilters.GetCount() )
98  {
99  aOut->Print( nl+1, "(fp_filters" );
100 
101  for( unsigned i = 0; i < m_footprintFilters.GetCount(); ++i )
102  aOut->Print( 0, " %s", aOut->Quotew( m_footprintFilters[i] ).c_str() );
103 
104  aOut->Print( 0, ")\n" );
105  }
106 
107  if( !( aCtl & CTL_OMIT_NETS ) && m_nets.size() )
108  {
109  int llen = aOut->Print( nl+1, "(nets " );
110 
111  for( unsigned i = 0; i < m_nets.size(); ++i )
112  {
113  if( llen > 80 )
114  {
115  aOut->Print( 0, "\n" );
116  llen = aOut->Print( nl+1, " " );
117  }
118 
119  llen += m_nets[i].Format( aOut, 0, aCtl );
120  }
121 
122  aOut->Print( 0, ")\n" );
123  }
124 
125  aOut->Print( nl, ")\n" ); // </ref>
126 }
KIID_PATH m_path
A fully specified path to the component (but not the component: [ sheetUUID, sheetUUID,...
Definition: pcb_netlist.h:94
wxString m_name
The name of the component in m_library used when it was placed on the schematic..
Definition: pcb_netlist.h:100
wxString m_library
The name of the component library where m_name was found.
Definition: pcb_netlist.h:103
#define CTL_OMIT_NETS
Definition: pcb_netlist.h:295
wxArrayString m_footprintFilters
Footprint filters found in netlist.
Definition: pcb_netlist.h:88
std::vector< KIID > m_kiids
A vector of possible KIIDs corresponding to all units in a symbol.
Definition: pcb_netlist.h:97
COMPONENT_NETS m_nets
list of nets shared by the component pins
Definition: pcb_netlist.h:87
Definition: kiid.h:44
#define CTL_OMIT_FILTERS
Definition: pcb_netlist.h:296
UTF8 Format() const
Definition: lib_id.cpp:233
LIB_ID m_fpid
The LIB_ID of the footprint assigned to the component.
Definition: pcb_netlist.h:106
wxString m_value
The component value found in netlist.
Definition: pcb_netlist.h:91
wxString m_reference
The component reference designator found in netlist.
Definition: pcb_netlist.h:90
int PRINTF_FUNC Print(int nestLevel, const char *fmt,...)
Format and write text to the output stream.
Definition: richio.cpp:408
std::string Quotew(const wxString &aWrapee) const
Definition: richio.cpp:476
#define CTL_OMIT_EXTRA
Definition: pcb_netlist.h:294

References CTL_OMIT_EXTRA, CTL_OMIT_FILTERS, CTL_OMIT_NETS, LIB_ID::Format(), m_footprintFilters, m_fpid, m_kiids, m_library, m_name, m_nets, m_path, m_reference, m_value, OUTPUTFORMATTER::Print(), and OUTPUTFORMATTER::Quotew().

◆ GetAltFPID()

const LIB_ID& COMPONENT::GetAltFPID ( ) const
inline

Definition at line 171 of file pcb_netlist.h.

171 { return m_altFpid; }
LIB_ID m_altFpid
The alt LIB_ID of the footprint, when there are 2 different assigned footprints, One from the netlist...
Definition: pcb_netlist.h:111

References m_altFpid.

Referenced by CVPCB_MAINFRAME::ReadNetListAndFpFiles().

◆ GetFootprint()

FOOTPRINT* COMPONENT::GetFootprint ( bool  aRelease = false)
inline

Definition at line 183 of file pcb_netlist.h.

184  {
185  return ( aRelease ) ? m_footprint.release() : m_footprint.get();
186  }
std::unique_ptr< FOOTPRINT > m_footprint
The FOOTPRINT loaded for #m_FPID.
Definition: pcb_netlist.h:114

References m_footprint.

◆ GetFootprintFilters()

const wxArrayString& COMPONENT::GetFootprintFilters ( ) const
inline

Definition at line 178 of file pcb_netlist.h.

178 { return m_footprintFilters; }
wxArrayString m_footprintFilters
Footprint filters found in netlist.
Definition: pcb_netlist.h:88

References m_footprintFilters.

Referenced by CVPCB_MAINFRAME::AutomaticFootprintMatching(), CVPCB_MAINFRAME::DisplayStatus(), and FOOTPRINTS_LISTBOX::SetFootprints().

◆ GetFPID()

◆ GetKIIDs()

const std::vector<KIID>& COMPONENT::GetKIIDs ( ) const
inline

Definition at line 175 of file pcb_netlist.h.

175 { return m_kiids; }
std::vector< KIID > m_kiids
A vector of possible KIIDs corresponding to all units in a symbol.
Definition: pcb_netlist.h:97

References m_kiids.

Referenced by CVPCB_MAINFRAME::AssociateFootprint(), TEST_NETLISTS_FIXTURE::compareNetlists(), PCB_EDIT_FRAME::LoadFootprints(), BOARD_NETLIST_UPDATER::updateFootprintParameters(), and BOARD_NETLIST_UPDATER::UpdateNetlist().

◆ GetLibrary()

const wxString& COMPONENT::GetLibrary ( ) const
inline

Definition at line 156 of file pcb_netlist.h.

156 { return m_library; }
wxString m_library
The name of the component library where m_name was found.
Definition: pcb_netlist.h:103

References m_library.

◆ GetName()

const wxString& COMPONENT::GetName ( void  ) const
inline

Definition at line 153 of file pcb_netlist.h.

153 { return m_name; }
wxString m_name
The name of the component in m_library used when it was placed on the schematic..
Definition: pcb_netlist.h:100

References m_name.

◆ GetNet() [1/2]

const COMPONENT_NET& COMPONENT::GetNet ( unsigned  aIndex) const
inline

◆ GetNet() [2/2]

const COMPONENT_NET & COMPONENT::GetNet ( const wxString &  aPinName) const

Definition at line 61 of file pcb_netlist.cpp.

62 {
63  for( const COMPONENT_NET& net : m_nets )
64  {
65  if( net.GetPinName() == aPinName )
66  return net;
67  }
68 
69  return m_emptyNet;
70 }
static COMPONENT_NET m_emptyNet
Definition: pcb_netlist.h:119
COMPONENT_NETS m_nets
list of nets shared by the component pins
Definition: pcb_netlist.h:87
COMPONENT_NET is used to store the component pin name to net name (and pin function) associations sto...
Definition: pcb_netlist.h:44

References m_emptyNet, and m_nets.

◆ GetNetCount()

unsigned COMPONENT::GetNetCount ( ) const
inline

Definition at line 144 of file pcb_netlist.h.

144 { return m_nets.size(); }
COMPONENT_NETS m_nets
list of nets shared by the component pins
Definition: pcb_netlist.h:87

References m_nets.

Referenced by TEST_NETLISTS_FIXTURE::compareNetlists(), BOARD_NETLIST_UPDATER::testConnectivity(), DRC_TEST_PROVIDER_LVS::testFootprints(), and BOARD_NETLIST_UPDATER::updateCopperZoneNets().

◆ GetPath()

const KIID_PATH& COMPONENT::GetPath ( ) const
inline

Definition at line 173 of file pcb_netlist.h.

173 { return m_path; }
KIID_PATH m_path
A fully specified path to the component (but not the component: [ sheetUUID, sheetUUID,...
Definition: pcb_netlist.h:94

References m_path.

Referenced by TEST_NETLISTS_FIXTURE::compareNetlists(), PCB_EDIT_FRAME::LoadFootprints(), BOARD_NETLIST_UPDATER::updateFootprintParameters(), and BOARD_NETLIST_UPDATER::UpdateNetlist().

◆ GetPinCount()

int COMPONENT::GetPinCount ( ) const
inline

Definition at line 181 of file pcb_netlist.h.

181 { return m_pinCount; }
int m_pinCount
Number of pins found in netlist.
Definition: pcb_netlist.h:89

References m_pinCount.

Referenced by CVPCB_MAINFRAME::DisplayStatus(), and FOOTPRINTS_LISTBOX::SetFootprints().

◆ GetProperties()

const std::map<wxString, wxString>& COMPONENT::GetProperties ( ) const
inline

Definition at line 165 of file pcb_netlist.h.

165 { return m_properties; }
std::map< wxString, wxString > m_properties
Component-specific properties found in the netlist.
Definition: pcb_netlist.h:117

References m_properties.

Referenced by BOARD_NETLIST_UPDATER::updateFootprintParameters(), and BOARD_NETLIST_UPDATER::UpdateNetlist().

◆ GetReference()

◆ GetValue()

const wxString& COMPONENT::GetValue ( ) const
inline

◆ IsLibSource()

bool COMPONENT::IsLibSource ( const wxString &  aLibrary,
const wxString &  aName 
) const
inline

Definition at line 190 of file pcb_netlist.h.

191  {
192  return aLibrary == m_library && aName == m_name;
193  }
wxString m_name
The name of the component in m_library used when it was placed on the schematic..
Definition: pcb_netlist.h:100
wxString m_library
The name of the component library where m_name was found.
Definition: pcb_netlist.h:103

References m_library, and m_name.

Referenced by KICAD_NETLIST_PARSER::parseLibPartList().

◆ SetAltFPID()

void COMPONENT::SetAltFPID ( const LIB_ID aFPID)
inline

Definition at line 170 of file pcb_netlist.h.

170 { m_altFpid = aFPID; }
LIB_ID m_altFpid
The alt LIB_ID of the footprint, when there are 2 different assigned footprints, One from the netlist...
Definition: pcb_netlist.h:111

References m_altFpid.

Referenced by CMP_READER::Load().

◆ SetFootprint()

void COMPONENT::SetFootprint ( FOOTPRINT aFootprint)

Definition at line 40 of file pcb_netlist.cpp.

41 {
42  m_footprint.reset( aFootprint );
43  KIID_PATH path = m_path;
44 
45  path.push_back( m_kiids.front() );
46 
47  if( aFootprint == NULL )
48  return;
49 
50  aFootprint->SetReference( m_reference );
51  aFootprint->SetValue( m_value );
52  aFootprint->SetFPID( m_fpid );
53  aFootprint->SetPath( path );
54  aFootprint->SetProperties( m_properties );
55 }
void SetReference(const wxString &aReference)
Definition: footprint.h:432
KIID_PATH m_path
A fully specified path to the component (but not the component: [ sheetUUID, sheetUUID,...
Definition: pcb_netlist.h:94
std::unique_ptr< FOOTPRINT > m_footprint
The FOOTPRINT loaded for #m_FPID.
Definition: pcb_netlist.h:114
void SetPath(const KIID_PATH &aPath)
Definition: footprint.h:200
std::vector< KIID > m_kiids
A vector of possible KIIDs corresponding to all units in a symbol.
Definition: pcb_netlist.h:97
#define NULL
void SetValue(const wxString &aValue)
Definition: footprint.h:453
std::map< wxString, wxString > m_properties
Component-specific properties found in the netlist.
Definition: pcb_netlist.h:117
void SetFPID(const LIB_ID &aFPID)
Definition: footprint.h:191
LIB_ID m_fpid
The LIB_ID of the footprint assigned to the component.
Definition: pcb_netlist.h:106
wxString m_value
The component value found in netlist.
Definition: pcb_netlist.h:91
wxString m_reference
The component reference designator found in netlist.
Definition: pcb_netlist.h:90
void SetProperties(const std::map< wxString, wxString > &aProps)
Definition: footprint.h:467

References m_footprint, m_fpid, m_kiids, m_path, m_properties, m_reference, m_value, NULL, FOOTPRINT::SetFPID(), FOOTPRINT::SetPath(), FOOTPRINT::SetProperties(), FOOTPRINT::SetReference(), and FOOTPRINT::SetValue().

Referenced by PCB_EDIT_FRAME::LoadFootprints().

◆ SetFootprintFilters()

void COMPONENT::SetFootprintFilters ( const wxArrayString &  aFilters)
inline

Definition at line 177 of file pcb_netlist.h.

177 { m_footprintFilters = aFilters; }
wxArrayString m_footprintFilters
Footprint filters found in netlist.
Definition: pcb_netlist.h:88

References m_footprintFilters.

Referenced by LEGACY_NETLIST_READER::loadFootprintFilters(), and KICAD_NETLIST_PARSER::parseLibPartList().

◆ SetFPID()

void COMPONENT::SetFPID ( const LIB_ID aFPID)
inline

Definition at line 167 of file pcb_netlist.h.

167 { m_fpid = aFPID; }
LIB_ID m_fpid
The LIB_ID of the footprint assigned to the component.
Definition: pcb_netlist.h:106

References m_fpid.

Referenced by CVPCB_MAINFRAME::AssociateFootprint(), CMP_READER::Load(), CVPCB_MAINFRAME::ReadNetListAndFpFiles(), and CVPCB_MAINFRAME::ReadSchematicNetlist().

◆ SetLibrary()

void COMPONENT::SetLibrary ( const wxString &  aLibrary)
inline

Definition at line 155 of file pcb_netlist.h.

155 { m_library = aLibrary; }
wxString m_library
The name of the component library where m_name was found.
Definition: pcb_netlist.h:103

References m_library.

Referenced by KICAD_NETLIST_PARSER::parseComponent().

◆ SetName()

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

Definition at line 152 of file pcb_netlist.h.

152 { m_name = aName;}
wxString m_name
The name of the component in m_library used when it was placed on the schematic..
Definition: pcb_netlist.h:100

References m_name.

Referenced by LEGACY_NETLIST_READER::loadComponent(), and KICAD_NETLIST_PARSER::parseComponent().

◆ SetPinCount()

void COMPONENT::SetPinCount ( int  aPinCount)
inline

Definition at line 180 of file pcb_netlist.h.

180 { m_pinCount = aPinCount; }
int m_pinCount
Number of pins found in netlist.
Definition: pcb_netlist.h:89

References m_pinCount.

Referenced by KICAD_NETLIST_PARSER::parseLibPartList().

◆ SetProperties()

void COMPONENT::SetProperties ( std::map< wxString, wxString > &  aProps)
inline

Definition at line 161 of file pcb_netlist.h.

162  {
163  m_properties = std::move( aProps );
164  }
std::map< wxString, wxString > m_properties
Component-specific properties found in the netlist.
Definition: pcb_netlist.h:117

References m_properties.

Referenced by KICAD_NETLIST_PARSER::parseComponent().

◆ SortPins()

void COMPONENT::SortPins ( )
inline

Definition at line 150 of file pcb_netlist.h.

150 { sort( m_nets.begin(), m_nets.end() ); }
COMPONENT_NETS m_nets
list of nets shared by the component pins
Definition: pcb_netlist.h:87

References m_nets.

Member Data Documentation

◆ m_altFpid

LIB_ID COMPONENT::m_altFpid
private

The alt LIB_ID of the footprint, when there are 2 different assigned footprints, One from the netlist, the other from the .cmp file.

this one is a copy of the netlist footprint assignment

Definition at line 111 of file pcb_netlist.h.

Referenced by GetAltFPID(), and SetAltFPID().

◆ m_emptyNet

COMPONENT_NET COMPONENT::m_emptyNet
staticprivate

Definition at line 119 of file pcb_netlist.h.

Referenced by GetNet().

◆ m_footprint

std::unique_ptr< FOOTPRINT > COMPONENT::m_footprint
private

The FOOTPRINT loaded for #m_FPID.

Definition at line 114 of file pcb_netlist.h.

Referenced by GetFootprint(), and SetFootprint().

◆ m_footprintFilters

wxArrayString COMPONENT::m_footprintFilters
private

Footprint filters found in netlist.

Definition at line 88 of file pcb_netlist.h.

Referenced by Format(), GetFootprintFilters(), and SetFootprintFilters().

◆ m_fpid

LIB_ID COMPONENT::m_fpid
private

The LIB_ID of the footprint assigned to the component.

Definition at line 106 of file pcb_netlist.h.

Referenced by COMPONENT(), Format(), GetFPID(), SetFootprint(), and SetFPID().

◆ m_kiids

std::vector<KIID> COMPONENT::m_kiids
private

A vector of possible KIIDs corresponding to all units in a symbol.

Definition at line 97 of file pcb_netlist.h.

Referenced by COMPONENT(), Format(), GetKIIDs(), and SetFootprint().

◆ m_library

wxString COMPONENT::m_library
private

The name of the component library where m_name was found.

Definition at line 103 of file pcb_netlist.h.

Referenced by Format(), GetLibrary(), IsLibSource(), and SetLibrary().

◆ m_name

wxString COMPONENT::m_name
private

The name of the component in m_library used when it was placed on the schematic..

Definition at line 100 of file pcb_netlist.h.

Referenced by Format(), GetName(), IsLibSource(), and SetName().

◆ m_nets

COMPONENT_NETS COMPONENT::m_nets
private

list of nets shared by the component pins

Definition at line 87 of file pcb_netlist.h.

Referenced by AddNet(), Format(), GetNet(), GetNetCount(), and SortPins().

◆ m_path

KIID_PATH COMPONENT::m_path
private

A fully specified path to the component (but not the component: [ sheetUUID, sheetUUID, .. ].

Definition at line 94 of file pcb_netlist.h.

Referenced by COMPONENT(), Format(), GetPath(), and SetFootprint().

◆ m_pinCount

int COMPONENT::m_pinCount
private

Number of pins found in netlist.

Definition at line 89 of file pcb_netlist.h.

Referenced by COMPONENT(), GetPinCount(), and SetPinCount().

◆ m_properties

std::map<wxString, wxString> COMPONENT::m_properties
private

Component-specific properties found in the netlist.

Definition at line 117 of file pcb_netlist.h.

Referenced by GetProperties(), SetFootprint(), and SetProperties().

◆ m_reference

wxString COMPONENT::m_reference
private

The component reference designator found in netlist.

Definition at line 90 of file pcb_netlist.h.

Referenced by COMPONENT(), Format(), GetReference(), and SetFootprint().

◆ m_value

wxString COMPONENT::m_value
private

The component value found in netlist.

Definition at line 91 of file pcb_netlist.h.

Referenced by COMPONENT(), Format(), GetValue(), and SetFootprint().


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