KiCad PCB EDA Suite
Loading...
Searching...
No Matches
DSN::PLACE Class Reference

Implement a <placement_reference> in the specctra dsn spec. More...

#include <specctra.h>

Inheritance diagram for DSN::PLACE:
DSN::ELEM

Public Member Functions

 PLACE (ELEM *aParent)
 
 ~PLACE ()
 
void SetVertex (const POINT &aVertex)
 
void SetRotation (double aRotation)
 
void Format (OUTPUTFORMATTER *out, int nestLevel) override
 Write this object as ASCII out to an OUTPUTFORMATTER according to the SPECCTRA DSN format. More...
 
DSN_T Type () const
 
const char * Name () const
 
virtual UNIT_RESGetUnits () const
 Return the units for this section. More...
 
virtual void FormatContents (OUTPUTFORMATTER *out, int nestLevel)
 Write the contents as ASCII out to an OUTPUTFORMATTER according to the SPECCTRA DSN format. More...
 
void SetParent (ELEM *aParent)
 

Protected Member Functions

std::string makeHash ()
 Return a string which uniquely represents this ELEM among other ELEMs of the same derived class as "this" one. More...
 

Protected Attributes

DSN_T type
 
ELEMparent
 

Static Protected Attributes

static STRING_FORMATTER sf
 

Private Attributes

std::string m_component_id
 reference designator More...
 
DSN_T m_side
 
double m_rotation
 
bool m_hasVertex
 
POINT m_vertex
 
DSN_T m_mirror
 
DSN_T m_status
 
std::string m_logical_part
 
RULEm_place_rules
 
PROPERTIES m_properties
 
DSN_T m_lock_type
 
RULEm_rules
 
REGIONm_region
 
std::string m_part_number
 

Friends

class SPECCTRA_DB
 

Detailed Description

Implement a <placement_reference> in the specctra dsn spec.

Definition at line 1686 of file specctra.h.

Constructor & Destructor Documentation

◆ PLACE()

DSN::PLACE::PLACE ( ELEM aParent)
inline

Definition at line 1689 of file specctra.h.

References m_hasVertex, m_lock_type, m_mirror, m_place_rules, m_region, m_rotation, m_rules, m_side, and m_status.

◆ ~PLACE()

DSN::PLACE::~PLACE ( )
inline

Definition at line 1708 of file specctra.h.

References m_place_rules, m_region, and m_rules.

Member Function Documentation

◆ Format()

void DSN::PLACE::Format ( OUTPUTFORMATTER out,
int  nestLevel 
)
overridevirtual

Write this object as ASCII out to an OUTPUTFORMATTER according to the SPECCTRA DSN format.

Parameters
outThe formatter to write to.
nestLevelA multiple of the number of spaces to precede the output with.
Exceptions
IO_ERRORif a system error writing the output, such as a full disk.

Reimplemented from DSN::ELEM.

Definition at line 3922 of file specctra.cpp.

References DSN::ELEM::Format(), DSN::RULE::Format(), OUTPUTFORMATTER::GetQuoteChar(), DSN::GetTokenText(), m_component_id, m_hasVertex, m_lock_type, m_logical_part, m_mirror, m_part_number, m_place_rules, m_properties, m_region, m_rotation, m_rules, m_side, m_status, m_vertex, DSN::ELEM::Name(), OUTPUTFORMATTER::Print(), DSN::POINT::x, and DSN::POINT::y.

◆ FormatContents()

virtual void DSN::ELEM::FormatContents ( OUTPUTFORMATTER out,
int  nestLevel 
)
inlinevirtualinherited

Write the contents as ASCII out to an OUTPUTFORMATTER according to the SPECCTRA DSN format.

This is the same as Format() except that the outer wrapper is not included.

Parameters
outThe formatter to write to.
nestLevelA multiple of the number of spaces to precede the output with.
Exceptions
IO_ERRORif a system error writing the output, such as a full disk.

Reimplemented in DSN::ELEM_HOLDER, DSN::PARSER, DSN::CLASSES, DSN::CLASS_CLASS, DSN::REGION, DSN::STRUCTURE_OUT, DSN::STRUCTURE, DSN::COMPONENT, DSN::PLACEMENT, DSN::IMAGE, DSN::PADSTACK, DSN::LIBRARY, DSN::TOPOLOGY, DSN::NETWORK, DSN::WIRING, DSN::HISTORY, DSN::ROUTE, and DSN::WAS_IS.

Definition at line 241 of file specctra.h.

Referenced by DSN::ELEM::Format(), and DSN::ELEM::makeHash().

◆ GetUnits()

UNIT_RES * DSN::ELEM::GetUnits ( ) const
virtualinherited

Return the units for this section.

Derived classes may override this to check for section specific overrides.

Returns
an element from a local or parent scope.

Reimplemented in DSN::STRUCTURE, DSN::PLACEMENT, DSN::IMAGE, DSN::PADSTACK, DSN::LIBRARY, DSN::WIRING, DSN::PCB, and DSN::ROUTE.

Definition at line 3764 of file specctra.cpp.

References DSN::UNIT_RES::Default, DSN::ELEM::GetUnits(), and DSN::ELEM::parent.

Referenced by DSN::SPECCTRA_DB::FromSESSION(), DSN::ELEM::GetUnits(), DSN::STRUCTURE::GetUnits(), DSN::PLACEMENT::GetUnits(), DSN::IMAGE::GetUnits(), DSN::PADSTACK::GetUnits(), DSN::LIBRARY::GetUnits(), DSN::WIRING::GetUnits(), DSN::PCB::GetUnits(), and DSN::ROUTE::GetUnits().

◆ makeHash()

std::string DSN::ELEM::makeHash ( )
inlineprotectedinherited

Return a string which uniquely represents this ELEM among other ELEMs of the same derived class as "this" one.

It is not usable for all derived classes, only those which plan for it by implementing a FormatContents() function that captures all info which will be used in the subsequent string compare. THIS SHOULD NORMALLY EXCLUDE THE TYPENAME, AND INSTANCE NAME OR ID AS WELL.

Definition at line 262 of file specctra.h.

References STRING_FORMATTER::Clear(), DSN::ELEM::FormatContents(), STRING_FORMATTER::GetString(), DSN::ELEM::sf, and STRING_FORMATTER::StripUseless().

Referenced by DSN::IMAGE::Compare(), and DSN::PADSTACK::Compare().

◆ Name()

◆ SetParent()

◆ SetRotation()

void DSN::PLACE::SetRotation ( double  aRotation)
inline

Definition at line 1722 of file specctra.h.

References m_rotation.

Referenced by DSN::SPECCTRA_DB::doPLACE(), and DSN::SPECCTRA_DB::FromBOARD().

◆ SetVertex()

void DSN::PLACE::SetVertex ( const POINT aVertex)
inline

◆ Type()

Friends And Related Function Documentation

◆ SPECCTRA_DB

friend class SPECCTRA_DB
friend

Definition at line 1730 of file specctra.h.

Member Data Documentation

◆ m_component_id

std::string DSN::PLACE::m_component_id
private

reference designator

Definition at line 1732 of file specctra.h.

Referenced by DSN::SPECCTRA_DB::doPLACE(), Format(), DSN::SPECCTRA_DB::FromBOARD(), and DSN::SPECCTRA_DB::FromSESSION().

◆ m_hasVertex

bool DSN::PLACE::m_hasVertex
private

Definition at line 1738 of file specctra.h.

Referenced by Format(), DSN::SPECCTRA_DB::FromSESSION(), PLACE(), and SetVertex().

◆ m_lock_type

DSN_T DSN::PLACE::m_lock_type
private

Definition at line 1750 of file specctra.h.

Referenced by DSN::SPECCTRA_DB::doPLACE(), Format(), and PLACE().

◆ m_logical_part

std::string DSN::PLACE::m_logical_part
private

Definition at line 1744 of file specctra.h.

Referenced by DSN::SPECCTRA_DB::doPLACE(), and Format().

◆ m_mirror

DSN_T DSN::PLACE::m_mirror
private

Definition at line 1741 of file specctra.h.

Referenced by DSN::SPECCTRA_DB::doPLACE(), Format(), and PLACE().

◆ m_part_number

std::string DSN::PLACE::m_part_number
private

Definition at line 1757 of file specctra.h.

Referenced by DSN::SPECCTRA_DB::doPLACE(), Format(), and DSN::SPECCTRA_DB::FromBOARD().

◆ m_place_rules

RULE* DSN::PLACE::m_place_rules
private

Definition at line 1746 of file specctra.h.

Referenced by DSN::SPECCTRA_DB::doPLACE(), Format(), PLACE(), and ~PLACE().

◆ m_properties

PROPERTIES DSN::PLACE::m_properties
private

Definition at line 1748 of file specctra.h.

Referenced by DSN::SPECCTRA_DB::doPLACE(), and Format().

◆ m_region

REGION* DSN::PLACE::m_region
private

Definition at line 1754 of file specctra.h.

Referenced by DSN::SPECCTRA_DB::doPLACE(), Format(), PLACE(), and ~PLACE().

◆ m_rotation

double DSN::PLACE::m_rotation
private

Definition at line 1736 of file specctra.h.

Referenced by Format(), DSN::SPECCTRA_DB::FromSESSION(), PLACE(), and SetRotation().

◆ m_rules

RULE* DSN::PLACE::m_rules
private

Definition at line 1753 of file specctra.h.

Referenced by DSN::SPECCTRA_DB::doPLACE(), Format(), PLACE(), and ~PLACE().

◆ m_side

DSN_T DSN::PLACE::m_side
private

◆ m_status

DSN_T DSN::PLACE::m_status
private

Definition at line 1742 of file specctra.h.

Referenced by DSN::SPECCTRA_DB::doPLACE(), Format(), and PLACE().

◆ m_vertex

POINT DSN::PLACE::m_vertex
private

Definition at line 1739 of file specctra.h.

Referenced by Format(), DSN::SPECCTRA_DB::FromSESSION(), and SetVertex().

◆ parent

ELEM* DSN::ELEM::parent
protectedinherited

Definition at line 275 of file specctra.h.

Referenced by DSN::ELEM::GetUnits(), and DSN::ELEM::SetParent().

◆ sf

STRING_FORMATTER DSN::ELEM::sf
staticprotectedinherited

Definition at line 272 of file specctra.h.

Referenced by DSN::ELEM::makeHash().

◆ type

DSN_T DSN::ELEM::type
protectedinherited

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