|
KiCad PCB EDA Suite
|
#include <sch_io/orcad/orcad_page.h>#include <algorithm>#include <utility>#include <ki_exception.h>#include <sch_io/orcad/orcad_library.h>#include <sch_io/orcad/orcad_stream.h>#include <sch_io/orcad/orcad_structures.h>Go to the source code of this file.
Functions | |
| ORCAD_RAW_PAGE | OrcadParsePage (const std::vector< char > &aData, const std::vector< std::string > &aStrings, const ORCAD_WARN_FN &aWarn, ORCAD_DIALECT aDialect) |
| A modern body failure skips that structure. | |
| static std::vector< std::string > | pageOrderBody (ORCAD_STREAM &aStream) |
| std::vector< std::string > | OrcadParsePageOrder (const std::vector< char > &aData, ORCAD_DIALECT aDialect) |
| Returns display order. | |
| std::vector< std::string > | OrcadParseSchematicFolderOrder (const std::vector< char > &aData) |
| Unlisted Views storages can be stale. | |
| static uint8_t | readOccHeader (ORCAD_STRUCT_READER &aReader, int aExpectType, std::map< std::string, std::string > *aProps=nullptr) |
| static ORCAD_OCC_SCOPE | readOccScope (ORCAD_STRUCT_READER &aReader) |
| static void | readOccurrence (ORCAD_STRUCT_READER &aReader, ORCAD_OCC_SCOPE &aScope) |
| static ORCAD_OCC_SCOPE | readOccTree (ORCAD_STRUCT_READER &aReader) |
| ORCAD_OCC_SCOPE | OrcadReadOccurrenceTree (const std::vector< char > &aData, const std::vector< std::string > &aStrings, const ORCAD_WARN_FN &aWarn, ORCAD_DIALECT aDialect) |
| Returns occurrence references and child scopes. | |
| ORCAD_RAW_PAGE OrcadParsePage | ( | const std::vector< char > & | aData, |
| const std::vector< std::string > & | aStrings, | ||
| const ORCAD_WARN_FN & | aWarn, | ||
| ORCAD_DIALECT | aDialect = {} ) |
A modern body failure skips that structure.
Invalid page framing, and any legacy body failure, throws IO_ERROR.
Definition at line 66 of file orcad_page.cpp.
References ORCAD_RAW_PAGE::blocks, ORCAD_RAW_PAGE::busEntries, ORCAD_PREFIXES::end, ORCAD_RAW_PAGE::ercObjects, ORCAD_STREAM::GetOffset(), ORCAD_RAW_PAGE::globals, ORCAD_RAW_PAGE::graphics, group, ORCAD_RAW_PAGE::instances, ORCAD_DIALECT::legacy, ORCAD_RAW_PAGE::name, ORCAD_RAW_PAGE::netAliases, ORCAD_RAW_PAGE::netGroups, ORCAD_RAW_PAGE::netmap, ORCAD_RAW_PAGE::offpage, ORCAD_ST_PAGE, OrcadParsePageSettings(), OrcadReadT0x34Raw(), OrcadReadT0x35Raw(), ORCAD_RAW_PAGE::pageSize, ORCAD_RAW_PAGE::ports, ORCAD_RAW_PAGE::props, ORCAD_STRUCT_READER::PropsDict(), ORCAD_STRUCT_READER::ReadCount(), ORCAD_STREAM::ReadLzt(), ORCAD_STRUCT_READER::ReadPrefixes(), ORCAD_STRUCT_READER::ReadStructure(), ORCAD_STREAM::ReadU16(), ORCAD_STREAM::ReadU32(), result, ORCAD_RAW_PAGE::settings, ORCAD_STREAM::Skip(), THROW_IO_ERROR, ORCAD_RAW_PAGE::titleBlocks, and ORCAD_RAW_PAGE::wires.
Referenced by SCH_IO_ORCAD::LoadSchematicFile().
| std::vector< std::string > OrcadParsePageOrder | ( | const std::vector< char > & | aData, |
| ORCAD_DIALECT | aDialect = {} ) |
Returns display order.
The caller must reconcile these names with available page streams.
Definition at line 199 of file orcad_page.cpp.
References ORCAD_DIALECT::legacy, ORCAD_ST_SCH_LIB, pageOrderBody(), and ORCAD_STRUCT_READER::ReadPrefixes().
Referenced by SCH_IO_ORCAD::LoadSchematicFile().
| std::vector< std::string > OrcadParseSchematicFolderOrder | ( | const std::vector< char > & | aData | ) |
Unlisted Views storages can be stale.
Import them only if a hierarchy occurrence refers to them.
Definition at line 211 of file orcad_page.cpp.
References ORCAD_STREAM::AtEnd(), ORCAD_STREAM::ReadLzt(), ORCAD_STREAM::ReadU16(), ORCAD_STREAM::Skip(), and THROW_IO_ERROR.
Referenced by SCH_IO_ORCAD::LoadSchematicFile().
| ORCAD_OCC_SCOPE OrcadReadOccurrenceTree | ( | const std::vector< char > & | aData, |
| const std::vector< std::string > & | aStrings, | ||
| const ORCAD_WARN_FN & | aWarn, | ||
| ORCAD_DIALECT | aDialect = {} ) |
Returns occurrence references and child scopes.
Modern parse errors return an empty scope; legacy ones throw IO_ERROR.
Definition at line 386 of file orcad_page.cpp.
References ORCAD_DIALECT::legacy, readOccTree(), ORCAD_STREAM::ReadU32(), ORCAD_STREAM::ReadU8(), ORCAD_STREAM::Remaining(), THROW_IO_ERRORF, and IO_ERROR::What().
Referenced by SCH_IO_ORCAD::LoadSchematicFile().
|
static |
Definition at line 180 of file orcad_page.cpp.
References ORCAD_STREAM::ReadLzt(), ORCAD_STREAM::ReadU16(), and ORCAD_STREAM::Skip().
Referenced by OrcadParsePageOrder().
|
static |
Definition at line 238 of file orcad_page.cpp.
References ORCAD_STREAM::npos, ORCAD_STRUCT_READER::PropsDict(), ORCAD_STRUCT_READER::ReadPrefixes(), and ORCAD_PREFIXES::typeId.
Referenced by readOccScope(), readOccTree(), and readOccurrence().
|
static |
Definition at line 312 of file orcad_page.cpp.
References ORCAD_STREAM::AtPreamble(), ORCAD_STRUCT_READER::Dialect(), ORCAD_DIALECT::legacy, name, ORCAD_OCC_SCOPE::netNames, ORCAD_STRUCT_READER::ReadCount(), ORCAD_STREAM::ReadLzt(), readOccHeader(), readOccurrence(), ORCAD_STREAM::ReadU32(), ORCAD_STREAM::Skip(), and ORCAD_STRUCT_READER::Stream().
Referenced by readOccTree(), and readOccurrence().
|
static |
Definition at line 366 of file orcad_page.cpp.
References ORCAD_STRUCT_READER::Dialect(), ORCAD_DIALECT::legacy, ORCAD_STRUCT_READER::ReadCount(), ORCAD_STREAM::ReadLzt(), readOccHeader(), readOccScope(), ORCAD_STREAM::ReadU32(), ORCAD_STREAM::Skip(), and ORCAD_STRUCT_READER::Stream().
Referenced by OrcadReadOccurrenceTree().
|
static |
Definition at line 253 of file orcad_page.cpp.
References ORCAD_OCC_SCOPE::blocks, ORCAD_OCC_BLOCK::childFolder, ORCAD_STRUCT_READER::Dialect(), ORCAD_STREAM::ExpectByte(), ORCAD_DIALECT::legacy, ORCAD_OCC_SCOPE::partOccurrenceIds, ORCAD_OCC_SCOPE::partProps, ORCAD_OCC_SCOPE::partRefs, ORCAD_OCC_SCOPE::partUnitRefs, ORCAD_STRUCT_READER::ReadCount(), ORCAD_STREAM::ReadLzt(), readOccHeader(), readOccScope(), ORCAD_STRUCT_READER::ReadStrIdx(), ORCAD_STREAM::ReadU16(), ORCAD_STREAM::ReadU32(), ORCAD_STRUCT_READER::Resolve(), ORCAD_OCC_BLOCK::scope, ORCAD_STRUCT_READER::Stream(), and ORCAD_OCC_BLOCK::targetDbId.
Referenced by readOccScope().