KiCad PCB EDA Suite
ASCH_POLYLINE Struct Reference

#include <altium_parser_sch.h>

Public Member Functions

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

Public Attributes

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

Detailed Description

Definition at line 317 of file altium_parser_sch.h.

Constructor & Destructor Documentation

◆ ASCH_POLYLINE()

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

Definition at line 284 of file altium_parser_sch.cpp.

285 {
286  wxASSERT( ReadRecord( aProps ) == ALTIUM_SCH_RECORD::POLYLINE );
287 
288  ownerindex = ReadOwnerIndex( aProps );
289  ownerpartid = ReadOwnerPartId( aProps );
290  ownerpartdisplaymode = ALTIUM_PARSER::ReadInt( aProps, "OWNERPARTDISPLAYMODE", 0 );
291 
292  int locationCount = ALTIUM_PARSER::ReadInt( aProps, "LOCATIONCOUNT", 0 );
293 
294  for( int i = 1; i <= locationCount; i++ )
295  {
296  const wxString si = std::to_string( i );
297  points.emplace_back( ReadKiCadUnitFrac( aProps, "X" + si ),
298  -ReadKiCadUnitFrac( aProps, "Y" + si ) );
299  }
300 
301  lineWidth = ReadKiCadUnitFrac( aProps, "LINEWIDTH" );
302 
303  int linestyleVar = ALTIUM_PARSER::ReadInt( aProps, "LINESTYLEEXT", 0 );
304  linestyleVar = ALTIUM_PARSER::ReadInt( aProps, "LINESTYLE", linestyleVar ); // overwrite if present
305  linestyle = linestyleVar >= 0 && linestyleVar <= 3 ?
306  static_cast<ASCH_POLYLINE_LINESTYLE>( linestyleVar ) :
308 }
std::vector< wxPoint > points
ASCH_POLYLINE_LINESTYLE
static int ReadInt(const std::map< wxString, wxString > &aProps, const wxString &aKey, int aDefault)
int ReadKiCadUnitFrac(const std::map< wxString, wxString > &aProps, const wxString &aKey)
int ReadOwnerPartId(const std::map< wxString, wxString > &aProperties)
ALTIUM_SCH_RECORD ReadRecord(const std::map< wxString, wxString > &aProps)
ASCH_POLYLINE_LINESTYLE linestyle
int ReadOwnerIndex(const std::map< wxString, wxString > &aProperties)

References linestyle, lineWidth, ownerindex, ownerpartdisplaymode, ownerpartid, points, POLYLINE, ALTIUM_PARSER::ReadInt(), ReadKiCadUnitFrac(), ReadOwnerIndex(), ReadOwnerPartId(), ReadRecord(), and SOLID.

Member Data Documentation

◆ linestyle

ASCH_POLYLINE_LINESTYLE ASCH_POLYLINE::linestyle

Definition at line 327 of file altium_parser_sch.h.

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

◆ lineWidth

int ASCH_POLYLINE::lineWidth

Definition at line 325 of file altium_parser_sch.h.

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

◆ ownerindex

int ASCH_POLYLINE::ownerindex

Definition at line 319 of file altium_parser_sch.h.

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

◆ ownerpartdisplaymode

int ASCH_POLYLINE::ownerpartdisplaymode

Definition at line 321 of file altium_parser_sch.h.

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

◆ ownerpartid

int ASCH_POLYLINE::ownerpartid

Definition at line 320 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 323 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: