43 if(
T* record = std::get_if<T>( &aResult.
record ) )
45 aTarget.push_back( std::move( *record ) );
58 for( uint16_t i = 0; i < count; i++ )
61 takeRecord(
result, aTarget );
69 const std::vector<std::string>& aStrings,
80 THROW_IO_ERROR( wxString::Format( wxS(
"OrCAD page stream: expected Page structure, "
96 uint16_t count = stream.
ReadU16();
98 for( uint16_t i = 0; i < count; i++ )
103 for( uint16_t i = 0; i < count; i++ )
109 for( uint16_t i = 0; i < count; i++ )
111 std::string netName = stream.
ReadLzt();
112 uint32_t netId = stream.
ReadU32();
114 page.
netmap[netId] = netName;
117 readStructureList( reader, page.
wires );
122 for( uint16_t i = 0; i < count; i++ )
130 readStructureList( reader, page.
ports );
135 for( uint16_t i = 0; i < count; i++ )
144 for( uint16_t i = 0; i < count; i++ )
153 readStructureList( reader, page.
graphics );
169 uint16_t count = stream.
ReadU16();
171 std::vector<std::string> names;
172 names.reserve( count );
174 for( uint16_t i = 0; i < count; i++ )
175 names.push_back( stream.
ReadLzt() );
178 std::reverse( names.begin(), names.end() );
185 const std::vector<std::string>& aStrings,
187 std::map<uint32_t, std::string>*
190 std::map<uint32_t, std::string> links;
208 pos = preamblePos + 4;
212 stream.
Seek( *start );
220 uint32_t instDbId = stream.
ReadU32();
222 stream.
ExpectByte( 0x42, wxS(
"hierarchy link inner frame" ) );
229 std::string child = stream.
ReadLzt();
230 std::string occurrenceRef = stream.
ReadLzt();
233 links[instDbId] = child;
235 if( aOccurrenceRefs && !occurrenceRef.empty() )
236 ( *aOccurrenceRefs )[instDbId] = occurrenceRef;
238 pos = std::max( stream.
GetOffset(), preamblePos + 4 );
240 if( prefixes.
end != 0 && prefixes.
end > pos )
245 pos = preamblePos + 4;
257 uint8_t type = aStream.
ReadU8();
261 THROW_IO_ERROR( wxS(
"occurrence record: long-prefix pad not zero" ) );
263 if( aStream.
ReadU8() != type )
264 THROW_IO_ERROR( wxS(
"occurrence record: short-prefix type mismatch" ) );
266 int16_t propCount = aStream.
ReadI16();
268 for(
int i = 0; i < std::max<int>( propCount, 0 ); i++ )
277 if( aExpectType >= 0 && type != aExpectType )
278 THROW_IO_ERROR( wxString::Format( wxS(
"occurrence record type %d != expected %d" ),
279 (
int) type, aExpectType ) );
293 uint32_t targetDbId = aStream.
ReadU32();
295 aStream.
ExpectByte( 0x42, wxS(
"occurrence inner marker" ) );
300 std::string child = aStream.
ReadLzt();
301 std::string ref = aStream.
ReadLzt();
305 uint16_t pinCount = aStream.
ReadU16();
307 for( uint16_t i = 0; i < pinCount; i++ )
321 block.
scope = std::move( nested );
322 aScope.
blocks.push_back( std::move( block ) );
324 else if( !ref.empty() )
337 uint16_t netCount = aStream.
ReadU16();
339 for( uint16_t i = 0; i < netCount; i++ )
346 uint16_t titleBlockCount = aStream.
ReadU16();
348 for( uint16_t i = 0; i < titleBlockCount; i++ )
355 uint32_t globalCount = aStream.
ReadU32();
357 for( uint32_t i = 0; i < globalCount; i++ )
370 uint16_t occCount = aStream.
ReadU16();
372 for( uint16_t i = 0; i < occCount; i++ )
384static std::string
v2Resolve(
const std::vector<std::string>& aStrings, uint16_t aIdx )
386 return ( aIdx != 0xFFFF && aIdx < aStrings.size() ) ? aStrings[aIdx] : std::string();
399 if( aCount > 30000 || aCount > aStream.
Remaining() )
401 THROW_IO_ERROR( wxString::Format( wxS(
"v2 repeat count %u exceeds the sane bound "
402 "(%zu bytes remain)" ),
410 std::map<std::string, std::string>* aProps =
nullptr )
412 uint8_t type = aStream.
ReadU8();
413 int16_t count = aStream.
ReadI16();
416 THROW_IO_ERROR( wxString::Format( wxS(
"v2 prefix: absurd property count %d" ), count ) );
418 for(
int i = 0; i < count; i++ )
420 uint16_t nameIdx = aStream.
ReadU16();
421 uint16_t valueIdx = aStream.
ReadU16();
432 const std::vector<std::string>& aStrings )
442 uint16_t rotFont = aStream.
ReadU16();
443 prop.
fontIdx = rotFont & 0x3FFF;
444 prop.
rotation = ( rotFont >> 14 ) & 0x3;
454 aStream.
ExpectByte( 0x00, wxS(
"v2 display prop terminator" ) );
462 const std::vector<std::string>& aStrings )
464 std::vector<ORCAD_DISPLAY_PROP> props;
465 uint16_t count = aStream.
ReadU16();
467 for( uint16_t i = 0; i < count; i++ )
495 uint8_t type =
v2Prefix( aStream, aStrings );
508 uint16_t aliasCount = aStream.
ReadU16();
510 for( uint16_t i = 0; i < aliasCount; i++ )
513 uint16_t propCount = aStream.
ReadU16();
515 for( uint16_t i = 0; i < propCount; i++ )
539 const std::vector<std::string>& aStrings )
561 uint8_t orientation = aStream.
ReadU8();
563 inst.
mirror = ( orientation & 0x4 ) != 0;
572 uint16_t pinCount = aStream.
ReadU16();
574 for( uint16_t i = 0; i < pinCount; i++ )
594 const std::vector<std::string>& aStrings )
604 uint16_t primCount = aStream.
ReadU16();
606 for( uint16_t i = 0; i < primCount; i++ )
626 uint8_t type = aType;
682 uint16_t count = aStream.
ReadU16();
685 for( uint16_t i = 0; i < count; i++ )
701 int16_t nProp = aStream.
ReadI16();
703 for(
int i = 0; i < std::max<int>( nProp, 0 ); i++ )
713 uint16_t nested = aStream.
ReadU16();
716 for( uint16_t i = 0; i < nested; i++ )
718 uint8_t nestedType = aStream.
ReadU8();
719 aStream.
ExpectByte( 0x00, wxS(
"v2 vector prim pad" ) );
741 THROW_IO_ERROR( wxString::Format( wxS(
"v2 primitive: unhandled type %d" ), (
int) type ) );
749 const std::vector<std::string>& aStrings )
754 uint16_t nameIdx = aStream.
ReadU16();
773 uint8_t orientation = aStream.
ReadU8();
775 inst.
mirror = ( orientation & 0x4 ) != 0;
783 inst.
nested = std::make_unique<ORCAD_SYMBOL_DEF>(
v2SymbolDef( aStream, aStrings ) );
791 switch( aStream.
PeekU8() )
802 THROW_IO_ERROR( wxString::Format( wxS(
"v2 nested structure: unhandled type %d" ),
820 if( aStream.
PeekU8() == 0x00 )
826 uint8_t type =
v2Prefix( aStream, aStrings );
836 aStream.
ExpectByte( type, wxS(
"v2 pin type echo" ) );
839 uint16_t dispCount = aStream.
ReadU16();
842 for( uint16_t i = 0; i < dispCount; i++ )
851 const std::vector<std::string>& aStrings,
int aTypeId )
859 uint16_t primCount = aStream.
ReadU16();
862 for( uint16_t i = 0; i < primCount; i++ )
872 uint16_t pinCount = aStream.
ReadU16();
875 for( uint16_t i = 0; i < pinCount; i++ )
880 def.
pins.push_back( std::move(
pin ) );
883 uint16_t dispCount = aStream.
ReadU16();
886 for( uint16_t i = 0; i < dispCount; i++ )
911 uint16_t viewCount = aStream.
ReadU16();
914 for( uint16_t i = 0; i < viewCount; i++ )
917 uint16_t symbolCount = aStream.
ReadU16();
920 for( uint16_t i = 0; i < symbolCount; i++ )
931 cell.
symbols.push_back( std::move( def ) );
946 uint16_t pinCount = aStream.
ReadU16();
949 static const uint8_t emptySlot[2] = { 0xFF, 0xFF };
951 for( uint16_t i = 0; i < pinCount; i++ )
980 uint16_t deviceCount = aStream.
ReadU16();
983 for( uint16_t i = 0; i < deviceCount; i++ )
991 const std::vector<std::string>& aStrings,
997 uint8_t type =
v2Prefix( stream, aStrings );
1000 THROW_IO_ERROR( wxString::Format( wxS(
"v2 page: unexpected root type %d" ), (
int) type ) );
1010 uint16_t titleBlockCount = stream.
ReadU16();
1012 for( uint16_t i = 0; i < titleBlockCount; i++ )
1018 uint16_t allNetCount = stream.
ReadU16();
1020 for( uint16_t i = 0; i < allNetCount; i++ )
1026 uint16_t netGroupCount = stream.
ReadU16();
1028 for( uint16_t i = 0; i < netGroupCount; i++ )
1034 uint16_t memberCount = stream.
ReadU16();
1037 for( uint16_t j = 0; j < memberCount; j++ )
1043 uint16_t netmapCount = stream.
ReadU16();
1045 for( uint16_t i = 0; i < netmapCount; i++ )
1047 std::string netName = stream.
ReadLzt();
1051 uint16_t wireCount = stream.
ReadU16();
1053 for( uint16_t i = 0; i < wireCount; i++ )
1054 page.
wires.push_back(
v2Wire( stream, aStrings ) );
1056 uint16_t instanceCount = stream.
ReadU16();
1058 for( uint16_t i = 0; i < instanceCount; i++ )
1061 uint16_t portCount = stream.
ReadU16();
1063 for( uint16_t i = 0; i < portCount; i++ )
1069 uint16_t globalCount = stream.
ReadU16();
1071 for( uint16_t i = 0; i < globalCount; i++ )
1077 uint16_t offPageCount = stream.
ReadU16();
1079 for( uint16_t i = 0; i < offPageCount; i++ )
1085 uint16_t ercCount = stream.
ReadU16();
1087 for( uint16_t i = 0; i < ercCount; i++ )
1095 uint16_t busEntryCount = stream.
ReadU16();
1097 for( uint16_t i = 0; i < busEntryCount; i++ )
1110 uint16_t graphicCount = stream.
ReadU16();
1112 for( uint16_t i = 0; i < graphicCount; i++ )
1120 const std::vector<std::string>& aStrings,
1121 std::map<std::string, ORCAD_SYMBOL_DEF>& aSymbols )
1125 for(
bool shortDisp : {
false,
true } )
1132 uint8_t type =
v2Prefix( stream, aStrings );
1138 if( !def.
name.empty() )
1139 aSymbols.emplace( def.
name, std::move( def ) );
1157 const std::vector<std::string>& aStrings,
1158 std::map<std::string, ORCAD_SYMBOL_DEF>& aSymbols,
1159 std::map<std::string, ORCAD_PACKAGE>& aPackages )
1161 for(
bool shortDisp : {
false,
true } )
1168 uint16_t partCount = stream.
ReadU16();
1170 std::vector<V2_PART_CELL> cells;
1172 for( uint16_t i = 0; i < partCount; i++ )
1173 cells.push_back(
v2PartCell( stream, aStrings ) );
1186 if( !def.
name.empty() )
1187 aSymbols.emplace( def.
name, def );
1190 if( pkg.
refDes.empty() && !cell.refDesPrefix.empty() )
1191 pkg.
refDes = cell.refDesPrefix;
1194 if( !pkg.
name.empty() )
1195 aPackages.emplace( pkg.
name, std::move( pkg ) );
1217 if( aData.size() < 9 || (uint8_t) aData[0] != 0x42 || aData[5] || aData[6] || aData[7]
1236 aWarn( wxString::Format( wxS(
"The design occurrence tree could not be fully read (%s); "
1237 "reference designators fall back to the placed instances." ),
Hold an error message and may be used when throwing exceptions containing meaningful error messages.
virtual const wxString What() const
A composite of Problem() and Where()
Little-endian byte cursor over one OrCAD Capture DSN stream.
void ExpectPreamble(const wxString &aWhat)
Consume the 4 preamble bytes; throws IO_ERROR naming aWhat when absent.
size_t Remaining() const
Bytes left; 0 when the cursor is at or past the end.
int PeekU8(size_t aAhead=0) const
Peek one byte at cursor + aAhead without advancing.
size_t FindPreamble(size_t aFrom) const
Find the next preamble at or after the given absolute offset.
bool AtPreamble(size_t aAhead=0) const
True when the 4 preamble bytes FF E4 5C 39 sit at cursor + aAhead.
static constexpr size_t npos
Returned by FindPreamble() when no further preamble exists.
void Skip(size_t aCount)
Advance the cursor; throws IO_ERROR when aCount exceeds the remaining bytes.
std::string ReadLzt()
Read a length-prefixed zero-terminated string: u16 length, length content bytes, then a mandatory 0x0...
const uint8_t * Data() const
Raw buffer access for scan-and-backtrack parsers (cache/hierarchy walkers).
bool PeekMatches(const uint8_t *aBytes, size_t aCount, size_t aAhead=0) const
Compare aCount bytes at cursor + aAhead against aBytes without advancing.
void Seek(size_t aOffset)
Set the absolute cursor position.
void ExpectByte(uint8_t aValue, const wxString &aWhat)
Consume one byte and require the given value.
Stateful reader shared by all structure parsers.
ORCAD_READ_RESULT ReadStructure()
Read one structure of any type: prefixes, then the type-specific body via the reader dispatch below.
ORCAD_PREFIXES ReadPrefixes()
Discover the prefix count by trial from 10 down to 1 (longest chain first), then consume the prefixes...
#define THROW_IO_ERROR(msg)
macro which captures the "call site" values of FILE_, __FUNCTION & LINE
std::optional< size_t > OrcadFindStructureStart(const ORCAD_STREAM &aStream, size_t aPreamblePos)
Given the absolute position of a preamble magic, backtrack to find a valid prefix chain ending right ...
Parsers for the DSN 'Cache' stream and the 'Packages/<name>' streams: symbol definitions with graphic...
ORCAD_PAGE_SETTINGS OrcadParsePageSettings(ORCAD_STREAM &aStream)
Read one 156-byte PageSettings block at the current cursor (embedded both in the Library stream and i...
Parser for the DSN root 'Library' stream: format version, fonts, page settings and the global string ...
static ORCAD_PIN_INST v2PinInst(ORCAD_STREAM &aStream, const std::vector< std::string > &aStrings)
static std::string v2Resolve(const std::vector< std::string > &aStrings, uint16_t aIdx)
static void v2Structure(ORCAD_STREAM &aStream, const std::vector< std::string > &aStrings)
static ORCAD_PORT_TYPE v2PortType(uint32_t aRaw)
void OrcadParseOlbSymbolStreamV2(const std::vector< char > &aData, const std::vector< std::string > &aStrings, std::map< std::string, ORCAD_SYMBOL_DEF > &aSymbols)
Parse one v2.0 .OLB 'Symbols/<name>' stream (a single special symbol: power, port,...
static ORCAD_OCC_SCOPE readOccScope(ORCAD_STREAM &aStream)
static ORCAD_DISPLAY_PROP v2DisplayProp(ORCAD_STREAM &aStream, const std::vector< std::string > &aStrings)
static ORCAD_PACKAGE v2Package(ORCAD_STREAM &aStream, const std::vector< std::string > &aStrings)
std::map< uint32_t, std::string > OrcadReadHierarchyLinks(const std::vector< char > &aData, const std::vector< std::string > &aStrings, const ORCAD_WARN_FN &aWarn, std::map< uint32_t, std::string > *aOccurrenceRefs)
Parse a 'Views/<folder>/Hierarchy/Hierarchy' stream into block-instance links: block db id -> child f...
ORCAD_RAW_PAGE OrcadParsePageV2(const std::vector< char > &aData, const std::vector< std::string > &aStrings, const ORCAD_WARN_FN &)
Parse one v2.0 (pre-2003) 'Views/<folder>/Pages/<page>' stream.
static ORCAD_SYMBOL_DEF v2LibSymbolDef(ORCAD_STREAM &aStream, const std::vector< std::string > &aStrings, int aTypeId)
static void v2CheckCount(ORCAD_STREAM &aStream, uint32_t aCount)
static ORCAD_SYMBOL_DEF v2SymbolDef(ORCAD_STREAM &aStream, const std::vector< std::string > &aStrings)
static ORCAD_WIRE v2Wire(ORCAD_STREAM &aStream, const std::vector< std::string > &aStrings)
static ORCAD_GRAPHIC_INST v2GraphicInst(ORCAD_STREAM &aStream, const std::vector< std::string > &aStrings)
void OrcadParseOlbPackageStreamV2(const std::vector< char > &aData, const std::vector< std::string > &aStrings, std::map< std::string, ORCAD_SYMBOL_DEF > &aSymbols, std::map< std::string, ORCAD_PACKAGE > &aPackages)
Parse one v2.0 .OLB 'Packages/<name>' stream (a part's inline symbol definitions plus its package/dev...
static ORCAD_PRIMITIVE v2Primitive(ORCAD_STREAM &aStream)
static V2_PART_CELL v2PartCell(ORCAD_STREAM &aStream, const std::vector< std::string > &aStrings)
static ORCAD_ALIAS v2Alias(ORCAD_STREAM &aStream, const std::vector< std::string > &aStrings)
ORCAD_OCC_SCOPE OrcadReadOccurrenceTree(const std::vector< char > &aData, const ORCAD_WARN_FN &aWarn)
Parse the root folder 'Hierarchy/Hierarchy' stream into the full occurrence tree: per-scope part refe...
static uint8_t v2Prefix(ORCAD_STREAM &aStream, const std::vector< std::string > &aStrings, std::map< std::string, std::string > *aProps=nullptr)
static uint8_t readOccHeader(ORCAD_STREAM &aStream, int aExpectType)
std::vector< std::string > OrcadParsePageOrder(const std::vector< char > &aData)
Parse the 'Views/<folder>/Schematic' stream and return the folder's page names in display order.
static ORCAD_PLACED_INSTANCE v2PlacedInstance(ORCAD_STREAM &aStream, const std::vector< std::string > &aStrings)
static bool v2SymbolPin(ORCAD_STREAM &aStream, const std::vector< std::string > &aStrings, ORCAD_SYMBOL_PIN &aOut)
static thread_local bool g_v2ShortDisplayProp
static void readOccurrence(ORCAD_STREAM &aStream, ORCAD_OCC_SCOPE &aScope)
static std::vector< ORCAD_DISPLAY_PROP > v2DisplayPropList(ORCAD_STREAM &aStream, const std::vector< std::string > &aStrings)
static ORCAD_DEVICE v2Device(ORCAD_STREAM &aStream, const std::vector< std::string > &aStrings)
ORCAD_RAW_PAGE OrcadParsePage(const std::vector< char > &aData, const std::vector< std::string > &aStrings, const ORCAD_WARN_FN &aWarn)
Parse one 'Views/<folder>/Pages/<page>' stream into raw structure lists.
static ORCAD_PRIMITIVE v2PrimBody(ORCAD_STREAM &aStream, uint8_t aType, int aDepth=0)
Parsers for the per-page streams 'Views/<folder>/Pages/<page>', the per-folder page-order stream 'Vie...
std::function< void(const wxString &aMsg)> ORCAD_WARN_FN
Warning sink shared by all parser entry points (recoverable-issue channel).
@ ORCAD_PRIM_COMMENT_TEXT
@ ORCAD_PRIM_SYMBOL_VECTOR
nested prefix-framed vector graphic
ORCAD_PORT_TYPE
Pin electrical type codes (u32 portType field of a symbol pin).
@ ORCAD_ST_HIERARCHY_LINK
block dbId -> child folder link
@ ORCAD_ST_STH_IN_PAGES0
nested symbol body inside Graphic*Inst
@ ORCAD_ST_T0X10
scalar pin instance (absolute pos)
@ ORCAD_ST_PLACED_INSTANCE
@ ORCAD_ST_ALIAS
net alias attached to a wire
@ ORCAD_ST_SYMBOL_DISPLAY_PROP
@ ORCAD_ST_T0X11
bus pin instance (absolute pos)
void OrcadReadT0x34Raw(ORCAD_STREAM &aStream)
T0x34 records are NOT prefix-framed.
void OrcadReadT0x35Raw(ORCAD_STREAM &aStream)
T0x35 = the T0x34 raw layout followed by u16 n and 4 * n bytes.
Prefix framing machinery and readers for the prefix-framed OrCAD structures found in Page/Cache/Schem...
Net alias attached to a wire (becomes a local label).
int rotation
0..3 quarter turns
Axis-aligned box in OrCAD DBU; corner order as stored (not normalized).
Bus entry (structure type 29).
One device of a package: the pin-number map of a unit (structure type 32).
std::vector< std::string > pinNumbers
std::vector< bool > pinIgnore
One displayed property of an instance (Part Reference, Value, user fields).
int fontIdx
1-based into ORCAD_LIBRARY_INFO::fonts; 0 = default
int rotation
0..3 quarter turns
std::string name
resolved property name (empty when index invalid)
Shared body of Port / Global / OffPageConnector / TitleBlock / ERCObject and the Graphic*Inst shapes ...
std::unique_ptr< ORCAD_SYMBOL_DEF > nested
SthInPages0 body, else nullptr.
std::map< std::string, std::string > props
int rotation
0..3 quarter turns
std::string name
cache symbol name
std::vector< ORCAD_DISPLAY_PROP > displayProps
std::string logicalName
ports: resolved net/port name
int typeId
ORCAD_ST value.
A hierarchical block occurrence: one placement of a child schematic folder on a parent page.
uint32_t targetDbId
type-12 drawn-instance dbId on the parent page
ORCAD_OCC_SCOPE scope
the child's occurrences under this path
std::string childFolder
child schematic folder name
One node of the design occurrence tree parsed from the root Hierarchy stream.
std::vector< ORCAD_OCC_BLOCK > blocks
hierarchical block occurrences
std::map< uint32_t, std::string > partRefs
type-13 dbId -> occurrence refdes
A package: refdes prefix, footprint and per-unit devices (structure type 31).
std::vector< ORCAD_DEVICE > devices
The 156-byte PageSettings block embedded in the Library stream and in every Page stream: 8 bytes crea...
T0x10: one pin of a placed instance, carrying the pin's absolute page position (the connection point ...
A placed part instance on a page (structure type 13).
std::string sourcePackage
package base name
std::vector< ORCAD_DISPLAY_PROP > displayProps
ORCAD_BBOX bbox
placed box, page DBU
int rotation
0..3 quarter turns
std::map< std::string, std::string > props
short-prefix property pairs
bool mirror
orientation bit 2
std::string value
resolved Part Value
std::vector< ORCAD_PIN_INST > pins
successfully parsed T0x10 records
Integer point in OrCAD DBU.
The decoded prefix chain of one framed structure.
int typeId
ORCAD_ST value (u8 in the stream)
size_t end
offset right after the whole structure (from the outermost long prefix); 0 when unknown
One graphic primitive of a symbol body or nested page graphic.
int fillStyle
0 solid, 1 none, 2 hatch pattern
std::string text
kind == TEXT
std::vector< ORCAD_PRIMITIVE > children
kind == GROUP, translated by (x1, y1)
std::vector< ORCAD_POINT > points
polygon/polyline/bezier vertices
int lineStyle
0 solid, 1 dash, 2 dot, 3 dash-dot, 4 dash-dot-dot, 5 default
std::optional< ORCAD_POINT > start
arc start point
std::optional< ORCAD_POINT > end
arc end point
int lineWidth
Capture width enum: 0 thin, 1 medium, 2 wide, 3 default.
One parsed 'Views/<folder>/Pages/<page>' stream, raw structure lists in stream order.
std::vector< ORCAD_GRAPHIC_INST > ports
std::vector< ORCAD_GRAPHIC_INST > globals
placed power symbols
std::map< uint32_t, std::string > netmap
net db id -> net name
std::vector< ORCAD_WIRE > wires
uint32_t width
mils, or um when isMetric
std::vector< ORCAD_NET_GROUP > netGroups
bus net id -> member net ids
std::vector< ORCAD_DRAWN_INSTANCE > blocks
hierarchical blocks (detection only)
std::vector< ORCAD_PLACED_INSTANCE > instances
std::vector< ORCAD_GRAPHIC_INST > graphics
free comment text/shapes/images
std::vector< ORCAD_GRAPHIC_INST > offpage
off-page connectors
std::vector< ORCAD_GRAPHIC_INST > titleBlocks
std::vector< ORCAD_BUS_ENTRY > busEntries
std::string pageSize
page-size name string, e.g. "B"
std::vector< ORCAD_GRAPHIC_INST > ercObjects
no-connect markers
ORCAD_RECORD_VARIANT record
A symbol definition from the design Cache (LibraryPart / GlobalSymbol / PortSymbol / OffPageSymbol / ...
std::string name
cache name, e.g. "C.Normal"
std::vector< ORCAD_SYMBOL_PIN > pins
std::vector< ORCAD_PRIMITIVE > primitives
int typeId
ORCAD_ST value.
std::optional< ORCAD_BBOX > bbox
symbol-space body box
int generalFlags
LibraryPart GeneralProperties flags (-1 = absent); bit0 = pin numbers visible, bit2 = pin names hidde...
One pin of a symbol definition (structure types 26/27).
bool isBus
true for structure type 21
std::vector< ORCAD_ALIAS > aliases
std::vector< std::string > viewNames
std::vector< ORCAD_SYMBOL_DEF > symbols
one per view, keyed positionally
wxString result
Test unit parsing edge cases and error handling.