valid_units

EXPRESS specification:

FUNCTION valid_units
( m : measure_with_unit ) : BOOLEAN; IF 'STRUCTURAL_FRAME_SCHEMA.LENGTH_MEASURE' IN TYPEOF ( m.value_component ) THEN IF derive_dimensional_exponents ( m.unit_component ) <> dimensional_exponents ( 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ) THEN RETURN (FALSE); END_IF; END_IF; IF 'STRUCTURAL_FRAME_SCHEMA.MASS_MEASURE' IN TYPEOF ( m.value_component ) THEN IF derive_dimensional_exponents ( m.unit_component ) <> dimensional_exponents ( 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0 ) THEN RETURN (FALSE); END_IF; END_IF; IF 'STRUCTURAL_FRAME_SCHEMA.TIME_MEASURE' IN TYPEOF ( m.value_component ) THEN IF derive_dimensional_exponents ( m.unit_component ) <> dimensional_exponents ( 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0 ) THEN RETURN (FALSE); END_IF; END_IF; IF 'STRUCTURAL_FRAME_SCHEMA.THERMODYNAMIC_TEMPERATURE_MEASURE' IN TYPEOF ( m.value_component ) THEN IF derive_dimensional_exponents ( m.unit_component ) <> dimensional_exponents ( 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0 ) THEN RETURN (FALSE); END_IF; END_IF; IF 'STRUCTURAL_FRAME_SCHEMA.PLANE_ANGLE_MEASURE' IN TYPEOF ( m.value_component ) THEN IF derive_dimensional_exponents ( m.unit_component ) <> dimensional_exponents ( 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ) THEN RETURN (FALSE); END_IF; END_IF; IF 'STRUCTURAL_FRAME_SCHEMA.SOLID_ANGLE_MEASURE' IN TYPEOF ( m.value_component ) THEN IF derive_dimensional_exponents ( m.unit_component ) <> dimensional_exponents ( 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ) THEN RETURN (FALSE); END_IF; END_IF; IF 'STRUCTURAL_FRAME_SCHEMA.AREA_MEASURE' IN TYPEOF ( m.value_component ) THEN IF derive_dimensional_exponents ( m.unit_component ) <> dimensional_exponents ( 2.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ) THEN RETURN (FALSE); END_IF; END_IF; IF 'STRUCTURAL_FRAME_SCHEMA.VOLUME_MEASURE' IN TYPEOF ( m.value_component ) THEN IF derive_dimensional_exponents ( m.unit_component ) <> dimensional_exponents ( 3.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ) THEN RETURN (FALSE); END_IF; END_IF; IF 'STRUCTURAL_FRAME_SCHEMA.RATIO_MEASURE' IN TYPEOF ( m.value_component ) THEN IF derive_dimensional_exponents ( m.unit_component ) <> dimensional_exponents ( 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ) THEN RETURN (FALSE); END_IF; END_IF; IF 'STRUCTURAL_FRAME_SCHEMA.POSITIVE_LENGTH_MEASURE' IN TYPEOF ( m.value_component ) THEN IF derive_dimensional_exponents ( m.unit_component ) <> dimensional_exponents ( 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ) THEN RETURN (FALSE); END_IF; END_IF; IF 'STRUCTURAL_FRAME_SCHEMA.POSITIVE_PLANE_ANGLE_MEASURE' IN TYPEOF ( m.value_component ) THEN IF derive_dimensional_exponents ( m.unit_component ) <> dimensional_exponents ( 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ) THEN RETURN (FALSE); END_IF; END_IF; RETURN (TRUE);
END_FUNCTION;