public void ParseGWACommand()
        {
            if (this.GWACommand == null)
            {
                return;
            }

            var obj = new StructuralBridgePath();

            var pieces = this.GWACommand.ListSplit("\t");

            var counter = 1; // Skip identifier

            this.GSAId        = Convert.ToInt32(pieces[counter++]);
            obj.ApplicationId = Helper.GetApplicationId(this.GetGSAKeyword(), this.GSAId);
            obj.Name          = pieces[counter++].Trim(new char[] { '"' });

            //PATH.1 \t2    \tPath One\tCWAY_1WAY\t1    \t1             \t-6.8\t6.8  \t0.5
            //keyword\tIndex\tName    \tPathType \tGroup\tAlignmentIndex\tLeft\tRight\tLeftRailFactor

            obj.PathType = GWAStringToPathType(pieces[counter++]);
            //obj.Gauge = 0;
            counter++; //Group
            counter++; //AlignmentIndex
            counter++; //Left
            counter++; //Right
            obj.LeftRailFactor = pieces[counter++].ToDouble();

            this.Value = obj;
        }
 public static string ToNative(this StructuralBridgePath path)
 {
     return(new GSABridgePath()
     {
         Value = path
     }.SetGWACommand());
 }
Esempio n. 3
0
 public static string ToNative(this StructuralBridgePath path)
 {
     return(SchemaConversion.Helper.ToNativeTryCatch(path, () => new GSABridgePath()
     {
         Value = path
     }.SetGWACommand()));
 }
        public void ParseGWACommand()
        {
            if (this.GWACommand == null)
            {
                return;
            }

            var obj = new StructuralBridgePath();

            var pieces = this.GWACommand.ListSplit("\t");

            var counter = 1; // Skip identifier

            this.GSAId        = Convert.ToInt32(pieces[counter++]);
            obj.ApplicationId = HelperClass.GetApplicationId(this.GetGSAKeyword(), this.GSAId);
            obj.Name          = pieces[counter++].Trim(new char[] { '"' });

            //TO DO: change these defaults for the real thing
            obj.PathType       = StructuralBridgePathType.Lane;
            obj.Gauge          = 0;
            obj.LeftRailFactor = 0;

            this.Value = obj;
        }