예제 #1
0
        private static ActionView ReadActionView(StageElement ave, QualifierView parent)
        {
            var connectorType = ave.AttributeValueOrDefault <string>(AttributeName.ConnectorType, null);

            ActionView av;

            if (connectorType == ConnectorType.Selector)
            {
                av = new SelectorActionView();
            }
            else if (connectorType == ConnectorType.AILink)
            {
                av = new AILinkActionView();
            }
            else if (connectorType == ConnectorType.Composite)
            {
                av = new CompositeActionView();
            }
            else
            {
                av = new ActionView();
            }

            av.name        = ave.ValueOrDefault <string>(ElementName.Name, null);
            av.description = ave.ValueOrDefault <string>(ElementName.Description, null);
            av.parent      = parent;

            return(av);
        }