예제 #1
0
        /// <summary>
        /// Instantiates the enum.
        /// </summary>
        /// <param name="parent">Parent enum group.</param>
        protected EnumBase(EnumGroupBase parent)
        {
            // If this is not the root.
            if (parent != null)
            {
                ParentEnum = parent;

                EnumGroupBase root = ParentEnums.Last();

                BitIndex = root.Length;

                // Increase number of registered enums.
                foreach (EnumGroupBase parentGroup in ParentEnums)
                {
                    ++parentGroup.Length;
                }
            }
        }
예제 #2
0
 /// <summary>
 /// Instantiates the enum group.
 /// </summary>
 /// <param name="parent">Parent enum group.</param>
 protected EnumGroupBase(EnumGroupBase parent)
     : base(parent)
 {
 }