KiCad PCB EDA Suite
annotate.cpp File Reference

Component annotation. More...

#include <algorithm>
#include <fctsys.h>
#include <sch_draw_panel.h>
#include <confirm.h>
#include <reporter.h>
#include <sch_edit_frame.h>
#include <sch_reference_list.h>
#include <class_library.h>

Go to the source code of this file.


void mapExistingAnnotation (std::map< timestamp_t, wxString > &aMap)

Detailed Description

Component annotation.

Definition in file annotate.cpp.

Function Documentation

◆ mapExistingAnnotation()

void mapExistingAnnotation ( std::map< timestamp_t, wxString > &  aMap)

Definition at line 41 of file annotate.cpp.

42 {
43  SCH_SHEET_LIST sheets( g_RootSheet );
44  SCH_REFERENCE_LIST references;
46  sheets.GetComponents( references );
48  for( size_t i = 0; i < references.GetCount(); i++ )
49  {
50  SCH_COMPONENT* comp = references[ i ].GetComp();
51  wxString ref = comp->GetField( REFERENCE )->GetFullyQualifiedText();
53  if( !ref.Contains( wxT( "?" ) ) )
54  aMap[ comp->GetTimeStamp() ] = ref;
55  }
56 }
Field Reference of part, i.e. "IC21".
Class SCH_REFERENCE_LIST is used to create a flattened list of components because in a complex hierar...
SCH_FIELD * GetField(int aFieldNdx) const
Returns a field in this symbol.
SCH_SHEET * g_RootSheet
Definition: eeschema.cpp:56
timestamp_t GetTimeStamp() const
Definition: base_struct.h:210
size_t i
Definition: json11.cpp:597
const wxString GetFullyQualifiedText() const
Function GetFullyQualifiedText returns the fully qualified field text by allowing for the part suffix...
Definition: sch_field.cpp:80
Class SCH_COMPONENT describes a real schematic component.
Definition: sch_component.h:73
unsigned GetCount()
Function GetCount.

References g_RootSheet, SCH_SHEET_LIST::GetComponents(), SCH_REFERENCE_LIST::GetCount(), SCH_COMPONENT::GetField(), SCH_FIELD::GetFullyQualifiedText(), EDA_ITEM::GetTimeStamp(), i, and REFERENCE.

Referenced by SCH_EDIT_FRAME::AnnotateComponents().