本文整理汇总了C++中STEPattribute::Aggregate方法的典型用法代码示例。如果您正苦于以下问题:C++ STEPattribute::Aggregate方法的具体用法?C++ STEPattribute::Aggregate怎么用?C++ STEPattribute::Aggregate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类STEPattribute
的用法示例。
在下文中一共展示了STEPattribute::Aggregate方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: switch
//.........这里部分代码省略.........
while( ( attr = stepcomplex->NextAttribute() ) != NULL ) {
if( !strcmp( attr->Name(), "name" ) ) {
attr->StrToVal( "'DEGREES'" );
}
if( !strcmp( attr->Name(), "conversion_factor" ) ) {
attr->Entity( ( STEPentity * )( p_ang_measure_with_unit ) );
}
}
}
if( !strcmp( stepcomplex->EntityName(), "Named_Unit" ) ) {
stepcomplex->ResetAttributes();
while( ( attr = stepcomplex->NextAttribute() ) != NULL ) {
if( !strcmp( attr->Name(), "dimensions" ) ) {
attr->Entity( ( STEPentity * )( dimensional_exp ) );
}
}
}
stepcomplex = stepcomplex->sc;
}
instance_list->Append( ( SDAI_Application_instance * ) ua_plane_angle, completeSE );
instance_cnt++;
}
const char * ua_solid_angle_types[4] = { "named_unit", "si_unit", "solid_angle_unit", "*" };
STEPcomplex * ua_solid_angle = new STEPcomplex( registry, ( const char ** ) ua_solid_angle_types, instance_cnt );
stepcomplex = ua_solid_angle->head;
while( stepcomplex ) {
if( !strcmp( stepcomplex->EntityName(), "Si_Unit" ) ) {
stepcomplex->ResetAttributes();
while( ( attr = stepcomplex->NextAttribute() ) != NULL ) {
if( !strcmp( attr->Name(), "name" ) ) {
attr->Enum( new SdaiSi_unit_name_var( Si_unit_name__steradian ) );
}
}
}
stepcomplex = stepcomplex->sc;
}
instance_list->Append( ( SDAI_Application_instance * ) ua_solid_angle, completeSE );
instance_cnt++;
// All units set up, stored in: ua_length, ua_plane_angle, ua_solid_angle
const char * entNmArr[5] = { "geometric_representation_context", "global_uncertainty_assigned_context", "global_unit_assigned_context", "representation_context", "*" };
STEPcomplex * complex_entity = new STEPcomplex( registry, ( const char ** ) entNmArr, instance_cnt );
stepcomplex = complex_entity->head;
while( stepcomplex ) {
if( !strcmp( stepcomplex->EntityName(), "Geometric_Representation_Context" ) ) {
stepcomplex->ResetAttributes();
while( ( attr = stepcomplex->NextAttribute() ) != NULL ) {
if( !strcmp( attr->Name(), "coordinate_space_dimension" ) ) {
attr->StrToVal( "3" );
}
}
}
if( !strcmp( stepcomplex->EntityName(), "Global_Uncertainty_Assigned_Context" ) ) {
stepcomplex->ResetAttributes();
while( ( attr = stepcomplex->NextAttribute() ) != NULL ) {
if( !strcmp( attr->Name(), "uncertainty" ) ) {
EntityAggregate * unc_agg = new EntityAggregate();
unc_agg->AddNode( new EntityNode( ( SDAI_Application_instance * ) uncertainty ) );
attr->Aggregate( unc_agg );
}
}
}
if( !strcmp( stepcomplex->EntityName(), "Global_Unit_Assigned_Context" ) ) {
stepcomplex->ResetAttributes();
while( ( attr = stepcomplex->NextAttribute() ) != NULL ) {
std::string attrval;
if( !strcmp( attr->Name(), "units" ) ) {
EntityAggregate * unit_assigned_agg = new EntityAggregate();
unit_assigned_agg->AddNode( new EntityNode( ( SDAI_Application_instance * ) ua_length ) );
unit_assigned_agg->AddNode( new EntityNode( ( SDAI_Application_instance * ) ua_plane_angle ) );
unit_assigned_agg->AddNode( new EntityNode( ( SDAI_Application_instance * ) ua_solid_angle ) );
attr->Aggregate( unit_assigned_agg );
}
}
}
if( !strcmp( stepcomplex->EntityName(), "Representation_Context" ) ) {
stepcomplex->ResetAttributes();
while( ( attr = stepcomplex->NextAttribute() ) != NULL ) {
if( !strcmp( attr->Name(), "context_identifier" ) ) {
attr->StrToVal( "'STANDARD'" );
}
if( !strcmp( attr->Name(), "context_type" ) ) {
attr->StrToVal( "'3D'" );
}
}
}
stepcomplex = stepcomplex->sc;
}
instance_list->Append( ( SDAI_Application_instance * ) complex_entity, completeSE );
instance_cnt++;
return complex_entity;
}