本文整理汇总了C++中LIB_PART::GetLibId方法的典型用法代码示例。如果您正苦于以下问题:C++ LIB_PART::GetLibId方法的具体用法?C++ LIB_PART::GetLibId怎么用?C++ LIB_PART::GetLibId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LIB_PART
的用法示例。
在下文中一共展示了LIB_PART::GetLibId方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: isCurrentPart
bool LIB_EDIT_FRAME::isCurrentPart( const LIB_ID& aLibId ) const
{
// This will return the root part of any alias
LIB_PART* part = m_libMgr->GetBufferedPart( aLibId.GetLibItemName(), aLibId.GetLibNickname() );
// Now we can compare the libId of the current part and the root part
return ( part && GetCurPart() && part->GetLibId() == GetCurPart()->GetLibId() );
}
示例2: Update
void CMP_TREE_NODE_LIB_ID::Update( LIB_ALIAS* aAlias )
{
Name = aAlias->GetName();
Desc = aAlias->GetDescription();
// Parent node is the library nickname so set the LIB_ID library nickname.
IsRoot = aAlias->IsRoot();
// Pre-normalized strings for fast case-insensitive matching
// Search text spaces out keywords and description to penalize description
// matches - earlier matches are worth more.
MatchName = aAlias->GetName().Lower();
SearchText = (aAlias->GetKeyWords() + " " + Desc);
// Extract default footprint text
LIB_PART* part = aAlias->GetPart();
wxString footprint;
if( part )
{
LibId = part->GetLibId();
LibId.SetLibItemName( Name );
footprint = part->GetFootprintField().GetText();
}
// If a footprint is defined for the part,
// add it to the serach string
if( !footprint.IsEmpty() )
{
SearchText += " ";
SearchText += footprint;
}
Children.clear();
if( part && part->IsMulti() )
{
for( int u = 1; u <= part->GetUnitCount(); ++u )
AddUnit( u );
}
SearchTextNormalized = false;
}