本文整理汇总了C++中Parm::GetName方法的典型用法代码示例。如果您正苦于以下问题:C++ Parm::GetName方法的具体用法?C++ Parm::GetName怎么用?C++ Parm::GetName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Parm
的用法示例。
在下文中一共展示了Parm::GetName方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: FindParm
//==== Find Parm ID Given GroupName and Parm Name ====//
string ParmContainer::FindParm( const string& parm_name, const string& group_name )
{
string id;
map< string, vector< string > >::iterator iter;
iter = m_GroupParmMap.find( group_name );
if ( iter != m_GroupParmMap.end() )
{
//==== Look For Parm Name ====//
vector< string > pid_vec = iter->second;
for ( int i = 0 ; i < (int)pid_vec.size() ; i++ )
{
Parm* p = ParmMgr.FindParm( pid_vec[i] );
if ( p->GetName() == parm_name )
return pid_vec[i];
}
}
//==== Look Thru All Parms And Return First Name Match ====//
for ( int i = 0 ; i < ( int )m_ParmVec.size() ; i++ )
{
Parm* p = ParmMgr.FindParm( m_ParmVec[i] );
if ( p )
{
if ( p->GetName() == parm_name && p->GetGroupName() == group_name )
{
return p->GetID();
}
}
}
return id;
}
示例2: ParmNameCompare
//==== Name Compare ====//
bool ParmNameCompare( const string a, const string b )
{
Parm* pA = ParmMgr.FindParm( a );
Parm* pB = ParmMgr.FindParm( b );
if ( pA && pB )
{
return ( pA->GetName() < pB->GetName() );
}
return ( false );
}
示例3: LinkAllComp
//==== Link All Parms In A Container (Component) ====//
bool LinkMgrSingleton::LinkAllComp()
{
Parm* pA = ParmMgr.FindParm( m_WorkingLink->GetParmA() );
Parm* pB = ParmMgr.FindParm( m_WorkingLink->GetParmB() );
ParmContainer* pcA = pA->GetLinkContainer();
ParmContainer* pcB = pB->GetLinkContainer();
if ( !pcA || !pcB )
{
return false;
}
if ( pcA == pcB )
{
return false;
}
vector< string > parmAVec, parmBVec;
pcA->AddLinkableParms( parmAVec, pcA->GetID() );
pcB->AddLinkableParms( parmBVec, pcB->GetID() );
for ( int k = 0 ; k < ( int )parmAVec.size() ; k++ )
{
for ( int n = 0 ; n < ( int )parmBVec.size() ; n++ )
{
Parm* parmA = ParmMgr.FindParm( parmAVec[k] );
Parm* parmB = ParmMgr.FindParm( parmBVec[n] );
if ( parmA && parmB )
{
if ( parmA->GetName() == parmB->GetName() &&
parmA->GetDisplayGroupName() == parmB->GetDisplayGroupName() )
{
AddLink( parmAVec[k], parmBVec[n] );
}
}
}
}
return true;
}
示例4: LinkAllGroup
//==== Link All Parms In A Group ====//
bool LinkMgrSingleton::LinkAllGroup()
{
Parm* pA = ParmMgr.FindParm( m_WorkingLink->GetParmA() );
Parm* pB = ParmMgr.FindParm( m_WorkingLink->GetParmB() );
if ( !pA || !pB )
{
return false;
}
string gnameA = pA->GetDisplayGroupName();
string gnameB = pB->GetDisplayGroupName();
if ( ( pA->GetLinkContainer() == pB->GetLinkContainer() ) && ( gnameA == gnameB ) )
{
return false;
}
vector< string > parmAVec, parmBVec;
pA->GetLinkContainer()->GetParmIDs( pA->GetID(), parmAVec );
pB->GetLinkContainer()->GetParmIDs( pB->GetID(), parmBVec );
for ( int k = 0 ; k < ( int )parmAVec.size() ; k++ )
{
for ( int n = 0 ; n < ( int )parmBVec.size() ; n++ )
{
Parm* parmA = ParmMgr.FindParm( parmAVec[k] );
Parm* parmB = ParmMgr.FindParm( parmBVec[n] );
if ( parmA && parmB && ( parmA->GetName() == parmB->GetName() ) )
{
AddLink( parmAVec[k], parmBVec[n] );
}
}
}
return true;
}
示例5: AddUserParm
string LinkMgrSingleton::AddUserParm(int type, const string & name, const string & group )
{
//==== Check For Duplicate ====//
int num_parms = GetNumUserParms() - GetNumPredefinedUserParms();
for ( int i = 0 ; i < num_parms ; i++ )
{
string pid = LinkMgr.GetUserParmId( i + GetNumPredefinedUserParms() );
Parm* pptr = ParmMgr.FindParm( pid );
if ( pptr && pptr->GetName() == name && pptr->GetGroupName() == group )
{
return string();
}
}
return m_UserParms.AddParm( type, name, group );
}