コード例 #1
0
 /// <summary>
 /// cTor: private copy constructor
 /// </summary>
 /// <param name="other"></param>
 private ActionMapsCls(ActionMapsCls other)
 {
     this.version = other.version;
     this.m_js    = other.m_js;
     this.m_GUIDs = other.m_GUIDs;
     // other ref objects are not populated here
 }
コード例 #2
0
        /// <summary>
        /// Copy return all ActionMaps while reassigning the JsN Tag
        /// </summary>
        /// <param name="newJsList">The JsN reassign list</param>
        /// <returns>The ActionMaps copy with reassigned input</returns>
        public ActionMapsCls ReassignJsN(JsReassingList newJsList)
        {
            var newMaps = new ActionMapsCls(this)
            {
                m_uiCustHeader  = (UICustHeader)this.m_uiCustHeader.Clone( ),
                m_tuningOptions = (Tuningoptions)this.m_tuningOptions.Clone( ),
                m_deviceOptions = (Deviceoptions)this.m_deviceOptions.Clone( )
            };

            foreach (ActionMapCls am in this)
            {
                newMaps.Add(am.ReassignJsN(newJsList)); // creates the deep copy of the tree
            }
            // remap the tuning options
            newMaps.m_tuningOptions.ReassignJsN(newJsList);

            return(newMaps);
        }