KiCad PCB EDA Suite
sch_symbol.h File Reference
#include <eda_item.h>
#include <core/typeinfo.h>
#include <layers_id_colors_and_visibility.h>
#include <lib_id.h>
#include <widgets/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 <sch_field.h>
#include <sch_item.h>
#include <sch_pin.h>
#include <sch_sheet_path.h>
#include <symbol_lib_table.h>
#include <transform.h>

Go to the source code of this file.

Classes

class  SCH_COMPONENT
 Schematic symbol object. More...
 

Typedefs

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 69 of file sch_symbol.h.

◆ SCH_FIELDS

typedef std::vector<SCH_FIELD> SCH_FIELDS

A container for several SCH_FIELD items.

Definition at line 63 of file sch_symbol.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 43 of file sch_symbol.cpp.

44 {
45  std::string ret = TO_UTF8( txt );
46 
47  for( std::string::iterator it = ret.begin(); it!=ret.end(); ++it )
48  {
49  if( (unsigned char) *it <= ' ' )
50  *it = '~';
51  }
52  return ret;
53 }
#define TO_UTF8(wxstring)
Convert a wxString to a UTF8 encoded C string for all wxWidgets build modes.
Definition: macros.h:96

References TO_UTF8.

Referenced by SCH_LEGACY_PLUGIN::saveComponent(), and SCH_SEXPR_PLUGIN::saveSymbol().