本文整理汇总了C++中Parm::Get方法的典型用法代码示例。如果您正苦于以下问题:C++ Parm::Get方法的具体用法?C++ Parm::Get怎么用?C++ Parm::Get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Parm
的用法示例。
在下文中一共展示了Parm::Get方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AddLink
//==== Add New Link ====//
bool LinkMgrSingleton::AddLink( const string& pidA, const string& pidB )
{
//==== Make Sure Parm Are Not Already Linked ====//
for ( int i = 0 ; i < ( int )m_LinkVec.size() ; i++ )
{
if ( m_LinkVec[i]->GetParmA() == pidA && m_LinkVec[i]->GetParmB() == pidB )
{
return false;
}
}
//==== Check If ParmIDs Are Valid ====//
Parm* pA = ParmMgr.FindParm( pidA );
Parm* pB = ParmMgr.FindParm( pidB );
if ( pA == NULL || pB == NULL )
{
return false;
}
Link* pl = new Link();
pl->SetParmA( pidA );
pl->SetParmB( pidB );
pl->SetOffsetFlag( true );
pl->m_Offset.Set( pB->Get() - pA->Get() );
pl->SetScaleFlag( false );
pl->m_Scale.Set( 1.0 );
m_LinkVec.push_back( pl );
m_CurrLinkIndex = ( int )m_LinkVec.size() - 1;
return true;
}
示例2: UpdateGroup
void WingDriverGroup::UpdateGroup( vector< string > parmIDs )
{
Parm* AR = ParmMgr.FindParm( parmIDs[AR_WSECT_DRIVER] );
Parm* span = ParmMgr.FindParm( parmIDs[SPAN_WSECT_DRIVER] );
Parm* area = ParmMgr.FindParm( parmIDs[AREA_WSECT_DRIVER] );
Parm* taper = ParmMgr.FindParm( parmIDs[TAPER_WSECT_DRIVER] );
Parm* aveC = ParmMgr.FindParm( parmIDs[AVEC_WSECT_DRIVER] );
Parm* rootC = ParmMgr.FindParm( parmIDs[ROOTC_WSECT_DRIVER] );
Parm* tipC = ParmMgr.FindParm( parmIDs[TIPC_WSECT_DRIVER] );
Parm* secsw = ParmMgr.FindParm( parmIDs[SECSWEEP_WSECT_DRIVER] );
Parm* sweep = ParmMgr.FindParm( parmIDs[SWEEP_WSECT_DRIVER] );
Parm* sweeploc = ParmMgr.FindParm( parmIDs[SWEEPLOC_WSECT_DRIVER] );
Parm* secswloc = ParmMgr.FindParm( parmIDs[SECSWEEPLOC_WSECT_DRIVER] );
vector< bool > uptodate;
uptodate.resize( m_Nvar );
for( int i = 0; i < m_Nvar; i++ )
{
uptodate[i] = false;
}
for( int i = 0; i < m_Nchoice; i++ )
{
uptodate[m_CurrChoices[i]] = true;
}
bool parallel = false;
if( vector_contains_val( m_CurrChoices, ( int ) SECSWEEP_WSECT_DRIVER ) )
{
if ( sweep->Get() == secsw->Get() )
{
parallel = true;
}
}
if( vector_contains_val( m_CurrChoices, ( int ) TAPER_WSECT_DRIVER ) ){
if ( taper->Get() == 1.0 )
{
parallel = true;
}
}
if( vector_contains_val( m_CurrChoices, ( int ) TIPC_WSECT_DRIVER ) &&
vector_contains_val( m_CurrChoices, ( int ) ROOTC_WSECT_DRIVER ) )
{
if ( tipC->Get() == rootC->Get() )
{
parallel = true;
}
}
if( vector_contains_val( m_CurrChoices, ( int ) AVEC_WSECT_DRIVER ) &&
vector_contains_val( m_CurrChoices, ( int ) ROOTC_WSECT_DRIVER ) )
{
if ( aveC->Get() == rootC->Get() )
{
parallel = true;
}
}
if( vector_contains_val( m_CurrChoices, ( int ) TIPC_WSECT_DRIVER ) &&
vector_contains_val( m_CurrChoices, ( int ) AVEC_WSECT_DRIVER ) )
{
if ( tipC->Get() == aveC->Get() )
{
parallel = true;
}
}
if( parallel )
{
taper->Set( 1.0 );
uptodate[TAPER_WSECT_DRIVER] = true;
secsw->Set( sweep->Get() );
uptodate[SECSWEEP_WSECT_DRIVER] = true;
if( vector_contains_val( m_CurrChoices, ( int ) ROOTC_WSECT_DRIVER ) )
{
tipC->Set( rootC->Get() );
uptodate[TIPC_WSECT_DRIVER] = true;
aveC->Set( rootC->Get() );
uptodate[AVEC_WSECT_DRIVER] = true;
}
else if( vector_contains_val( m_CurrChoices, ( int ) TIPC_WSECT_DRIVER ) )
{
rootC->Set( tipC->Get() );
uptodate[ROOTC_WSECT_DRIVER] = true;
aveC->Set( tipC->Get() );
uptodate[AVEC_WSECT_DRIVER] = true;
}
else if( vector_contains_val( m_CurrChoices, ( int ) AVEC_WSECT_DRIVER ) )
{
tipC->Set( aveC->Get() );
uptodate[TIPC_WSECT_DRIVER] = true;
rootC->Set( aveC->Get() );
uptodate[ROOTC_WSECT_DRIVER] = true;
}
}
//.........这里部分代码省略.........