Example #1
0
        /// <summary>
        /// Constructor from element
        /// </summary>
        /// <param name="element">The element</param>
        /// <param name="system">Parent system</param>
        /// <param name="creator">Creation interface</param>
        public SimulinkSubsystem(XElement element, SimulinkSubsystem system,
                                 IBlockCodeCreator creator)
            : base(element, system)
        {
            XElement e = null;

            XElement[] children = StaticExtensionXmlParserLibrary.GetChildren(element);
            foreach (XElement child in children)
            {
                if (child.Name.Equals(SimulinkXmlParser.SystemStr))
                {
                    e = child;
                }
            }
            Create(e);
            if (system == null)
            {
                SetArrows(creator);
            }
            CreateConst();
        }
Example #2
0
 /// <summary>
 /// Gets children of Xml element
 /// </summary>
 /// <param name="element">The element</param>
 /// <returns>The children</returns>
 public static XElement[] GetChildren(XElement element)
 {
     return(StaticExtensionXmlParserLibrary.GetChildren(element));
 }