CADSTAR csa / cpa ignore Hierarchy

This node doesn't have any equivalent in KiCad so for now we ignore it. In future, we could parse it in detail, to obtain the tree-structure of symbols/footprints in a cadstar library
This commit is contained in:
Roberto Fernandez Bautista 2023-03-05 14:56:18 +01:00
parent e8ead30baf
commit 738b36cf7d
2 changed files with 18 additions and 2 deletions

View File

@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2020-2021 Roberto Fernandez Bautista <roberto.fer.bau@gmail.com> * Copyright (C) 2020-2021 Roberto Fernandez Bautista <roberto.fer.bau@gmail.com>
* Copyright (C) 2020-2021 KiCad Developers, see AUTHORS.txt for contributors. * Copyright (C) 2020-2023 KiCad Developers, see AUTHORS.txt for contributors.
* *
* This program is free software: you can redistribute it and/or modify it * This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the * under the terms of the GNU General Public License as published by the
@ -457,6 +457,14 @@ void CADSTAR_SCH_ARCHIVE_PARSER::LIBRARY_SCM::Parse( XNODE* aNode, PARSER_CONTEX
symdef.Parse( cNode, aContext ); symdef.Parse( cNode, aContext );
SymbolDefinitions.insert( std::make_pair( symdef.ID, symdef ) ); SymbolDefinitions.insert( std::make_pair( symdef.ID, symdef ) );
} }
else if( cNodeName == wxT( "HIERARCHY" ) )
{
// Ignore for now
//
// This node doesn't have any equivalent in KiCad so for now we ignore it. In
// future, we could parse it in detail, to obtain the tree-structure of
// symbols in a cadstar library
}
else else
{ {
THROW_UNKNOWN_NODE_IO_ERROR( cNodeName, aNode->GetName() ); THROW_UNKNOWN_NODE_IO_ERROR( cNodeName, aNode->GetName() );

View File

@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2020 Roberto Fernandez Bautista <roberto.fer.bau@gmail.com> * Copyright (C) 2020 Roberto Fernandez Bautista <roberto.fer.bau@gmail.com>
* Copyright (C) 2020-2021 KiCad Developers, see AUTHORS.txt for contributors. * Copyright (C) 2020-2023 KiCad Developers, see AUTHORS.txt for contributors.
* *
* This program is free software: you can redistribute it and/or modify it * This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the * under the terms of the GNU General Public License as published by the
@ -1618,6 +1618,14 @@ void CADSTAR_PCB_ARCHIVE_PARSER::LIBRARY::Parse( XNODE* aNode, PARSER_CONTEXT* a
symdef.Parse( cNode, aContext ); symdef.Parse( cNode, aContext );
ComponentDefinitions.insert( std::make_pair( symdef.ID, symdef ) ); ComponentDefinitions.insert( std::make_pair( symdef.ID, symdef ) );
} }
else if( cNodeName == wxT( "HIERARCHY" ) )
{
// Ignore for now
//
// This node doesn't have any equivalent in KiCad so for now we ignore it. In
// future, we could parse it in detail, to obtain the tree-structure of
// footprints in a cadstar library
}
else else
{ {
THROW_UNKNOWN_NODE_IO_ERROR( cNodeName, aNode->GetName() ); THROW_UNKNOWN_NODE_IO_ERROR( cNodeName, aNode->GetName() );