KiCad PCB EDA Suite
ACOMPONENT6 Struct Reference

#include <altium_parser_pcb.h>

Public Member Functions

 ACOMPONENT6 (ALTIUM_PARSER &aReader)
 

Public Attributes

ALTIUM_LAYER layer
 
wxPoint position
 
double rotation
 
bool locked
 
bool nameon
 
bool commenton
 
wxString sourcedesignator
 
wxString sourcefootprintlibrary
 
wxString pattern
 
wxString sourcecomponentlibrary
 
wxString sourcelibreference
 
ALTIUM_TEXT_POSITION nameautoposition
 
ALTIUM_TEXT_POSITION commentautoposition
 

Detailed Description

Definition at line 371 of file altium_parser_pcb.h.

Constructor & Destructor Documentation

◆ ACOMPONENT6()

ACOMPONENT6::ACOMPONENT6 ( ALTIUM_PARSER aReader)
explicit

Definition at line 238 of file altium_parser_pcb.cpp.

239 {
240  std::map<wxString, wxString> props = aReader.ReadProperties();
241 
242  if( props.empty() )
243  THROW_IO_ERROR( "Components6 stream has no props" );
244 
245  layer = altium_layer_from_name( ALTIUM_PARSER::ReadString( props, "LAYER", "" ) );
246  position = wxPoint( ALTIUM_PARSER::ReadKicadUnit( props, "X", "0mil" ),
247  -ALTIUM_PARSER::ReadKicadUnit( props, "Y", "0mil" ) );
248  rotation = ALTIUM_PARSER::ReadDouble( props, "ROTATION", 0. );
249  locked = ALTIUM_PARSER::ReadBool( props, "LOCKED", false );
250  nameon = ALTIUM_PARSER::ReadBool( props, "NAMEON", true );
251  commenton = ALTIUM_PARSER::ReadBool( props, "COMMENTON", false );
252  sourcedesignator = ALTIUM_PARSER::ReadString( props, "SOURCEDESIGNATOR", "" );
253  sourcefootprintlibrary = ALTIUM_PARSER::ReadString( props, "SOURCEFOOTPRINTLIBRARY", "" );
254  pattern = ALTIUM_PARSER::ReadString( props, "PATTERN", "" );
255 
256  sourcecomponentlibrary = ALTIUM_PARSER::ReadString( props, "SOURCECOMPONENTLIBRARY", "" );
257  sourcelibreference = ALTIUM_PARSER::ReadString( props, "SOURCELIBREFERENCE", "" );
258 
259  nameautoposition = static_cast<ALTIUM_TEXT_POSITION>(
260  ALTIUM_PARSER::ReadInt( props, "NAMEAUTOPOSITION", 0 ) );
261  commentautoposition = static_cast<ALTIUM_TEXT_POSITION>(
262  ALTIUM_PARSER::ReadInt( props, "COMMENTAUTOPOSITION", 0 ) );
263 
264  if( aReader.HasParsingError() )
265  THROW_IO_ERROR( "Components6 stream was not parsed correctly" );
266 }
ALTIUM_TEXT_POSITION nameautoposition
ALTIUM_LAYER layer
wxString sourcedesignator
wxString sourcefootprintlibrary
wxString sourcelibreference
static double ReadDouble(const std::map< wxString, wxString > &aProps, const wxString &aKey, double aDefault)
wxString sourcecomponentlibrary
static int ReadInt(const std::map< wxString, wxString > &aProps, const wxString &aKey, int aDefault)
std::map< wxString, wxString > ReadProperties()
static bool ReadBool(const std::map< wxString, wxString > &aProps, const wxString &aKey, bool aDefault)
int32_t ReadKicadUnit()
static wxString ReadString(const std::map< wxString, wxString > &aProps, const wxString &aKey, const wxString &aDefault)
ALTIUM_TEXT_POSITION commentautoposition
ALTIUM_LAYER altium_layer_from_name(const wxString &aName)
#define THROW_IO_ERROR(msg)
Definition: ki_exception.h:38
bool HasParsingError()

References altium_layer_from_name(), commentautoposition, commenton, ALTIUM_PARSER::HasParsingError(), layer, locked, nameautoposition, nameon, pattern, position, ALTIUM_PARSER::ReadBool(), ALTIUM_PARSER::ReadDouble(), ALTIUM_PARSER::ReadInt(), ALTIUM_PARSER::ReadKicadUnit(), ALTIUM_PARSER::ReadProperties(), ALTIUM_PARSER::ReadString(), rotation, sourcecomponentlibrary, sourcedesignator, sourcefootprintlibrary, sourcelibreference, and THROW_IO_ERROR.

Member Data Documentation

◆ commentautoposition

ALTIUM_TEXT_POSITION ACOMPONENT6::commentautoposition

Definition at line 386 of file altium_parser_pcb.h.

Referenced by ACOMPONENT6().

◆ commenton

bool ACOMPONENT6::commenton

Definition at line 378 of file altium_parser_pcb.h.

Referenced by ACOMPONENT6(), and ALTIUM_PCB::ParseComponents6Data().

◆ layer

ALTIUM_LAYER ACOMPONENT6::layer

Definition at line 373 of file altium_parser_pcb.h.

Referenced by ACOMPONENT6(), and ALTIUM_PCB::ParseComponents6Data().

◆ locked

bool ACOMPONENT6::locked

Definition at line 376 of file altium_parser_pcb.h.

Referenced by ACOMPONENT6(), and ALTIUM_PCB::ParseComponents6Data().

◆ nameautoposition

ALTIUM_TEXT_POSITION ACOMPONENT6::nameautoposition

Definition at line 385 of file altium_parser_pcb.h.

Referenced by ACOMPONENT6().

◆ nameon

bool ACOMPONENT6::nameon

Definition at line 377 of file altium_parser_pcb.h.

Referenced by ACOMPONENT6(), and ALTIUM_PCB::ParseComponents6Data().

◆ pattern

wxString ACOMPONENT6::pattern

Definition at line 381 of file altium_parser_pcb.h.

Referenced by ACOMPONENT6(), and ALTIUM_PCB::ParseComponents6Data().

◆ position

wxPoint ACOMPONENT6::position

Definition at line 374 of file altium_parser_pcb.h.

Referenced by ACOMPONENT6(), and ALTIUM_PCB::ParseComponents6Data().

◆ rotation

double ACOMPONENT6::rotation

Definition at line 375 of file altium_parser_pcb.h.

Referenced by ACOMPONENT6(), and ALTIUM_PCB::ParseComponents6Data().

◆ sourcecomponentlibrary

wxString ACOMPONENT6::sourcecomponentlibrary

Definition at line 382 of file altium_parser_pcb.h.

Referenced by ACOMPONENT6().

◆ sourcedesignator

wxString ACOMPONENT6::sourcedesignator

Definition at line 379 of file altium_parser_pcb.h.

Referenced by ACOMPONENT6(), and ALTIUM_PCB::ParseComponents6Data().

◆ sourcefootprintlibrary

wxString ACOMPONENT6::sourcefootprintlibrary

Definition at line 380 of file altium_parser_pcb.h.

Referenced by ACOMPONENT6(), and ALTIUM_PCB::ParseComponents6Data().

◆ sourcelibreference

wxString ACOMPONENT6::sourcelibreference

Definition at line 383 of file altium_parser_pcb.h.

Referenced by ACOMPONENT6().


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