KiCad PCB EDA Suite
Loading...
Searching...
No Matches
orcad_structures.cpp File Reference
#include <sch_io/orcad/orcad_structures.h>
#include <memory>
#include <utility>
#include <variant>
#include <ki_exception.h>
#include <sch_io/orcad/orcad_cache.h>

Go to the source code of this file.

Functions

ORCAD_DISPLAY_PROP OrcadReadDisplayProp (ORCAD_STRUCT_READER &aReader, const ORCAD_PREFIXES &)
 
ORCAD_ALIAS OrcadReadAlias (ORCAD_STRUCT_READER &aReader, const ORCAD_PREFIXES &)
 
ORCAD_WIRE OrcadReadWire (ORCAD_STRUCT_READER &aReader, const ORCAD_PREFIXES &aPrefixes)
 Types 20 (wire) and 21 (bus); isBus is set from the prefix type.
 
ORCAD_PLACED_INSTANCE OrcadReadPlacedInstance (ORCAD_STRUCT_READER &aReader, const ORCAD_PREFIXES &aPrefixes)
 
ORCAD_GRAPHIC_INST OrcadReadGraphicInst (ORCAD_STRUCT_READER &aReader, const ORCAD_PREFIXES &aPrefixes)
 Common body of Port/Global/OffPageConnector/TitleBlock/ERCObject/Graphic*Inst.
 
ORCAD_GRAPHIC_INST OrcadReadPort (ORCAD_STRUCT_READER &aReader, const ORCAD_PREFIXES &aPrefixes)
 GraphicInst body followed by a 9-byte trailer.
 
ORCAD_GRAPHIC_INST OrcadReadTitleBlock (ORCAD_STRUCT_READER &aReader, const ORCAD_PREFIXES &aPrefixes)
 GraphicInst body followed by a 12-byte trailer.
 
ORCAD_GRAPHIC_INST OrcadReadErcObject (ORCAD_STRUCT_READER &aReader, const ORCAD_PREFIXES &aPrefixes)
 GraphicInst body followed by 3 lzt strings.
 
ORCAD_PIN_INST OrcadReadPinInst (ORCAD_STRUCT_READER &aReader, const ORCAD_PREFIXES &aPrefixes)
 
ORCAD_BUS_ENTRY OrcadReadBusEntry (ORCAD_STRUCT_READER &aReader, const ORCAD_PREFIXES &)
 
std::vector< ORCAD_DISPLAY_PROPOrcadReadDisplayPropList (ORCAD_STRUCT_READER &aReader)
 Read a u16-counted list of framed DisplayProp structures via ReadStructure(), keeping only the successfully parsed ones.
 
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.
 

Function Documentation

◆ OrcadReadAlias()

◆ OrcadReadBusEntry()

◆ OrcadReadDisplayProp()

◆ OrcadReadDisplayPropList()

std::vector< ORCAD_DISPLAY_PROP > OrcadReadDisplayPropList ( ORCAD_STRUCT_READER & aReader)

Read a u16-counted list of framed DisplayProp structures via ReadStructure(), keeping only the successfully parsed ones.

Also used by the Cache readers.

Definition at line 562 of file orcad_structures.cpp.

References ORCAD_STRUCT_READER::ReadStructure(), ORCAD_STREAM::ReadU16(), ORCAD_READ_RESULT::record, and ORCAD_STRUCT_READER::Stream().

Referenced by OrcadReadDrawnInstance(), OrcadReadGraphicInst(), OrcadReadPinInst(), and OrcadReadPlacedInstance().

◆ OrcadReadErcObject()

ORCAD_GRAPHIC_INST OrcadReadErcObject ( ORCAD_STRUCT_READER & aReader,
const ORCAD_PREFIXES & aPrefixes )

GraphicInst body followed by 3 lzt strings.

Definition at line 511 of file orcad_structures.cpp.

References OrcadReadGraphicInst(), ORCAD_STREAM::ReadLzt(), and ORCAD_STRUCT_READER::Stream().

Referenced by ORCAD_STRUCT_READER::ReadStructure().

◆ OrcadReadGraphicInst()

◆ OrcadReadPinInst()

◆ OrcadReadPlacedInstance()

◆ OrcadReadPort()

ORCAD_GRAPHIC_INST OrcadReadPort ( ORCAD_STRUCT_READER & aReader,
const ORCAD_PREFIXES & aPrefixes )

GraphicInst body followed by a 9-byte trailer.

Definition at line 492 of file orcad_structures.cpp.

References OrcadReadGraphicInst(), ORCAD_STREAM::Skip(), and ORCAD_STRUCT_READER::Stream().

Referenced by ORCAD_STRUCT_READER::ReadStructure().

◆ OrcadReadT0x34Raw()

void OrcadReadT0x34Raw ( ORCAD_STREAM & aStream)

T0x34 records are NOT prefix-framed.

Raw layout: 9 bytes, u32 id, lzt string, u32, u32 color, u32 lineStyle, u32 lineWidth. Content is not used; the reader only keeps the stream aligned.

Definition at line 580 of file orcad_structures.cpp.

References ORCAD_STREAM::ReadLzt(), ORCAD_STREAM::ReadU32(), and ORCAD_STREAM::Skip().

Referenced by OrcadParsePage(), and OrcadReadT0x35Raw().

◆ OrcadReadT0x35Raw()

void OrcadReadT0x35Raw ( ORCAD_STREAM & aStream)

T0x35 = the T0x34 raw layout followed by u16 n and 4 * n bytes.

Definition at line 592 of file orcad_structures.cpp.

References OrcadReadT0x34Raw(), ORCAD_STREAM::ReadU16(), and ORCAD_STREAM::Skip().

Referenced by OrcadParsePage().

◆ OrcadReadTitleBlock()

ORCAD_GRAPHIC_INST OrcadReadTitleBlock ( ORCAD_STRUCT_READER & aReader,
const ORCAD_PREFIXES & aPrefixes )

GraphicInst body followed by a 12-byte trailer.

Definition at line 501 of file orcad_structures.cpp.

References OrcadReadGraphicInst(), ORCAD_STREAM::Skip(), and ORCAD_STRUCT_READER::Stream().

Referenced by ORCAD_STRUCT_READER::ReadStructure().

◆ OrcadReadWire()