26#include <boost/ptr_container/ptr_vector.hpp>
29#include <boost/ptr_container/ptr_set.hpp>
31#include <specctra_import_export/specctra_lexer.h>
118 return x==other.
x &&
y==other.
y;
123 return !( *
this == other );
164 out->
Print( nestLevel,
" %.6g %.6g",
x,
y );
186 out->
Print( nestLevel,
"(%s%s%s %s%s%s)\n",
187 quoteName,
name.c_str(), quoteName,
188 quoteValue,
value.c_str(), quoteValue );
212 const char*
Name()
const;
269 return sf.GetString();
293 ELEM( aType, aParent )
324 kids.push_back( aElem );
329 ELEM_ARRAY::auto_type ret =
kids.replace( aIndex, aElem );
330 return ret.release();
335 ELEM_ARRAY::auto_type ret =
kids.release(
kids.begin() + aIndex );
336 return ret.release();
413 ELEM( aType, aParent )
443 ELEM( T_rect, aParent )
466 const char* newline = nestLevel ?
"\n" :
"";
470 out->
Print( nestLevel,
"(%s %s%s%s %.6g %.6g %.6g %.6g)%s",
496 ELEM( aType, aParent )
514 out->
Print( 0,
"\n" );
517 for(
const std::string& rule :
m_rules )
518 out->
Print( nestLevel+1,
"%s\n", rule.c_str() );
520 out->
Print( nestLevel,
")" );
523 if( nestLevel || !singleLine )
524 out->
Print( 0,
"\n" );
539 ELEM( T_layer_rule, aParent )
556 out->
Print( 0,
" %s%s%s", quote, layer.c_str(), quote );
559 out->
Print( 0 ,
"\n" );
562 m_rule->Format( out, nestLevel+1 );
564 out->
Print( nestLevel,
")\n" );
584 ELEM( aType, aParent )
592 points.push_back( aPoint );
609 const char* newline = nestLevel ?
"\n" :
"";
613 const int RIGHTMARGIN = 70;
614 int perLine = out->
Print( nestLevel,
"(%s %s%s%s %.6g",
619 int wrapNest = std::max( nestLevel+1, 6 );
623 if( perLine > RIGHTMARGIN )
625 out->
Print( 0,
"\n" );
626 perLine = out->
Print( wrapNest,
"%s",
"" );
630 perLine += out->
Print( 0,
" " );
633 perLine += out->
Print( 0,
"%.6g %.6g", pt.x, pt.y );
638 out->
Print( 0,
"(aperture_type square)" );
641 out->
Print( 0,
")%s", newline );
654typedef boost::ptr_vector<PATH>
PATHS;
662 ELEM( aType, aParent )
679 aBuffer.push_back(
rectangle->GetOrigin().x );
680 aBuffer.push_back(
rectangle->GetOrigin().y );
682 aBuffer.push_back(
rectangle->GetOrigin().x );
683 aBuffer.push_back(
rectangle->GetEnd().y );
685 aBuffer.push_back(
rectangle->GetEnd().x );
686 aBuffer.push_back(
rectangle->GetEnd().y );
688 aBuffer.push_back(
rectangle->GetEnd().x );
689 aBuffer.push_back(
rectangle->GetOrigin().y );
695 for(
const POINT& pt :
path.GetPoints() )
697 aBuffer.push_back( pt.x );
698 aBuffer.push_back( pt.y );
707 out->
Print( nestLevel,
"(%s\n",
Name() );
714 path.Format( out, nestLevel+1 );
717 out->
Print( nestLevel,
")\n" );
733 ELEM( T_circle, aParent )
740 const char* newline = nestLevel ?
"\n" :
"";
748 out->
Print( 0,
")%s", newline );
780 ELEM( T_qarc, aParent )
787 const char* newline = nestLevel ?
"\n" :
"";
790 out->
Print( nestLevel,
"(%s %s%s%s %.6g",
Name(), quote,
layer_id.c_str(), quote,
794 out->
Print( 0,
" %.6g %.6g", pt.x, pt.y );
796 out->
Print( 0,
")%s", newline );
809 vertex[0].FixNegativeZero();
817 vertex[1].FixNegativeZero();
825 vertex[2].FixNegativeZero();
842 ELEM( aType, aParent )
859 wxASSERT( aShape->
Type()==T_rect
860 || aShape->
Type()==T_circle
861 || aShape->
Type()==T_qarc
862 || aShape->
Type()==T_path
863 || aShape->
Type()==T_polygon);
874 shape->Format( out, 0 );
876 out->
Print( 0,
")\n" );
906 ELEM( aType, aParent )
929 wxASSERT( aShape->
Type()==T_rect
930 || aShape->
Type()==T_circle
931 || aShape->
Type()==T_qarc
932 || aShape->
Type()==T_path
933 || aShape->
Type()==T_polygon);
947 const char* newline =
"\n";
954 out->
Print( 0,
" %s%s%s", quote,
m_name.c_str(), quote );
960 out->
Print( 0,
" \"\"" );
969 out->
Print( 0,
" " );
975 out->
Print( 0,
"%s", newline );
977 m_rules->Format( out, nestLevel+1 );
982 out->
Print( 0,
"%s", newline );
989 out->
Print( 0,
"%s", newline );
993 window.Format( out, nestLevel+1 );
995 out->
Print( nestLevel,
")\n" );
999 out->
Print( 0,
")\n" );
1033 ELEM( T_via, aParent )
1044 const int RIGHTMARGIN = 80;
1045 int perLine = out->
Print( nestLevel,
"(%s",
Name() );
1049 if( perLine > RIGHTMARGIN )
1051 out->
Print( 0,
"\n" );
1052 perLine = out->
Print( nestLevel+1,
"%s",
"");
1055 const char* quote = out->
GetQuoteChar( padstack.c_str() );
1056 perLine += out->
Print( 0,
" %s%s%s", quote, padstack.c_str(), quote );
1061 out->
Print( 0,
"\n" );
1063 perLine = out->
Print( nestLevel+1,
"(spare" );
1065 for(
const std::string& spare :
m_spares )
1067 if( perLine > RIGHTMARGIN )
1069 out->
Print( 0,
"\n" );
1070 perLine = out->
Print( nestLevel+2,
"%s",
"");
1073 const char* quote = out->
GetQuoteChar( spare.c_str() );
1074 perLine += out->
Print( 0,
" %s%s%s", quote, spare.c_str(), quote );
1077 out->
Print( 0,
")" );
1080 out->
Print( 0,
")\n" );
1095 ELEM( T_classes, aParent )
1101 for(
const std::string& class_id :
class_ids )
1103 const char* quote = out->
GetQuoteChar( class_id.c_str() );
1104 out->
Print( nestLevel,
"%s%s%s\n", quote, class_id.c_str(), quote );
1137 classes->Format( out, nestLevel );
1168 out->
Print( nestLevel,
"(%s\n",
Name() );
1170 out->
Print( nestLevel+1,
"(via_at_smd %s",
via_at_smd ?
"on" :
"off" );
1175 out->
Print( 0,
")\n" );
1177 for(
int i = 0; i <
Length(); ++i )
1180 out->
Print( nestLevel,
")\n" );
1195 ELEM( T_layer, aParent )
1214 out->
Print( nestLevel,
"(%s %s%s%s\n",
Name(), quote,
name.c_str(), quote );
1220 out->
Print( nestLevel+1,
"(property\n" );
1223 property.Format( out, nestLevel+2 );
1225 out->
Print( nestLevel+1,
")\n" );
1232 rules->Format( out, nestLevel+1 );
1238 out->
Print( nestLevel+1,
"(cost %d", -
cost );
1245 out->
Print( 0,
")\n" );
1250 out->
Print( nestLevel+1,
"(use_net" );
1252 for(
const std::string& net :
use_net )
1255 out->
Print( 0,
" %s%s%s", quote, net.c_str(), quote );
1258 out->
Print( 0,
")\n" );
1261 out->
Print( nestLevel,
")\n" );
1285 ELEM( T_layer_pair, aParent )
1295 out->
Print( nestLevel,
"(%s %s%s%s %s%s%s %.6g)\n",
1323 ELEM( T_layer_noise_weight, aParent )
1329 out->
Print( nestLevel,
"(%s\n",
Name() );
1332 pair.Format( out, nestLevel+1 );
1334 out->
Print( nestLevel,
")\n" );
1365 ELEM( aType, aParent )
1392 ELEM( aType, aParent )
1400 out->
Print( nestLevel,
"(%s %s%s%s)\n",
1402 quote,
value.c_str(), quote );
1447 m_rules->Format( out, nestLevel );
1472 ELEM( T_grid, aParent )
1499 out->
Print( 0,
")\n");
1517 ELEM( T_structure_out, aParent )
1530 layer.Format( out, nestLevel );
1533 m_rules->Format( out, nestLevel );
1593 m_unit->Format( out, nestLevel );
1596 layer.Format( out, nestLevel );
1608 plane.Format( out, nestLevel );
1611 region.Format( out, nestLevel );
1614 keepout.Format( out, nestLevel );
1617 m_via->Format( out, nestLevel );
1622 for(
int i=0; i<
Length(); ++i )
1628 m_rules->Format( out, nestLevel );
1634 grid.Format( out, nestLevel );
1677 ELEM( T_place, aParent )
1755 ELEM( T_component, aParent )
1778 out->
Print( nestLevel,
")\n" );
1784 place.Format( out, nestLevel );
1801 ELEM( T_placement, aParent )
1824 if( component.GetImageId().compare( imageName ) == 0 )
1837 m_unit->Format( out, nestLevel );
1845 m_component.Format( out, nestLevel );
1891 out->
Print( nestLevel,
"(%s ",
Name() );
1894 shape->Format( out, 0 );
1901 out->
Print( 0,
"\n" );
1904 window.Format( out, nestLevel+1 );
1906 out->
Print( nestLevel,
")\n" );
1910 out->
Print( 0,
")\n" );
1936 ELEM( T_pin, aParent )
2021 const char* quote = out->
GetQuoteChar( imageId.c_str() );
2023 out->
Print( nestLevel,
"(%s %s%s%s",
Name(), quote, imageId.c_str(), quote );
2027 out->
Print( nestLevel,
")\n" );
2036 out->
Print( 0,
"\n");
2039 m_unit->Format( out, nestLevel );
2045 pin.Format( out, nestLevel );
2048 m_rules->Format( out, nestLevel );
2054 keepout.Format( out, nestLevel );
2141 out->
Print( nestLevel,
")\n" );
2148 m_unit->Format( out, nestLevel );
2153 out->
Print( nestLevel,
"%s",
"" );
2159 out->
Print( 0,
"(attach off)" );
2165 out->
Print( 0,
"(attach on (use_via %s%s%s))", quote,
m_via_id.c_str(), quote );
2174 out->
Print( 0,
"\n" );
2177 m_rules->Format( out, nestLevel );
2227 ELEM( aType, aParent )
2264 for( i = 0; i <
m_images.size(); ++i )
2319 for(
unsigned i = 0; i <
m_vias.size(); ++i )
2334 m_vias.push_back( aVia );
2375 if( padstack.GetPadstackId().compare( aPadstackId ) == 0 )
2385 m_unit->Format( out, nestLevel );
2388 image.Format( out, nestLevel );
2391 padstack.Format( out, nestLevel );
2394 via.Format( out, nestLevel );
2422 ELEM( T_pin, aParent )
2436 const char* newline = nestLevel ?
"\n" :
"";
2441 return out->
Print( nestLevel,
"%s%s%s-%s%s%s%s", cquote,
component_id.c_str(), cquote,
2442 pquote,
pin_id.c_str(), pquote, newline );
2454 ELEM( T_fromto, aParent )
2476 out->
Print( 0,
"(net %s%s%s)", quote,
m_net_id.c_str(), quote );
2479 bool singleLine =
true;
2483 out->
Print( 0,
"\n" );
2488 m_rules->Format( out, nestLevel+1 );
2496 layer_rule.Format( out, nestLevel+1 );
2498 out->
Print( singleLine ? 0 : nestLevel,
")" );
2500 if( nestLevel || !singleLine )
2501 out->
Print( 0,
"\n" );
2525 ELEM( T_comp_order, aParent )
2535 const char* quote = out->
GetQuoteChar( placement_id.c_str() );
2536 out->
Print( 0,
" %s%s%s", quote, placement_id.c_str(), quote );
2539 out->
Print( 0,
")" );
2542 out->
Print( 0,
"\n" );
2560 ELEM( T_net, aParent )
2581 for(
unsigned i = 0; i <
m_pins.size(); ++i )
2583 if( aComponent ==
m_pins[i].component_id )
2593 const char* space =
" ";
2599 out->
Print( 0,
"%s(unassigned)", space );
2609 out->
Print( 0,
"\n" );
2613 const int RIGHTMARGIN = 80;
2618 if( perLine > RIGHTMARGIN )
2620 out->
Print( 0,
"\n");
2621 perLine = out->
Print( nestLevel+2,
"%s",
"" );
2625 perLine += out->
Print( 0,
" " );
2628 perLine +=
pin.FormatIt( out, 0 );
2631 out->
Print( 0,
")\n" );
2641 m_rules->Format( out, nestLevel+1 );
2644 layer_rule.Format( out, nestLevel+1 );
2647 from_to.Format( out, nestLevel+1 );
2649 out->
Print( nestLevel,
")\n" );
2682 ELEM( T_topology, aParent )
2689 from_to.Format( out, nestLevel );
2692 comp_order.Format( out, nestLevel );
2710 ELEM( T_class, aParent )
2726 int perLine = out->
Print( nestLevel,
"(%s %s%s%s",
Name(), quote,
m_class_id.c_str(), quote );
2728 const int RIGHTMARGIN = 72;
2730 for(
const std::string& net_id :
m_net_ids )
2732 const char* space =
" ";
2734 if( perLine > RIGHTMARGIN )
2736 out->
Print( 0,
"\n" );
2737 perLine = out->
Print( nestLevel+1,
"%s",
"" );
2742 if( net_id.empty() )
2746 perLine += out->
Print( 0,
"%s%s%s%s", space, quote, net_id.c_str(), quote );
2749 bool newLine =
false;
2753 out->
Print( 0,
"\n" );
2759 out->
Print( nestLevel+1,
"(circuit\n" );
2761 for(
const std::string& circuit :
m_circuit )
2762 out->
Print( nestLevel + 2,
"%s\n", circuit.c_str() );
2764 out->
Print( nestLevel+1,
")\n" );
2768 m_rules->Format( out, nestLevel+1 );
2771 layer_rule.Format( out, nestLevel + 1 );
2776 out->
Print( newLine ? nestLevel : 0,
")\n" );
2800 ELEM( T_network, aParent )
2807 net.Format( out, nestLevel );
2810 c.Format( out, nestLevel );
2827 ELEM( T_connect, aParent ) {}
2838 ELEM( T_wire, aParent )
2862 wxASSERT(aShape->
Type()==T_rect || aShape->
Type()==T_circle
2863 || aShape->
Type()==T_qarc || aShape->
Type()==T_path
2864 || aShape->
Type()==T_polygon);
2878 out->
Print( nestLevel,
"(%s ",
Name() );
2886 out->
Print( 0,
"(net %s%s%s)", quote,
m_net_id.c_str(), quote );
2901 out->
Print( 0,
"(shield %s%s%s)", quote,
m_shield.c_str(), quote );
2906 out->
Print( 0,
"\n" );
2909 window.Format( out, nestLevel + 1 );
2911 out->
Print( nestLevel,
"" );
2918 out->
Print( 0,
"(supply)" );
2920 out->
Print( 0,
")\n" );
2953 ELEM( T_via, aParent )
2970 const int RIGHTMARGIN = 80;
2975 if( perLine > RIGHTMARGIN )
2977 out->
Print( 0,
"\n" );
2978 perLine = out->
Print( nestLevel+1,
"%s",
"" );
2982 perLine += out->
Print( 0,
" " );
2985 perLine += out->
Print( 0,
"%.6g %.6g", pt.x, pt.y );
2989 out->
Print( 0,
" " );
2993 if( perLine > RIGHTMARGIN )
2995 out->
Print( 0,
"\n" );
2996 perLine = out->
Print( nestLevel+1,
"%s",
"" );
3000 perLine += out->
Print( 0,
"(net %s%s%s)", quote,
m_net_id.c_str(), quote );
3005 if( perLine > RIGHTMARGIN )
3007 out->
Print( 0,
"\n" );
3008 perLine = out->
Print( nestLevel+1,
"%s",
"" );
3016 if( perLine > RIGHTMARGIN )
3018 out->
Print( 0,
"\n" );
3019 perLine = out->
Print( nestLevel+1,
"%s",
"" );
3027 if( perLine > RIGHTMARGIN )
3029 out->
Print( 0,
"\n" );
3030 perLine = out->
Print( nestLevel+1,
"%s",
"" );
3033 if(
m_attr == T_virtual_pin )
3046 if( perLine > RIGHTMARGIN )
3048 out->
Print( 0,
"\n" );
3049 perLine = out->
Print( nestLevel+1,
"%s",
"" );
3052 perLine += out->
Print( 0,
"(supply)" );
3057 out->
Print( 0,
"\n" );
3058 out->
Print( nestLevel+1,
"(contact\n" );
3063 out->
Print( nestLevel+2,
"%s%s%s\n", quote, contact_layer.c_str(), quote );
3066 out->
Print( nestLevel+1,
"))\n" );
3070 out->
Print( 0,
")\n" );
3096 ELEM( T_wiring, aParent )
3109 unit->Format( out, nestLevel );
3112 wire.Format( out, nestLevel );
3115 wire_via.Format( out, nestLevel );
3139 ELEM( T_pcb, aParent )
3170 m_parser->Format( out, nestLevel+1 );
3176 m_unit->Format( out, nestLevel+1 );
3191 m_wiring->Format( out, nestLevel+1 );
3193 out->
Print( nestLevel,
")\n" );
3226 ELEM( T_ancestor, aParent )
3237 strftime( temp,
sizeof(temp),
"%b %d %H : %M : %S %Y", tmp );
3241 out->
Print( nestLevel,
"(%s \"%s\" (created_time %s)\n",
Name(),
filename.c_str(), temp );
3246 out->
Print( nestLevel+1,
"(comment %s%s%s)\n", quote,
comment.c_str(), quote );
3249 out->
Print( nestLevel,
")\n" );
3267 ELEM( T_history, aParent )
3275 ancestor.Format( out, nestLevel );
3281 strftime( temp,
sizeof( temp ),
"%b %d %H : %M : %S %Y", tmp );
3284 out->
Print( nestLevel,
"(self (created_time %s)\n", temp );
3286 for(
const std::string& comment :
comments )
3288 const char* quote = out->
GetQuoteChar( comment.c_str() );
3289 out->
Print( nestLevel+1,
"(comment %s%s%s)\n", quote, comment.c_str(), quote );
3292 out->
Print( nestLevel,
")\n" );
3311 ELEM( T_supply_pin, aParent )
3317 bool singleLine =
pin_refs.size() <= 1;
3322 out->
Print( 0,
"%s",
" " );
3323 pin_refs.begin()->Format( out, 0 );
3328 pin_ref.FormatIt( out, nestLevel + 1 );
3333 const char* newline = singleLine ?
"" :
"\n";
3336 out->
Print( singleLine ? 0 : nestLevel+1,
" (net %s%s%s)%s",
3337 quote,
net_id.c_str(), quote, newline );
3340 out->
Print( singleLine ? 0 : nestLevel,
")\n");
3358 ELEM( T_net_out, aParent )
3375 out->
Print( nestLevel,
"(net %s%s%s\n", quote,
net_id.c_str(), quote );
3378 out->
Print( nestLevel + 1,
"(unassigned)\n" );
3384 rules->Format( out, nestLevel+1 );
3387 wire.Format( out, nestLevel + 1 );
3390 wire_via.Format( out, nestLevel + 1 );
3393 supply_pin.Format( out, nestLevel + 1 );
3395 out->
Print( nestLevel,
")\n" );
3415 ELEM( T_route, aParent )
3446 parser->Format( out, nestLevel );
3452 library->Format( out, nestLevel );
3456 out->
Print( nestLevel,
"(network_out\n" );
3459 net_out.Format( out, nestLevel + 1 );
3461 out->
Print( nestLevel,
")\n" );
3504 ELEM( T_was_is, aParent )
3512 out->
Print( nestLevel,
"(pins " );
3513 pin_pair.was.Format( out, 0 );
3514 out->
Print( 0,
" " );
3515 pin_pair.is.Format( out, 0 );
3516 out->
Print( 0,
")\n" );
3534 ELEM( T_session, aParent )
3560 history->Format( out, nestLevel+1 );
3569 was_is->Format( out, nestLevel+1 );
3572 route->Format( out, nestLevel+1 );
3574 out->
Print( nestLevel,
")\n" );
3611 wxASSERT( !iOwnReaders );
3618 SetSpecctraMode(
true );
3671 void LoadPCB(
const wxString& aFilename );
3693 void ExportPCB(
const wxString& aFilename,
bool aNameChange=
false );
3778 void readCOMPnPIN( std::string* component_id, std::string* pid_id );
3791 void readTIME( time_t* time_stamp );
3888 PADSTACK*
makeVia(
int aCopperDiameter,
int aDrillDiameter,
int aTopLayer,
int aBotLayer );
3933 int aViaDrillDefault );
Information pertinent to a Pcbnew printed circuit board.
Represent a set of changes (additions, deletions or modifications) of a data model (e....
void Format(OUTPUTFORMATTER *out, int nestLevel) override
Write this object as ASCII out to an OUTPUTFORMATTER according to the SPECCTRA DSN format.
BOUNDARY(ELEM *aParent, DSN_T aType=T_boundary)
void GetCorners(std::vector< double > &aBuffer)
GetCorners fills aBuffer with a list of coordinates (x,y) of corners.
void Format(OUTPUTFORMATTER *out, int nestLevel) override
Write this object as ASCII out to an OUTPUTFORMATTER according to the SPECCTRA DSN format.
void SetLayerId(const std::string &aLayerId)
void Format(OUTPUTFORMATTER *out, int nestLevel) override
Write this object as ASCII out to an OUTPUTFORMATTER according to the SPECCTRA DSN format.
void SetVertex(const POINT &aVertex)
void SetDiameter(double aDiameter)
void FormatContents(OUTPUTFORMATTER *out, int nestLevel) override
Write the contents as ASCII out to an OUTPUTFORMATTER according to the SPECCTRA DSN format.
std::vector< std::string > class_ids
CLASS_CLASS(ELEM *aParent, DSN_T aType)
void FormatContents(OUTPUTFORMATTER *out, int nestLevel) override
Write the contents as ASCII out to an OUTPUTFORMATTER according to the SPECCTRA DSN format.
The <class_descriptor> in the specctra spec.
std::vector< std::string > m_circuit
circuit descriptor list
boost::ptr_vector< LAYER_RULE > m_layer_rules
void Format(OUTPUTFORMATTER *out, int nestLevel) override
Write this object as ASCII out to an OUTPUTFORMATTER according to the SPECCTRA DSN format.
std::vector< std::string > m_net_ids
Implement a <component_descriptor> in the specctra dsn spec.
boost::ptr_vector< PLACE > m_places
const std::string & GetImageId() const
void FormatContents(OUTPUTFORMATTER *out, int nestLevel) override
Write the contents as ASCII out to an OUTPUTFORMATTER according to the SPECCTRA DSN format.
void SetImageId(const std::string &aImageId)
void Format(OUTPUTFORMATTER *out, int nestLevel) override
Compare two objects of this type and returns <0, 0, or >0.
The <component_order_descriptor>.
COMP_ORDER(ELEM *aParent)
void Format(OUTPUTFORMATTER *out, int nestLevel) override
Write this object as ASCII out to an OUTPUTFORMATTER according to the SPECCTRA DSN format.
std::vector< std::string > m_placement_ids
void Format(OUTPUTFORMATTER *out, int nestLevel) override
Write this object as ASCII out to an OUTPUTFORMATTER according to the SPECCTRA DSN format.
A <plane_descriptor> in the specctra dsn spec.
COPPER_PLANE(ELEM *aParent)
int FindElem(DSN_T aType, int instanceNum=0)
Find a particular instance number of a given type of ELEM.
ELEM_HOLDER(DSN_T aType, ELEM *aParent=nullptr)
ELEM * operator[](int aIndex) const
virtual void FormatContents(OUTPUTFORMATTER *out, int nestLevel) override
Write the contents as ASCII out to an OUTPUTFORMATTER according to the SPECCTRA DSN format.
ELEM * Replace(int aIndex, ELEM *aElem)
void Insert(int aIndex, ELEM *aElem)
ELEM_ARRAY kids
ELEM pointers.
ELEM * Remove(int aIndex)
ELEM * At(int aIndex) const
boost::ptr_vector< ELEM > ELEM_ARRAY
int Length() const
Return the number of ELEMs in this holder.
A base class for any DSN element class.
std::string makeHash()
Return a string which uniquely represents this ELEM among other ELEMs of the same derived class as "t...
const char * Name() const
virtual void Format(OUTPUTFORMATTER *out, int nestLevel)
Write this object as ASCII out to an OUTPUTFORMATTER according to the SPECCTRA DSN format.
ELEM(DSN_T aType, ELEM *aParent=nullptr)
void SetParent(ELEM *aParent)
virtual UNIT_RES * GetUnits() const
Return the units for this section.
virtual void FormatContents(OUTPUTFORMATTER *out, int nestLevel)
Write the contents as ASCII out to an OUTPUTFORMATTER according to the SPECCTRA DSN format.
static STRING_FORMATTER sf
boost::ptr_vector< LAYER_RULE > m_layer_rules
void Format(OUTPUTFORMATTER *out, int nestLevel) override
Write this object as ASCII out to an OUTPUTFORMATTER according to the SPECCTRA DSN format.
DSN_T m_grid_type
T_via | T_wire | T_via_keepout | T_place | T_snap.
DSN_T m_direction
T_x | T_y | -1 for both.
void Format(OUTPUTFORMATTER *out, int nestLevel) override
Write this object as ASCII out to an OUTPUTFORMATTER according to the SPECCTRA DSN format.
std::vector< std::string > comments
void FormatContents(OUTPUTFORMATTER *out, int nestLevel) override
Write the contents as ASCII out to an OUTPUTFORMATTER according to the SPECCTRA DSN format.
std::string m_hash
a hash string used by Compare(), not Format()ed/exported.
static int Compare(IMAGE *lhs, IMAGE *rhs)
Compare two objects of this type and returns <0, 0, or >0.
UNIT_RES * GetUnits() const override
Return the units for this section.
void FormatContents(OUTPUTFORMATTER *out, int nestLevel) override
Write the contents as ASCII out to an OUTPUTFORMATTER according to the SPECCTRA DSN format.
void Format(OUTPUTFORMATTER *out, int nestLevel) override
Write this object as ASCII out to an OUTPUTFORMATTER according to the SPECCTRA DSN format.
boost::ptr_vector< KEEPOUT > m_keepouts
int m_duplicated
no. times this image_id is duplicated
boost::ptr_vector< PIN > m_pins
Used for <keepout_descriptor> and <plane_descriptor>.
void AddWindow(WINDOW *aWindow)
KEEPOUT(ELEM *aParent, DSN_T aType)
Require a DSN_T because this class is used for T_place_keepout, T_via_keepout, T_wire_keepout,...
boost::ptr_vector< WINDOW > m_windows
void SetShape(ELEM *aShape)
void Format(OUTPUTFORMATTER *out, int nestLevel) override
Write this object as ASCII out to an OUTPUTFORMATTER according to the SPECCTRA DSN format.
LAYER_NOISE_WEIGHT(ELEM *aParent)
SPECCTRA_LAYER_PAIRS layer_pairs
void Format(OUTPUTFORMATTER *out, int nestLevel) override
Write this object as ASCII out to an OUTPUTFORMATTER according to the SPECCTRA DSN format.
LAYER_RULE(ELEM *aParent)
void Format(OUTPUTFORMATTER *out, int nestLevel) override
Write this object as ASCII out to an OUTPUTFORMATTER according to the SPECCTRA DSN format.
std::vector< std::string > m_layer_ids
DSN_T layer_type
one of: T_signal, T_power, T_mixed, T_jumper
std::vector< std::string > use_net
int cost_type
T_length | T_way.
int direction
[forbidden | high | medium | low | free | <positive_integer> | -1]
void Format(OUTPUTFORMATTER *out, int nestLevel) override
Write this object as ASCII out to an OUTPUTFORMATTER according to the SPECCTRA DSN format.
A <library_descriptor> in the specctra dsn specification.
boost::ptr_vector< PADSTACK > m_padstacks
all except vias, which are in 'vias'
PADSTACK * LookupVia(PADSTACK *aVia)
Add the via only if one exactly like it does not already exist in the padstack container.
PADSTACK * FindPADSTACK(const std::string &aPadstackId)
Search the padstack container by name.
void FormatContents(OUTPUTFORMATTER *out, int nestLevel) override
Write the contents as ASCII out to an OUTPUTFORMATTER according to the SPECCTRA DSN format.
void AppendVia(PADSTACK *aVia)
Add aVia to the internal via container.
int FindIMAGE(IMAGE *aImage)
Search this LIBRARY for an image which matches the argument.
UNIT_RES * GetUnits() const override
Return the units for this section.
boost::ptr_vector< IMAGE > m_images
IMAGE * LookupIMAGE(IMAGE *aImage)
Add the image only if one exactly like it does not already exist in the image container.
void AppendPADSTACK(PADSTACK *aPadstack)
Add the padstack to the padstack container.
boost::ptr_vector< PADSTACK > m_vias
LIBRARY(ELEM *aParent, DSN_T aType=T_library)
void AddPadstack(PADSTACK *aPadstack)
void AppendIMAGE(IMAGE *aImage)
Add the image to the image list.
int FindVia(PADSTACK *aVia)
Search this LIBRARY for a via which matches the argument.
boost::ptr_vector< NET > m_nets
boost::ptr_vector< CLASS > m_classes
void FormatContents(OUTPUTFORMATTER *out, int nestLevel) override
Write the contents as ASCII out to an OUTPUTFORMATTER according to the SPECCTRA DSN format.
A <net_out_descriptor> of the specctra dsn spec.
boost::ptr_vector< WIRE > wires
boost::ptr_vector< WIRE_VIA > wire_vias
void Format(OUTPUTFORMATTER *out, int nestLevel) override
Write this object as ASCII out to an OUTPUTFORMATTER according to the SPECCTRA DSN format.
boost::ptr_vector< SUPPLY_PIN > supply_pins
A <net_descriptor> in the DSN spec.
std::vector< PIN_REF > m_load
boost::ptr_vector< FROMTO > m_fromtos
std::vector< PIN_REF > m_pins
std::vector< PIN_REF > m_noexpose
std::vector< PIN_REF > m_source
std::vector< PIN_REF > m_expose
int FindPIN_REF(const std::string &aComponent)
std::vector< PIN_REF > m_terminator
DSN_T m_type
T_fix | T_normal.
DSN_T m_supply
T_power | T_ground.
boost::ptr_vector< LAYER_RULE > m_layer_rules
void Format(OUTPUTFORMATTER *out, int nestLevel) override
Write this object as ASCII out to an OUTPUTFORMATTER according to the SPECCTRA DSN format.
COMP_ORDER * m_comp_order
DSN_T m_pins_type
T_pins | T_order, type of field 'pins' below.
Hold either a via or a pad definition.
const std::string & GetPadstackId()
void FormatContents(OUTPUTFORMATTER *out, int nestLevel) override
Write the contents as ASCII out to an OUTPUTFORMATTER according to the SPECCTRA DSN format.
std::string m_hash
a hash string used by Compare(), not Format()ed/exported.
void Format(OUTPUTFORMATTER *out, int nestLevel) override
Write this object as ASCII out to an OUTPUTFORMATTER according to the SPECCTRA DSN format.
PADSTACK()
Cannot take ELEM* aParent because PADSTACKSET confuses this with a copy constructor and causes havoc.
std::string m_padstack_id
void SetPadstackId(const char *aPadstackId)
static int Compare(PADSTACK *lhs, PADSTACK *rhs)
Compare two objects of this type and returns <0, 0, or >0.
UNIT_RES * GetUnits() const override
Return the units for this section.
A configuration record per the SPECCTRA DSN file spec.
void FormatContents(OUTPUTFORMATTER *out, int nestLevel) override
Write the contents as ASCII out to an OUTPUTFORMATTER according to the SPECCTRA DSN format.
std::vector< std::string > constants
This holds pairs of strings, one pair for each constant definition.
bool routes_include_image_conductor
bool routes_include_guides
bool wires_include_testpoint
bool routes_include_testpoint
bool generated_by_freeroute
bool space_in_quoted_tokens
Support both the <path_descriptor> and the <polygon_descriptor> per the specctra dsn spec.
std::vector< POINT > & GetPoints()
std::vector< POINT > points
PATH(ELEM *aParent, DSN_T aType=T_path)
void SetLayerId(const std::string &aLayerId)
void SetAperture(double aWidth)
void Format(OUTPUTFORMATTER *out, int nestLevel) override
Write this object as ASCII out to an OUTPUTFORMATTER according to the SPECCTRA DSN format.
void AppendPoint(const POINT &aPoint)
void Format(OUTPUTFORMATTER *out, int nestLevel) override
Write this object as ASCII out to an OUTPUTFORMATTER according to the SPECCTRA DSN format.
PCB(ELEM *aParent=nullptr)
UNIT_RES * GetUnits() const override
Return the units for this section.
void SetVertex(const POINT &aPoint)
void Format(OUTPUTFORMATTER *out, int nestLevel) override
Write this object as ASCII out to an OUTPUTFORMATTER according to the SPECCTRA DSN format.
int m_kiNetCode
KiCad netcode.
void SetRotation(double aRotation)
std::string m_padstack_id
void FormatContents(OUTPUTFORMATTER *out, int nestLevel) override
Write the contents as ASCII out to an OUTPUTFORMATTER according to the SPECCTRA DSN format.
UNIT_RES * GetUnits() const override
Return the units for this section.
COMPONENT * LookupCOMPONENT(const std::string &imageName)
Look up a COMPONENT by name.
boost::ptr_vector< COMPONENT > m_components
Implement a <placement_reference> in the specctra dsn spec.
void SetVertex(const POINT &aVertex)
void Format(OUTPUTFORMATTER *out, int nestLevel) override
Write this object as ASCII out to an OUTPUTFORMATTER according to the SPECCTRA DSN format.
void SetRotation(double aRotation)
std::string m_logical_part
std::string m_part_number
std::string m_component_id
reference designator
void Format(OUTPUTFORMATTER *out, int nestLevel) override
Write this object as ASCII out to an OUTPUTFORMATTER according to the SPECCTRA DSN format.
void SetStart(const POINT &aStart)
void SetLayerId(std::string &aLayerId)
void SetCenter(const POINT &aCenter)
void SetEnd(const POINT &aEnd)
void Format(OUTPUTFORMATTER *out, int nestLevel) override
Write this object as ASCII out to an OUTPUTFORMATTER according to the SPECCTRA DSN format.
void SetLayerId(std::string &aLayerId)
void SetCorners(const POINT &aPoint0, const POINT &aPoint1)
POINT point0
one of two opposite corners
void FormatContents(OUTPUTFORMATTER *out, int nestLevel) override
Write the contents as ASCII out to an OUTPUTFORMATTER according to the SPECCTRA DSN format.
STRUCTURE_OUT * structure_out
UNIT_RES * GetUnits() const override
Return the units for this section.
void FormatContents(OUTPUTFORMATTER *out, int nestLevel) override
Write the contents as ASCII out to an OUTPUTFORMATTER according to the SPECCTRA DSN format.
boost::ptr_vector< NET_OUT > net_outs
A <rule_descriptor> in the specctra dsn spec.
void Format(OUTPUTFORMATTER *out, int nestLevel) override
Write this object as ASCII out to an OUTPUTFORMATTER according to the SPECCTRA DSN format.
RULE(ELEM *aParent, DSN_T aType)
std::vector< std::string > m_rules
rules are saved in std::string form.
A <session_file_descriptor> in the specctra dsn spec.
void Format(OUTPUTFORMATTER *out, int nestLevel) override
Write this object as ASCII out to an OUTPUTFORMATTER according to the SPECCTRA DSN format.
SESSION(ELEM *aParent=nullptr)
A "(shape ..)" element in the specctra dsn spec.
SHAPE(ELEM *aParent, DSN_T aType=T_shape)
Takes a DSN_T aType of T_outline.
void SetConnect(DSN_T aConnect)
boost::ptr_vector< WINDOW > m_windows
void Format(OUTPUTFORMATTER *out, int nestLevel) override
Write this object as ASCII out to an OUTPUTFORMATTER according to the SPECCTRA DSN format.
PADSTACK * makeVia(const ::PCB_VIA *aVia)
Make any kind of PADSTACK using the given KiCad VIA.
void doUNIT(UNIT_RES *growth)
int m_top_via_layer
specctra cu layers, 0 based index:
void doCOMPONENT(COMPONENT *growth)
IMAGE * makeIMAGE(BOARD *aBoard, FOOTPRINT *aFootprint)
Allocates an I#MAGE on the heap and creates all the PINs according to the PADs in the FOOTPRINT.
void doWAS_IS(WAS_IS *growth)
void doPLACEMENT(PLACEMENT *growth)
void doNET_OUT(NET_OUT *growth)
void buildLayerMaps(BOARD *aBoard)
Create a few data translation structures for layer name and number mapping between the DSN::PCB struc...
PCB_TRACK * makeTRACK(WIRE *wire, PATH *aPath, int aPointIndex, int aNetcode)
Create a TRACK form the PATH and BOARD info.
void doCLASS(CLASS *growth)
void SetSESSION(SESSION *aSession)
Delete any existing SESSION and replaces it with the given one.
void doSTRUCTURE_OUT(STRUCTURE_OUT *growth)
std::map< int, PCB_LAYER_ID > m_pcbLayer2kicad
maps PCB layer number to BOARD layer numbers
void doCIRCLE(CIRCLE *growth)
void doANCESTOR(ANCESTOR *growth)
void doLAYER_NOISE_WEIGHT(LAYER_NOISE_WEIGHT *growth)
void ExportPCB(const wxString &aFilename, bool aNameChange=false)
Write the internal PCB instance out as a SPECTRA DSN format file.
void doCLASS_CLASS(CLASS_CLASS *growth)
void doSESSION(SESSION *growth)
void doWINDOW(WINDOW *growth)
UNIT_RES * m_routeResolution
used during FromSESSION() only, memory for it is not owned here.
SHAPE_POLY_SET m_brd_outlines
void doSHAPE(SHAPE *growth)
BOARD * m_sessionBoard
a copy to avoid passing as an argument, memory for it is not owned here.
void FlipFOOTPRINTs(BOARD *aBoard)
Flip the footprints which are on the back side of the board to the front.
void doQARC(QARC *growth)
void doRESOLUTION(UNIT_RES *growth)
void LoadPCB(const wxString &aFilename)
A recursive descent parser for a SPECCTRA DSN "design" file.
void FromSESSION(BOARD *aBoard, COMMIT &aCommit)
Add the entire SESSION info to a BOARD but does not write it out.
void doSTRINGPROP(STRINGPROP *growth)
void doBOUNDARY(BOUNDARY *growth)
void doSPECCTRA_LAYER_PAIR(SPECCTRA_LAYER_PAIR *growth)
bool m_footprintsAreFlipped
void doRECTANGLE(RECTANGLE *growth)
void deleteNETs()
Delete all the NETs that may be in here.
void doREGION(REGION *growth)
void fillBOUNDARY(BOARD *aBoard, BOUNDARY *aBoundary)
Make the board perimeter for the DSN file by filling the BOUNDARY element in the specctra element tre...
void ExportSESSION(const wxString &aFilename)
Write the internal SESSION instance out as a #SPECTRA DSN format file.
void doWIRE(WIRE *growth)
static const KICAD_T scanPADs[]
PADSTACK * makePADSTACK(BOARD *aBoard, PAD *aPad)
Create a PADSTACK which matches the given pad.
void SetPCB(PCB *aPcb)
Delete any existing PCB and replaces it with the given one.
void doTOKPROP(TOKPROP *growth)
std::vector< std::string > m_layerIds
indexed by PCB layer number
void doIMAGE(IMAGE *growth)
void doCONNECT(CONNECT *growth)
void doCOMP_ORDER(COMP_ORDER *growth)
static PCB * MakePCB()
Make a PCB with all the default ELEMs and parts on the heap.
void doTOPOLOGY(TOPOLOGY *growth)
void doKEEPOUT(KEEPOUT *growth)
void doRULE(RULE *growth)
void doPATH(PATH *growth)
void doSUPPLY_PIN(SUPPLY_PIN *growth)
void doLAYER(LAYER *growth)
bool BuiltBoardOutlines(BOARD *aBoard)
Build the board outlines and store it in m_brd_outlines.
void LoadSESSION(const wxString &aFilename)
A recursive descent parser for a SPECCTRA DSN "session" file.
void doLIBRARY(LIBRARY *growth)
void exportNETCLASS(const NETCLASS *aNetClass, const BOARD *aBoard)
Export aNetClass to the DSN file.
PADSTACK * makeVia(int aCopperDiameter, int aDrillDiameter, int aTopLayer, int aBotLayer)
Make a round through hole PADSTACK using the given KiCad diameter in deci-mils.
boost::ptr_set< PADSTACK > m_padstackset
std::map< PCB_LAYER_ID, int > m_kicadLayer2pcb
maps BOARD layer number to PCB layer numbers
std::vector< NET * > m_nets
we don't want ownership here permanently, so we don't use boost::ptr_vector
void doFROMTO(FROMTO *growth)
void doPLACE(PLACE *growth)
void doGRID(GRID *growth)
void doLAYER_RULE(LAYER_RULE *growth)
void doWIRE_VIA(WIRE_VIA *growth)
void doCLASSES(CLASSES *growth)
void readCOMPnPIN(std::string *component_id, std::string *pid_id)
Read a <pin_reference> and splits it into the two parts which are on either side of the hyphen.
PCB_VIA * makeVIA(WIRE_VIA *aVia, PADSTACK *aPadstack, const POINT &aPoint, int aNetCode, int aViaDrillDefault)
Instantiate a KiCad VIA on the heap and initializes it with internal values consistent with the given...
PCB_ARC * makeARC(WIRE *wire, QARC *aQarc, int aNetcode)
Create an ARC form the PATH and BOARD info.
void FromBOARD(BOARD *aBoard)
Add the entire BOARD to the PCB but does not write it out.
void doPARSER(PARSER *growth)
void doNETWORK(NETWORK *growth)
void RevertFOOTPRINTs(BOARD *aBoard)
Flip the footprints which were on the back side of the board back to the back.
void doSTRUCTURE(STRUCTURE *growth)
int findLayerName(const std::string &aLayerName) const
Return the PCB layer index for a given layer name, within the specctra sessionfile.
void doROUTE(ROUTE *growth)
void readTIME(time_t *time_stamp)
Read a <time_stamp> which consists of 8 lexer tokens: "month date hour : minute : second year".
void doPADSTACK(PADSTACK *growth)
void doWIRING(WIRING *growth)
static const KEYWORD keywords[]
specctra DSN keywords
void doHISTORY(HISTORY *growth)
void doCONTROL(CONTROL *growth)
void doPROPERTIES(PROPERTIES *growth)
SPECCTRA_LAYER_PAIR(ELEM *aParent)
void Format(OUTPUTFORMATTER *out, int nestLevel) override
Write this object as ASCII out to an OUTPUTFORMATTER according to the SPECCTRA DSN format.
A container for a single property whose value is a string.
STRINGPROP(ELEM *aParent, DSN_T aType)
void Format(OUTPUTFORMATTER *out, int nestLevel) override
Write this object as ASCII out to an OUTPUTFORMATTER according to the SPECCTRA DSN format.
STRUCTURE_OUT(ELEM *aParent)
boost::ptr_vector< LAYER > m_layers
void FormatContents(OUTPUTFORMATTER *out, int nestLevel) override
Write the contents as ASCII out to an OUTPUTFORMATTER according to the SPECCTRA DSN format.
boost::ptr_vector< REGION > m_regions
boost::ptr_vector< GRID > m_grids
boost::ptr_vector< KEEPOUT > m_keepouts
UNIT_RES * GetUnits() const override
Return the units for this section.
LAYER_NOISE_WEIGHT * m_layer_noise_weight
void FormatContents(OUTPUTFORMATTER *out, int nestLevel) override
Write the contents as ASCII out to an OUTPUTFORMATTER according to the SPECCTRA DSN format.
void SetBOUNDARY(BOUNDARY *aBoundary)
BOUNDARY * m_place_boundary
boost::ptr_vector< COPPER_PLANE > m_planes
void SetPlaceBOUNDARY(BOUNDARY *aBoundary)
boost::ptr_vector< LAYER > m_layers
A <supply_pin_descriptor> in the specctra dsn spec.
std::vector< PIN_REF > pin_refs
void Format(OUTPUTFORMATTER *out, int nestLevel) override
Write this object as ASCII out to an OUTPUTFORMATTER according to the SPECCTRA DSN format.
SUPPLY_PIN(ELEM *aParent)
A container for a single property whose value is another DSN_T token.
void Format(OUTPUTFORMATTER *out, int nestLevel) override
Write this object as ASCII out to an OUTPUTFORMATTER according to the SPECCTRA DSN format.
TOKPROP(ELEM *aParent, DSN_T aType)
boost::ptr_vector< COMP_ORDER > m_comp_orders
void FormatContents(OUTPUTFORMATTER *out, int nestLevel) override
Write the contents as ASCII out to an OUTPUTFORMATTER according to the SPECCTRA DSN format.
boost::ptr_vector< FROMTO > m_fromtos
A holder for either a T_unit or T_resolution object which are usually mutually exclusive in the dsn g...
UNIT_RES(ELEM *aParent, DSN_T aType)
static UNIT_RES Default
A static instance which holds the default units of T_inch and 2540000.
DSN_T GetEngUnits() const
void Format(OUTPUTFORMATTER *out, int nestLevel) override
Write this object as ASCII out to an OUTPUTFORMATTER according to the SPECCTRA DSN format.
A <via_descriptor> in the specctra dsn spec.
std::vector< std::string > m_spares
std::vector< std::string > m_padstacks
void Format(OUTPUTFORMATTER *out, int nestLevel) override
Write this object as ASCII out to an OUTPUTFORMATTER according to the SPECCTRA DSN format.
void AppendVia(const char *aViaName)
A <was_is_descriptor> in the specctra dsn spec.
void FormatContents(OUTPUTFORMATTER *out, int nestLevel) override
Write the contents as ASCII out to an OUTPUTFORMATTER according to the SPECCTRA DSN format.
std::vector< PIN_PAIR > pin_pairs
void Format(OUTPUTFORMATTER *out, int nestLevel) override
Write this object as ASCII out to an OUTPUTFORMATTER according to the SPECCTRA DSN format.
WINDOW(ELEM *aParent, DSN_T aType=T_window)
void SetShape(ELEM *aShape)
A <wire_via_descriptor> in the specctra dsn spec.
std::string m_padstack_id
void Format(OUTPUTFORMATTER *out, int nestLevel) override
Write this object as ASCII out to an OUTPUTFORMATTER according to the SPECCTRA DSN format.
std::string m_virtual_pin_name
std::vector< std::string > m_contact_layers
const std::string & GetPadstackId()
std::vector< POINT > m_vertexes
A <wire_shape_descriptor> in the specctra dsn spec.
void AddWindow(WINDOW *aWindow)
boost::ptr_vector< WINDOW > m_windows
void SetShape(ELEM *aShape)
void Format(OUTPUTFORMATTER *out, int nestLevel) override
Write this object as ASCII out to an OUTPUTFORMATTER according to the SPECCTRA DSN format.
A <wiring_descriptor> in the specctra dsn spec.
boost::ptr_vector< WIRE > wires
boost::ptr_vector< WIRE_VIA > wire_vias
void FormatContents(OUTPUTFORMATTER *out, int nestLevel) override
Write the contents as ASCII out to an OUTPUTFORMATTER according to the SPECCTRA DSN format.
UNIT_RES * GetUnits() const override
Return the units for this section.
A collection of nets and the parameters used to route or test these nets.
Represent a set of closed polygons.
This source file implements export and import capabilities to the specctra dsn file format.
boost::ptr_vector< PATH > PATHS
boost::ptr_vector< CLASS > CLASSLIST
boost::ptr_vector< COMP_ORDER > COMP_ORDERS
bool operator<(const PADSTACK &lhs, const PADSTACK &rhs)
Used by the PADSTACKSET boost::ptr_set below.
const char * GetTokenText(T aTok)
The DSN namespace and returns the C string representing a SPECCTRA_DB::keyword.
std::vector< PROPERTY > PROPERTIES
void ExportBoardToSpecctraFile(BOARD *aBoard, const wxString &aFullFilename)
Helper method to export board to DSN file.
bool ImportSpecctraSession(BOARD *aBoard, const wxString &fullFileName, COMMIT &aCommit)
Helper method to import SES file to a board.
boost::ptr_vector< ANCESTOR > ANCESTORS
boost::ptr_vector< COPPER_PLANE > COPPER_PLANES
boost::ptr_vector< SPECCTRA_LAYER_PAIR > SPECCTRA_LAYER_PAIRS
boost::ptr_set< PADSTACK > PADSTACKSET
Used within the WAS_IS class below to hold a pair of PIN_REFs and corresponds to the (pins was is) co...
PIN_PAIR(ELEM *aParent=nullptr)
A <pin_reference> definition in the specctra dsn spec.
int FormatIt(OUTPUTFORMATTER *out, int nestLevel)
Like Format() but is not virtual.
A point in the SPECCTRA DSN coordinate system.
POINT & operator=(const POINT &other)
void FixNegativeZero()
Change negative zero to positive zero in the IEEE floating point storage format.
bool operator!=(const POINT &other) const
bool operator==(const POINT &other) const
void Format(OUTPUTFORMATTER *out, int nestLevel) const
Write this object as ASCII out to an OUTPUTFORMATTER according to the SPECCTRA DSN format.
POINT(double aX, double aY)
POINT & operator+=(const POINT &other)
void Format(OUTPUTFORMATTER *out, int nestLevel) const
Write this object as ASCII out to an OUTPUTFORMATTER according to the SPECCTRA DSN format.
Hold a keyword string and its unique integer token.
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.