Esempio n. 1
0
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;
}
Esempio n. 2
0
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;
}
Esempio n. 3
0
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;
}
Esempio n. 4
0
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;
}