当前位置: 首页>>代码示例>>C++>>正文


C++ Parm::get_name方法代码示例

本文整理汇总了C++中Parm::get_name方法的典型用法代码示例。如果您正苦于以下问题:C++ Parm::get_name方法的具体用法?C++ Parm::get_name怎么用?C++ Parm::get_name使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Parm的用法示例。


在下文中一共展示了Parm::get_name方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: LinkAllGroup

bool ParmLinkMgr::LinkAllGroup()
{
	Parm* pA =  m_WorkingParmLink.GetParmA();
	Parm* pB =  m_WorkingParmLink.GetParmB();

	if ( pA->get_geom_base() == pB->get_geom_base() )
		return false;

	string gnameA = string( pA->get_group_name().get_char_star() );
	string gnameB = string( pB->get_group_name().get_char_star() );

	vector< Parm* > parmAVec = GetParmVec( pA->get_geom_base(), gnameA );
	vector< Parm* > parmBVec = GetParmVec( pB->get_geom_base(), gnameB );

	for ( int k = 0 ; k < (int)parmAVec.size() ; k++ )
	{
		for ( int n = 0 ; n < (int)parmBVec.size() ; n++ )
		{
			Parm* parmA = parmAVec[k];
			Parm* parmB = parmBVec[n];

			if ( parmA->get_name() == parmB->get_name() )
			{
				AddLink( parmA, parmB );
			}
		}
	}

	return true;
}
开发者ID:CarltonFraley,项目名称:OpenVSP,代码行数:30,代码来源:parmLinkMgr.cpp

示例2: SwapGeom

void ParmLinkMgr::SwapGeom( Geom* gOld, Geom* gNew )
{
	for ( int i = 0 ; i < (int)m_ParmLinkVec.size() ; i++ )
	{
		Parm* pA = m_ParmLinkVec[i]->GetParmA();
		if ( pA->get_geom_base() == gOld )
		{
			Stringc group_name = pA->get_group_name();
			Stringc parm_name  = pA->get_name();
			Parm* p = FindParm( gNew, group_name, parm_name );
			if ( p )
				m_ParmLinkVec[i]->SetParmA( p );
		}
		Parm* pB = m_ParmLinkVec[i]->GetParmB();
		if ( pB->get_geom_base() == gOld )
		{
			Stringc group_name = pB->get_group_name();
			Stringc parm_name  = pB->get_name();
			Parm* p = FindParm( gNew, group_name, parm_name );
			if ( p )
				m_ParmLinkVec[i]->SetParmB( p );
		}
		m_ParmLinkVec[i]->GetParmA()->set_linked_flag( true );
		m_ParmLinkVec[i]->GetParmB()->set_linked_flag( true );
	}
}
开发者ID:CarltonFraley,项目名称:OpenVSP,代码行数:26,代码来源:parmLinkMgr.cpp

示例3: LinkAllComp

bool ParmLinkMgr::LinkAllComp()
{
	Parm* pA =  m_WorkingParmLink.GetParmA();
	Parm* pB =  m_WorkingParmLink.GetParmB();

	if ( pA->get_geom_base() == pB->get_geom_base() )
		return false;

	//==== For All Parms in GeomA, Try to Find Match in GeomB and Link ====//
	vector< string > groupAVec = GetGroupNameVec( pA->get_geom_base() );
	vector< string > groupBVec = GetGroupNameVec( pB->get_geom_base() );

	for ( int i = 0 ; i < (int)groupAVec.size() ; i++ )
	{
		for ( int j = 0 ; j < (int)groupBVec.size() ; j++ )
		{
			if ( groupAVec[i].compare( groupBVec[j] ) == 0 )
			{
				vector< Parm* > parmAVec = GetParmVec( pA->get_geom_base(), groupAVec[i] );
				vector< Parm* > parmBVec = GetParmVec( pB->get_geom_base(), groupBVec[j] );

				for ( int k = 0 ; k < (int)parmAVec.size() ; k++ )
				{
					for ( int n = 0 ; n < (int)parmBVec.size() ; n++ )
					{
						Parm* parmA = parmAVec[k];
						Parm* parmB = parmBVec[n];

						if ( parmA->get_name() == parmB->get_name() )
						{
							AddLink( parmA, parmB );
						}
					}
				}
			}
		}
	}

	return true;
}
开发者ID:CarltonFraley,项目名称:OpenVSP,代码行数:40,代码来源:parmLinkMgr.cpp

示例4: WritePHolderListXDDM

void PHolderListMgr::WritePHolderListXDDM( char *newfile )
{
	xmlDocPtr doc = xmlNewDoc((const xmlChar *)"1.0");

	xmlNodePtr model_node = xmlNewNode(NULL,(const xmlChar *)"Model");
	xmlDocSetRootElement(doc, model_node);

	xmlSetProp( model_node, (const xmlChar *)"ID", (const xmlChar *)aircraftPtr->getFileName().get_char_star() );
	xmlSetProp( model_node, (const xmlChar *)"Modeler", (const xmlChar *)"OpenVSP" );
	xmlSetProp( model_node, (const xmlChar *)"Wrapper", (const xmlChar *)"wrap_vsp.csh" );

	for ( int i = 0 ; i < (int)m_PHolderVec.size() ; i++ )
	{
		Parm* p = m_PHolderVec[i]->getParm();

		xmlNodePtr var_node;

		if( m_PHolderVec[i]->getDesType() == XDDM_VAR )
			var_node = xmlNewChild( model_node, NULL, (const xmlChar *)"Variable", NULL );
		else
			var_node = xmlNewChild( model_node, NULL, (const xmlChar *)"Constant", NULL );

		char varname[255];
		sprintf( varname, "%d:%s:%s:%s", ((Geom*)p->get_geom_base())->getPtrID(), p->get_geom_base()->getName().get_char_star(), p->get_group_name().get_char_star(), p->get_name().get_char_star() );

		xmlSetProp( var_node, (const xmlChar *)"ID", (const xmlChar *)varname );
		xmlSetDoubleProp( var_node, "Value", p->get() );
		xmlSetDoubleProp( var_node, "Min", p->get_lower() );
		xmlSetDoubleProp( var_node, "Max", p->get_upper() );
		xmlSetProp( var_node, (const xmlChar *)"VSPVarName", (const xmlChar *)varname );
	}

	//===== Save XML Tree and Free Doc =====//
	xmlSaveFormatFile((const char *)newfile, doc, 1);
	xmlFreeDoc( doc );
}
开发者ID:Phoenix-Integration,项目名称:OpenVSP,代码行数:36,代码来源:parmLinkMgr.cpp

示例5: WritePHolderListDES

void PHolderListMgr::WritePHolderListDES( char *newfile )
{
	FILE *fp;
	fp = fopen( newfile, "w" );

	fprintf( fp, "%d\n", (int)m_PHolderVec.size() );

	for ( int i = 0 ; i < (int)m_PHolderVec.size() ; i++ )
	{
		Parm *p = m_PHolderVec[i]->getParm();

		fprintf( fp, "%d:%s:%s:%s: %g\n", ((Geom*)p->get_geom_base())->getPtrID(), p->get_geom_base()->getName().get_char_star(), p->get_group_name().get_char_star(), p->get_name().get_char_star(), p->get() );
	}

	fclose( fp );
}
开发者ID:Phoenix-Integration,项目名称:OpenVSP,代码行数:16,代码来源:parmLinkMgr.cpp


注:本文中的Parm::get_name方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。