/// <summary>
        /// Sets the deserializer associated with the action when the action is created.
        /// </summary>
        /// <param name="deserializer">The deserializer.</param>
        public BaseXmlAction(TorqueXmlDeserializer deserializer)
        {
            if (deserializer == null)
                throw new Exception("BaseXmlAction Constructor - Invalid deserializer!");

            _deserializer = deserializer;
        }
        /// <summary>
        /// Sets the various properties associated with this action.
        /// </summary>
        /// <param name="isObjTypeRef">True if the name is an object type, false if it is a named object.</param>
        /// <param name="nameRef">The name.</param>
        /// <param name="fieldOrProperty">The field or property instance to set.</param>
        /// <param name="targetInstance">The object whose property is being set.</param>
        /// <param name="d">The deserializer.</param>
        public BindNameRefAction(bool isObjTypeRef, string nameRef, IFieldOrProperty fieldOrProperty, ref object targetInstance, TorqueXmlDeserializer d)
            : base(d)
        {
            Assert.Fatal(nameRef != null && nameRef != string.Empty, "BindNameRefAction Constructor - Invalid name specified!");
            Assert.Fatal(fieldOrProperty != null, "BindNameRefAction Constructor - Invalid field or property specified!");
            Assert.Fatal(targetInstance != null, "BindNameRefAction Constructor - Invalid target instance specified!");

            _lookup = new LookupNameRefAction(isObjTypeRef, nameRef, d);
            _fieldOrProperty = fieldOrProperty;
            _targetInstance = targetInstance;
        }
        /// <summary>
        /// Sets the various properties associated with this action.
        /// </summary>
        /// <param name="isObjTypeRef">True if the name is an object type, false if it is a named object.</param>
        /// <param name="nameRef">The name of the object to look up.</param>
        /// <param name="d">The deserializer.</param>
        public LookupNameRefAction(bool isObjTypeRef, string nameRef, TorqueXmlDeserializer d)
            : base(d)
        {
            Assert.Fatal(nameRef != null && nameRef != string.Empty, "LookupNameRefAction Constructor - Invalid name specified!");

            _isObjTypeRef = isObjTypeRef;
            _nameRef = nameRef;
        }
        /// <summary>
        /// Load the engine settings from the specified file. Returns the new TorqueEngineSettings instance. If
        /// the file cannot be loaded, null is returned. The settings in the file will override the defaults
        /// that are hardcoded in the class definition.
        /// </summary>
        /// <param name="filename">The filename to load settings from.</param>
        /// <returns>The new settings object.</returns>
        public static TorqueEngineSettings Load(string filename)
        {
            if (filename == null || filename == string.Empty)
            {
                TorqueConsole.Warn("TorqueEngineSettings.Load - Settings file not specified.");
                return null;
            }

            FileInfo f = new FileInfo(filename);
            if (!f.Exists)
            {
                TorqueConsole.Warn("TorqueEngineSettings.Load - Settings file {0} not found.", filename);
                return null;
            }

            TorqueXmlDeserializer d = new TorqueXmlDeserializer();
            TorqueEngineSettings settings = new TorqueEngineSettings();
            d.Process(filename, settings);

            return settings;
        }