KiCad PCB EDA Suite
ASCH_POLYLINE Struct Reference

#include <altium_parser_sch.h>

Public Member Functions

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

Public Attributes

int ownerindex
 
int ownerpartid
 
int ownerpartdisplaymode
 
std::vector< wxPoint > points
 
int lineWidth
 
ASCH_POLYLINE_LINESTYLE linestyle
 

Detailed Description

Definition at line 279 of file altium_parser_sch.h.

Constructor & Destructor Documentation

◆ ASCH_POLYLINE()

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

Definition at line 244 of file altium_parser_sch.cpp.

245 {
246  wxASSERT( PropertiesReadRecord( aProperties ) == ALTIUM_SCH_RECORD::POLYLINE );
247 
248  ownerindex =
249  ALTIUM_PARSER::PropertiesReadInt( aProperties, "OWNERINDEX", ALTIUM_COMPONENT_NONE );
250  ownerpartid =
251  ALTIUM_PARSER::PropertiesReadInt( aProperties, "OWNERPARTID", ALTIUM_COMPONENT_NONE );
253  ALTIUM_PARSER::PropertiesReadInt( aProperties, "OWNERPARTDISPLAYMODE", 0 );
254 
255  int locationCount = ALTIUM_PARSER::PropertiesReadInt( aProperties, "LOCATIONCOUNT", 0 );
256  for( int i = 1; i <= locationCount; i++ )
257  {
258  const wxString si = std::to_string( i );
259  points.emplace_back( PropertiesReadKiCadUnitFrac( aProperties, "X" + si ),
260  -PropertiesReadKiCadUnitFrac( aProperties, "Y" + si ) );
261  }
262 
263  lineWidth = PropertiesReadKiCadUnitFrac( aProperties, "LINEWIDTH" );
264 
265  int linestyleVar = ALTIUM_PARSER::PropertiesReadInt( aProperties, "LINESTYLEEXT", 0 );
266  linestyleVar = ALTIUM_PARSER::PropertiesReadInt(
267  aProperties, "LINESTYLE", linestyleVar ); // overwrite if present
268  linestyle = linestyleVar >= 0 && linestyleVar <= 3 ?
269  static_cast<ASCH_POLYLINE_LINESTYLE>( linestyleVar ) :
271 }
static int PropertiesReadInt(const std::map< wxString, wxString > &aProperties, const wxString &aKey, int aDefault)
std::vector< wxPoint > points
ASCH_POLYLINE_LINESTYLE
int PropertiesReadKiCadUnitFrac(const std::map< wxString, wxString > &aProperties, const wxString &aKey)
ALTIUM_SCH_RECORD PropertiesReadRecord(const std::map< wxString, wxString > &aProperties)
ASCH_POLYLINE_LINESTYLE linestyle
const int ALTIUM_COMPONENT_NONE

References ALTIUM_COMPONENT_NONE, linestyle, lineWidth, ownerindex, ownerpartdisplaymode, ownerpartid, points, POLYLINE, ALTIUM_PARSER::PropertiesReadInt(), PropertiesReadKiCadUnitFrac(), PropertiesReadRecord(), and SOLID.

Member Data Documentation

◆ linestyle

ASCH_POLYLINE_LINESTYLE ASCH_POLYLINE::linestyle

Definition at line 289 of file altium_parser_sch.h.

Referenced by ASCH_POLYLINE(), and SCH_ALTIUM_PLUGIN::ParsePolyline().

◆ lineWidth

int ASCH_POLYLINE::lineWidth

Definition at line 287 of file altium_parser_sch.h.

Referenced by ASCH_POLYLINE(), and SCH_ALTIUM_PLUGIN::ParsePolyline().

◆ ownerindex

int ASCH_POLYLINE::ownerindex

Definition at line 281 of file altium_parser_sch.h.

Referenced by ASCH_POLYLINE(), and SCH_ALTIUM_PLUGIN::ParsePolyline().

◆ ownerpartdisplaymode

int ASCH_POLYLINE::ownerpartdisplaymode

Definition at line 283 of file altium_parser_sch.h.

Referenced by ASCH_POLYLINE(), and SCH_ALTIUM_PLUGIN::ParsePolyline().

◆ ownerpartid

int ASCH_POLYLINE::ownerpartid

Definition at line 282 of file altium_parser_sch.h.

Referenced by ASCH_POLYLINE(), and SCH_ALTIUM_PLUGIN::ParsePolyline().

◆ points

std::vector<wxPoint> ASCH_POLYLINE::points

Definition at line 285 of file altium_parser_sch.h.

Referenced by ASCH_POLYLINE(), and SCH_ALTIUM_PLUGIN::ParsePolyline().


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