Ejemplo n.º 1
0
 public AbstractEdge(string name, long unid, bool showAnnotation, int weight, Position position, Transition transition, EdgeType edgeType)
     : base(name, unid, showAnnotation)
 {
     this.weight = weight;
     this.position = position;
     this.transition = transition;
     this.edgeType = edgeType;
 }
Ejemplo n.º 2
0
 public EdgeTransitionPosition(string name, long unid, bool showAnnotation, int weight, Transition transition, Position position, EdgeType edgeType)
     : base(name, unid, showAnnotation, weight, position, transition, edgeType)
 {
 }
Ejemplo n.º 3
0
 public EdgeTransitionPosition(AbstractItemData itemData, int weight, Transition transition, Position position, EdgeType edgeType)
     : this(itemData.name, itemData.unid, itemData.showAnnotation, weight, transition, position, edgeType)
 {
 }
Ejemplo n.º 4
0
 internal static AbstractEventDrivenItem openFromXml(XmlNode node)
 {
     List<Token> tokens = null;
     List<PetriEvent> events = null;
     XmlNodeList list = node.ChildNodes;
     foreach (XmlNode childNode in list)
     {
         string namespaceUri = childNode.NamespaceURI;
         string localName = childNode.LocalName;
         switch (namespaceUri)
         {
             case PetriXmlHelper.XML_POSITION_NAMESPACE:
                 switch (localName)
                 {
                     case "Tokens":
                         tokens = Position.openTokensFromXml(childNode.ChildNodes);
                         break;
                 }
                 break;
             case PetriXmlHelper.XML_ITEM_NAMESPACE:
                 switch (localName)
                 {
                     case "Events":
                         events = PetriEvent.openEvents(childNode.ChildNodes, "ItemEvent");
                         break;
                 }
                 break;
         }
     }
     int capacityLimit = Position.openCapacityLimitAttrFromNode(node);
     Position ret = new Position(AbstractItem.readItem(node), capacityLimit);
     ret.EventTrunk.addEvents(events);
     ret.tokens.AddRange(tokens);
     return ret;
 }