KiCad PCB EDA Suite
sch_component.h File Reference
#include <base_struct.h>
#include <common.h>
#include <core/typeinfo.h>
#include <layers_id_colors_and_visibility.h>
#include <lib_id.h>
#include <msgpanel.h>
#include <memory>
#include <string>
#include <unordered_map>
#include <vector>
#include <wx/arrstr.h>
#include <wx/chartype.h>
#include <wx/fdrepdlg.h>
#include <wx/gdicmn.h>
#include <wx/string.h>
#include <bitmaps.h>
#include <class_libentry.h>
#include <lib_pin.h>
#include <sch_field.h>
#include <sch_item.h>
#include <sch_pin.h>
#include <sch_screen.h>
#include <symbol_lib_table.h>
#include <transform.h>

Go to the source code of this file.

Classes

class  SCH_COMPONENT
 SCH_COMPONENT describes a real schematic component. More...
 

Typedefs

typedef std::vector< SCH_PINSCH_PINS
 A container for several SCH_PIN items. More...
 
typedef std::unordered_map< LIB_PIN *, unsigned > SCH_PIN_MAP
 A map from the library pin pointer to the SCH_PIN's index. More...
 
typedef std::vector< SCH_FIELDSCH_FIELDS
 A container for several SCH_FIELD items. More...
 
typedef std::weak_ptr< LIB_PARTPART_REF
 

Functions

std::string toUTFTildaText (const wxString &txt)
 Convert a wxString to UTF8 and replace any control characters with a ~, where a control character is one of the first ASCII values up to ' ' 32d. More...
 

Typedef Documentation

◆ PART_REF

typedef std::weak_ptr<LIB_PART> PART_REF

Definition at line 79 of file sch_component.h.

◆ SCH_FIELDS

typedef std::vector<SCH_FIELD> SCH_FIELDS

A container for several SCH_FIELD items.

Definition at line 77 of file sch_component.h.

◆ SCH_PIN_MAP

typedef std::unordered_map<LIB_PIN*, unsigned> SCH_PIN_MAP

A map from the library pin pointer to the SCH_PIN's index.

Definition at line 74 of file sch_component.h.

◆ SCH_PINS

typedef std::vector<SCH_PIN> SCH_PINS

A container for several SCH_PIN items.

Definition at line 67 of file sch_component.h.

Function Documentation

◆ toUTFTildaText()

std::string toUTFTildaText ( const wxString &  txt)

Convert a wxString to UTF8 and replace any control characters with a ~, where a control character is one of the first ASCII values up to ' ' 32d.

Definition at line 64 of file sch_component.cpp.

65 {
66  std::string ret = TO_UTF8( txt );
67 
68  for( std::string::iterator it = ret.begin(); it!=ret.end(); ++it )
69  {
70  if( (unsigned char) *it <= ' ' )
71  *it = '~';
72  }
73  return ret;
74 }
#define TO_UTF8(wxstring)
Macro TO_UTF8 converts a wxString to a UTF8 encoded C string for all wxWidgets build modes.
Definition: macros.h:48

References TO_UTF8.

Referenced by SCH_LEGACY_PLUGIN::saveComponent().