public JointFunctionEvent(XmlNode xmlNode)
 {
     XmlNodeList jointTypeNodeList = xmlNode.SelectNodes("jointType");
     if (jointTypeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in jointTypeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 jointTypeIDRef = item.Attributes["id"].Name;
                 JointTypeEnum ob = JointTypeEnum();
                 IDManager.SetID(jointTypeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 jointTypeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 jointType = new JointTypeEnum(item);
             }
         }
     }
     
 
     XmlNodeList functionsNodeList = xmlNode.SelectNodes("functions");
     if (functionsNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in functionsNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 functionsIDRef = item.Attributes["id"].Name;
                 Functions ob = Functions();
                 IDManager.SetID(functionsIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 functionsIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 functions = new Functions(item);
             }
         }
     }
     
 
 }
 public JointSubEvent(XmlNode xmlNode)
 {
     XmlNodeList jointTypeNodeList = xmlNode.SelectNodes("jointType");
     if (jointTypeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in jointTypeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 jointTypeIDRef = item.Attributes["id"].Name;
                 JointTypeEnum ob = JointTypeEnum();
                 IDManager.SetID(jointTypeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 jointTypeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 jointType = new JointTypeEnum(item);
             }
         }
     }
     
 
     XmlNodeList subEventNodeList = xmlNode.SelectNodes("subEvent");
     
     foreach (XmlNode item in subEventNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 subEventIDRef = item.Attributes["id"].Name;
                 List<SubEvent> ob = new List<SubEvent>();
                 ob.Add(new SubEvent(item));
                 IDManager.SetID(subEventIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 subEventIDRef = item.Attributes["href"].Name;
             }
             else
             {
             subEvent.Add(new SubEvent(item));
             }
         }
     }
     
 
 }
Esempio n. 3
0
 public void UpdateJointDetails()
 {
     if (parentJoint == null)
     {
         jointType            = JointTypeEnum.Root;
         distanceFromLastFork = 0;
     }
     else
     {
         distanceFromLastFork = (parentJoint.jointType == JointTypeEnum.Fork) ? 1 : parentJoint.distanceFromLastFork + 1;
         if (childCount == 0)
         {
             jointType = JointTypeEnum.End;
         }
         else if (childCount == 1)
         {
             jointType = JointTypeEnum.Joint;
         }
         else
         {
             jointType = JointTypeEnum.Fork;
         }
     }
 }
 public JointFSubEvent(XmlNode xmlNode)
 {
     XmlNodeList jointTypeNodeList = xmlNode.SelectNodes("jointType");
     if (jointTypeNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in jointTypeNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 jointTypeIDRef = item.Attributes["id"].Name;
                 JointTypeEnum ob = JointTypeEnum();
                 IDManager.SetID(jointTypeIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 jointTypeIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 jointType = new JointTypeEnum(item);
             }
         }
     }
     
 
     XmlNodeList mainEventNodeList = xmlNode.SelectNodes("mainEvent");
     if (mainEventNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in mainEventNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 mainEventIDRef = item.Attributes["id"].Name;
                 XsdTypeBoolean ob = XsdTypeBoolean();
                 IDManager.SetID(mainEventIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 mainEventIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 mainEvent = new XsdTypeBoolean(item);
             }
         }
     }
     
 
     XmlNodeList subEventNodeList = xmlNode.SelectNodes("subEvent");
     if (subEventNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in subEventNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 subEventIDRef = item.Attributes["id"].Name;
                 XsdTypeBoolean ob = XsdTypeBoolean();
                 IDManager.SetID(subEventIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 subEventIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 subEvent = new XsdTypeBoolean(item);
             }
         }
     }
     
 
 }
 public virtual bool getJointTypeRaw(int axis, JointTypeEnum type)
 {
     return false;
 }