KiCad PCB EDA Suite
Loading...
Searching...
No Matches
orcad_page.h
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
5 *
6 * Based on the dsn2kicad reference implementation and on OrCAD file format
7 * documentation from the OpenOrCadParser project (MIT licensed).
8 *
9 * This program is free software: you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published by the
11 * Free Software Foundation, either version 3 of the License, or (at your
12 * option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program. If not, see <https://www.gnu.org/licenses/>.
21 */
22
23
24#ifndef ORCAD_PAGE_H_
25#define ORCAD_PAGE_H_
26
27#include <cstdint>
28#include <map>
29#include <string>
30#include <vector>
31
34
37ORCAD_RAW_PAGE OrcadParsePage( const std::vector<char>& aData, const std::vector<std::string>& aStrings,
38 const ORCAD_WARN_FN& aWarn, ORCAD_DIALECT aDialect = {} );
39
41std::vector<std::string> OrcadParsePageOrder( const std::vector<char>& aData, ORCAD_DIALECT aDialect = {} );
42
44std::vector<std::string> OrcadParseSchematicFolderOrder( const std::vector<char>& aData );
45
48ORCAD_OCC_SCOPE OrcadReadOccurrenceTree( const std::vector<char>& aData, const std::vector<std::string>& aStrings,
49 const ORCAD_WARN_FN& aWarn, ORCAD_DIALECT aDialect = {} );
50
53{
54 return !aPage.blocks.empty();
55}
56
57#endif // ORCAD_PAGE_H_
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.
std::vector< std::string > OrcadParsePageOrder(const std::vector< char > &aData, ORCAD_DIALECT aDialect={})
Returns display order.
bool OrcadPageHasHierarchyBlocks(const ORCAD_RAW_PAGE &aPage)
True when the page contains hierarchical block instances (DrawnInstance, type 12).
Definition orcad_page.h:52
std::vector< std::string > OrcadParseSchematicFolderOrder(const std::vector< char > &aData)
Unlisted Views storages can be stale.
std::function< void(const wxString &aMsg)> ORCAD_WARN_FN
Coordinates use DBU with Y down.
Legacy (pre-v3) files have short prefixes only, u16 string indices with a 0xFFFF sentinel and nested ...
Each scope holds the references and child blocks for one instantiation path.
One parsed 'Views/<folder>/Pages/<page>' stream, raw structure lists in stream order.
std::vector< ORCAD_DRAWN_INSTANCE > blocks
hierarchical blocks (detection only)