KiCad PCB EDA Suite
Loading...
Searching...
No Matches
orcad_page.h File Reference
#include <cstdint>
#include <map>
#include <string>
#include <vector>
#include <sch_io/orcad/orcad_records.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.
 
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.
 
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.
 
bool OrcadPageHasHierarchyBlocks (const ORCAD_RAW_PAGE &aPage)
 True when the page contains hierarchical block instances (DrawnInstance, type 12).
 

Function Documentation

◆ OrcadPageHasHierarchyBlocks()

bool OrcadPageHasHierarchyBlocks ( const ORCAD_RAW_PAGE & aPage)
inline

True when the page contains hierarchical block instances (DrawnInstance, type 12).

Definition at line 52 of file orcad_page.h.

References ORCAD_RAW_PAGE::blocks.

Referenced by SCH_IO_ORCAD::LoadSchematicFile().

◆ OrcadParsePage()

◆ OrcadParsePageOrder()

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().

◆ OrcadParseSchematicFolderOrder()

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().

◆ OrcadReadOccurrenceTree()

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().