本文整理汇总了C++中STEPattribute::Raw方法的典型用法代码示例。如果您正苦于以下问题:C++ STEPattribute::Raw方法的具体用法?C++ STEPattribute::Raw怎么用?C++ STEPattribute::Raw使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类STEPattribute
的用法示例。
在下文中一共展示了STEPattribute::Raw方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: switch
STEPcomplex * STEPutil::Geometric_Context( const LenEnum & len, const AngEnum & angle, const char * tolstr )
{
int instance_cnt = 0;
STEPattribute * attr;
STEPcomplex * stepcomplex;
SdaiDimensional_exponents * dimensional_exp = new SdaiDimensional_exponents();
dimensional_exp->length_exponent_( 0.0 );
dimensional_exp->mass_exponent_( 0.0 );
dimensional_exp->time_exponent_( 0.0 );
dimensional_exp->electric_current_exponent_( 0.0 );
dimensional_exp->thermodynamic_temperature_exponent_( 0.0 );
dimensional_exp->amount_of_substance_exponent_( 0.0 );
dimensional_exp->luminous_intensity_exponent_( 0.0 );
instance_list->Append( ( SDAI_Application_instance * ) dimensional_exp, completeSE );
instance_cnt++;
STEPcomplex * ua_length;
// First set up metric units if appropriate. Default to mm.
// If imperial units, set up mm to be used as base to define imperial units.
Si_prefix pfx = Si_prefix__milli;
switch( len )
{
case u_CM:
pfx = Si_prefix__centi;
break;
case u_M:
pfx = Si_prefix_unset;
break;
case u_MM:
case u_IN:
case u_FT:
case u_YD:
break;
}
const char * ua_length_types[4] = { "length_unit", "named_unit", "si_unit", "*" };
ua_length = new STEPcomplex( registry, ( const char ** ) ua_length_types, instance_cnt );
stepcomplex = ua_length->head;
while( stepcomplex )
{
if( !strcmp( stepcomplex->EntityName(), "Si_Unit" ) )
{
stepcomplex->ResetAttributes();
while( ( attr = stepcomplex->NextAttribute() ) != NULL )
{
if( !strcmp( attr->Name(), "prefix" ) )
{
attr->Raw()->e = new SdaiSi_prefix_var( pfx );
}
if( !strcmp( attr->Name(), "name" ) )
{
attr->Raw()->e = new SdaiSi_unit_name_var( Si_unit_name__metre );
}
}
}
stepcomplex = stepcomplex->sc;
}
instance_list->Append( ( SDAI_Application_instance * ) ua_length, completeSE );
instance_cnt++;
// If imperial, create conversion based unit.
if( len >= u_IN )
{
STEPcomplex * len_mm = ua_length;
char lenname[10];
lenname[0] = '\0';
double lenconv;
switch( len )
{
case u_IN:
strcat( lenname, "'INCH'\0" );
lenconv = 25.4;
break;
case u_FT:
strcat( lenname, "'FOOT'\0" );
lenconv = 25.4 * 12.0;
break;
case u_YD:
strcat( lenname, "'YARD'\0" );
lenconv = 25.4 * 36.0;
break;
case u_MM:
case u_CM:
case u_M:
break;
}
SdaiUnit * len_unit = new SdaiUnit( ( SdaiNamed_unit * ) len_mm );
SdaiMeasure_value * len_measure_value = new SdaiMeasure_value( lenconv, config_control_design::t_measure_value );
len_measure_value->SetUnderlyingType( config_control_design::t_length_measure );
SdaiLength_measure_with_unit * len_measure_with_unit = new SdaiLength_measure_with_unit();
len_measure_with_unit->value_component_( len_measure_value );
len_measure_with_unit->unit_component_( len_unit );
instance_list->Append( ( SDAI_Application_instance * ) len_measure_with_unit, completeSE );
instance_cnt++;
//.........这里部分代码省略.........