KiCad PCB EDA Suite
ASCH_LABEL Struct Reference

#include <altium_parser_sch.h>

Public Member Functions

 ASCH_LABEL (const std::map< wxString, wxString > &aProperties)
 

Public Attributes

int ownerindex
 
int ownerpartid
 
wxPoint location
 
wxString text
 
int fontId
 
bool isMirrored
 
ASCH_LABEL_JUSTIFICATION justification
 

Detailed Description

Definition at line 238 of file altium_parser_sch.h.

Constructor & Destructor Documentation

◆ ASCH_LABEL()

ASCH_LABEL::ASCH_LABEL ( const std::map< wxString, wxString > &  aProperties)
explicit

Definition at line 199 of file altium_parser_sch.cpp.

200 {
201  wxASSERT( PropertiesReadRecord( aProperties ) == ALTIUM_SCH_RECORD::LABEL );
202 
203  ownerindex =
204  ALTIUM_PARSER::PropertiesReadInt( aProperties, "OWNERINDEX", ALTIUM_COMPONENT_NONE );
205  ownerpartid =
206  ALTIUM_PARSER::PropertiesReadInt( aProperties, "OWNERPARTID", ALTIUM_COMPONENT_NONE );
207 
208  location = wxPoint( PropertiesReadKiCadUnitFrac( aProperties, "LOCATION.X" ),
209  -PropertiesReadKiCadUnitFrac( aProperties, "LOCATION.Y" ) );
210 
211  text = ALTIUM_PARSER::PropertiesReadString( aProperties, "TEXT", "" );
212 
213  fontId = ALTIUM_PARSER::PropertiesReadInt( aProperties, "FONTID", 0 );
214  isMirrored = ALTIUM_PARSER::PropertiesReadBool( aProperties, "ISMIRRORED", false );
215 
216  justification = PropertiesReadEnum<ASCH_LABEL_JUSTIFICATION>(
217  aProperties, "JUSTIFICATION", 0, 8, ASCH_LABEL_JUSTIFICATION::BOTTOM_LEFT );
218 }
static int PropertiesReadInt(const std::map< wxString, wxString > &aProperties, const wxString &aKey, int aDefault)
static bool PropertiesReadBool(const std::map< wxString, wxString > &aProperties, const wxString &aKey, bool aDefault)
ASCH_LABEL_JUSTIFICATION justification
int PropertiesReadKiCadUnitFrac(const std::map< wxString, wxString > &aProperties, const wxString &aKey)
ALTIUM_SCH_RECORD PropertiesReadRecord(const std::map< wxString, wxString > &aProperties)
const int ALTIUM_COMPONENT_NONE
static wxString PropertiesReadString(const std::map< wxString, wxString > &aProperties, const wxString &aKey, const wxString &aDefault)

References ALTIUM_COMPONENT_NONE, BOTTOM_LEFT, fontId, isMirrored, justification, LABEL, location, ownerindex, ownerpartid, ALTIUM_PARSER::PropertiesReadBool(), ALTIUM_PARSER::PropertiesReadInt(), PropertiesReadKiCadUnitFrac(), PropertiesReadRecord(), ALTIUM_PARSER::PropertiesReadString(), and text.

Member Data Documentation

◆ fontId

int ASCH_LABEL::fontId

Definition at line 247 of file altium_parser_sch.h.

Referenced by ASCH_LABEL(), and SCH_ALTIUM_PLUGIN::ParseLabel().

◆ isMirrored

bool ASCH_LABEL::isMirrored

Definition at line 248 of file altium_parser_sch.h.

Referenced by ASCH_LABEL().

◆ justification

ASCH_LABEL_JUSTIFICATION ASCH_LABEL::justification

Definition at line 250 of file altium_parser_sch.h.

Referenced by ASCH_LABEL(), and SCH_ALTIUM_PLUGIN::ParseLabel().

◆ location

wxPoint ASCH_LABEL::location

Definition at line 243 of file altium_parser_sch.h.

Referenced by ASCH_LABEL(), and SCH_ALTIUM_PLUGIN::ParseLabel().

◆ ownerindex

int ASCH_LABEL::ownerindex

Definition at line 240 of file altium_parser_sch.h.

Referenced by ASCH_LABEL(), and SCH_ALTIUM_PLUGIN::ParseLabel().

◆ ownerpartid

int ASCH_LABEL::ownerpartid

Definition at line 241 of file altium_parser_sch.h.

Referenced by ASCH_LABEL(), and SCH_ALTIUM_PLUGIN::ParseLabel().

◆ text

wxString ASCH_LABEL::text

Definition at line 245 of file altium_parser_sch.h.

Referenced by ASCH_LABEL(), and SCH_ALTIUM_PLUGIN::ParseLabel().


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