Ejemplo n.º 1
0
        /// <summary>
        /// Recursive function to get the hierarchy of current active states
        /// </summary>
        /// <returns> Returns the text string containing the hierarchy of active states</returns>
        public string GetActiveStateTreeText(int level)
        {
            string result = "";

            if (m_State != null)
            {
                for (int i = 0; i < level * 4; i++)
                {
                    result += " ";
                }
                result += m_State.ToString();
                result += "\n";
            }

            for (int i = 0; i < m_ChildSMs.Count; i++)
            {
                result += m_ChildSMs[i].GetActiveStateTreeText(level + 1);
            }

            return(result);
        }