int AngleTrans::UnitStringToUnitClass(const StdString& UnitString) { for (int i = 0;i < ANGLE_UNIT_NUM;i++) { if ( UnitString.CompareNoCase( AngleTrans::UnitStringArray[i] ) == 0 ) { return i; } } assert(0); return -1; }
int MomentTrans::UnitStringToUnitClass( const StdString& UnitClass ) { for ( int i = 0;i < MOMENT_UNIT_NUM;i++ ) { if ( UnitClass.CompareNoCase( MomentTrans::UnitStringArray[i] ) == 0 ) { return i; } } assert( 0 ); return -1; }
int SpeedTrans::UnitStringToUnitClass(const StdString& UnitString) { for (int i = 0; i < SPEED_UNIT_NUM; i++) { if (UnitString.CompareNoCase( SpeedTrans::UnitStringArray[i] ) == 0 ) { return i; } } assert(0); return -1; }
int DensityTrans::UnitStringToUnitClass(const StdString& UnitString) { for (int i = 0; i < DENSITY_UNIT_NUM; i++) { if (UnitString.CompareNoCase( DensityTrans::UnitStringArray[i] ) == 0 ) { return i; } } assert(0); return -1; }