KiCad PCB EDA Suite
ASCH_PORT Struct Reference

#include <altium_parser_sch.h>

Public Member Functions

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

Public Attributes

int OwnerPartID
 
wxString Name
 
wxString HarnessType
 
VECTOR2I Location
 
int Width
 
int Height
 
int AreaColor
 
int Color
 
int TextColor
 
int FontID
 
ASCH_TEXT_FRAME_ALIGNMENT Alignment
 
ASCH_PORT_IOTYPE IOtype
 
ASCH_PORT_STYLE Style
 

Detailed Description

Definition at line 625 of file altium_parser_sch.h.

Constructor & Destructor Documentation

◆ ASCH_PORT()

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

Definition at line 621 of file altium_parser_sch.cpp.

622{
623 wxASSERT( ReadRecord( aProps ) == ALTIUM_SCH_RECORD::PORT );
624
625 OwnerPartID = ReadOwnerPartId( aProps );
626
627 Location = VECTOR2I( ReadKiCadUnitFrac( aProps, "LOCATION.X" ),
628 -ReadKiCadUnitFrac( aProps, "LOCATION.Y" ) );
629
630 Name = ALTIUM_PARSER::ReadString( aProps, "NAME", "" );
631 HarnessType = ALTIUM_PARSER::ReadString( aProps, "HARNESSTYPE", "" );
632
633 Width = ReadKiCadUnitFrac( aProps, "WIDTH" );
634 Height = ReadKiCadUnitFrac( aProps, "HEIGHT" );
635
636 IOtype = ReadEnum<ASCH_PORT_IOTYPE>( aProps, "IOTYPE", 0, 3, ASCH_PORT_IOTYPE::UNSPECIFIED );
637 Style = ReadEnum<ASCH_PORT_STYLE>( aProps, "STYLE", 0, 7, ASCH_PORT_STYLE::NONE_HORIZONTAL );
638
639 AreaColor = ALTIUM_PARSER::ReadInt( aProps, "AREACOLOR", 0 );
640 Color = ALTIUM_PARSER::ReadInt( aProps, "COLOR", 0 );
641 FontID = ALTIUM_PARSER::ReadInt( aProps, "TEXTFONTID", 0 );
642 TextColor = ALTIUM_PARSER::ReadInt( aProps, "TEXTCOLOR", 0 );
643
644 Alignment = ReadEnum<ASCH_TEXT_FRAME_ALIGNMENT>( aProps, "ALIGNMENT", 1, 3,
646}
int ReadOwnerPartId(const std::map< wxString, wxString > &aProperties)
int ReadKiCadUnitFrac(const std::map< wxString, wxString > &aProps, const wxString &aKey)
ALTIUM_SCH_RECORD ReadRecord(const std::map< wxString, wxString > &aProps)
static int ReadInt(const std::map< wxString, wxString > &aProps, const wxString &aKey, int aDefault)
static wxString ReadString(const std::map< wxString, wxString > &aProps, const wxString &aKey, const wxString &aDefault)
VECTOR2I Location
ASCH_TEXT_FRAME_ALIGNMENT Alignment
ASCH_PORT_IOTYPE IOtype
wxString HarnessType
ASCH_PORT_STYLE Style
VECTOR2< int > VECTOR2I
Definition: vector2d.h:618

References Alignment, AreaColor, Color, FontID, HarnessType, Height, IOtype, LEFT, Location, Name, NONE_HORIZONTAL, OwnerPartID, PORT, ALTIUM_PARSER::ReadInt(), ReadKiCadUnitFrac(), ReadOwnerPartId(), ReadRecord(), ALTIUM_PARSER::ReadString(), Style, TextColor, UNSPECIFIED, and Width.

Member Data Documentation

◆ Alignment

ASCH_TEXT_FRAME_ALIGNMENT ASCH_PORT::Alignment

Definition at line 640 of file altium_parser_sch.h.

Referenced by ASCH_PORT(), and SCH_ALTIUM_PLUGIN::ParseHarnessPort().

◆ AreaColor

int ASCH_PORT::AreaColor

Definition at line 635 of file altium_parser_sch.h.

Referenced by ASCH_PORT().

◆ Color

int ASCH_PORT::Color

Definition at line 636 of file altium_parser_sch.h.

Referenced by ASCH_PORT().

◆ FontID

int ASCH_PORT::FontID

Definition at line 638 of file altium_parser_sch.h.

Referenced by ASCH_PORT(), and SCH_ALTIUM_PLUGIN::ParseHarnessPort().

◆ HarnessType

wxString ASCH_PORT::HarnessType

Definition at line 630 of file altium_parser_sch.h.

Referenced by ASCH_PORT(), and SCH_ALTIUM_PLUGIN::ParsePort().

◆ Height

int ASCH_PORT::Height

Definition at line 634 of file altium_parser_sch.h.

Referenced by ASCH_PORT(), and SCH_ALTIUM_PLUGIN::ParseHarnessPort().

◆ IOtype

ASCH_PORT_IOTYPE ASCH_PORT::IOtype

Definition at line 642 of file altium_parser_sch.h.

Referenced by ASCH_PORT(), and SCH_ALTIUM_PLUGIN::ParsePort().

◆ Location

VECTOR2I ASCH_PORT::Location

◆ Name

wxString ASCH_PORT::Name

◆ OwnerPartID

int ASCH_PORT::OwnerPartID

Definition at line 627 of file altium_parser_sch.h.

Referenced by ASCH_PORT().

◆ Style

ASCH_PORT_STYLE ASCH_PORT::Style

Definition at line 643 of file altium_parser_sch.h.

Referenced by ASCH_PORT(), and SCH_ALTIUM_PLUGIN::ParsePort().

◆ TextColor

int ASCH_PORT::TextColor

Definition at line 637 of file altium_parser_sch.h.

Referenced by ASCH_PORT(), and SCH_ALTIUM_PLUGIN::ParseHarnessPort().

◆ Width

int ASCH_PORT::Width

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