/// <summary> /// Copy-Constructor: creates a new instance of the Parameter /// class, as a deep copy of the Parameter passed as parameter. /// </summary> /// <param name="rhs">The Parameter to be copied.</param> public Parameter(Parameter rhs) { name = rhs.name; type = rhs.type; val = rhs.val; }
/// <summary> /// Adds the specified Parameter to the set held by the Engine. /// If another Parameter was defined in the Engine with the same name, /// the pre-existing Parameter is overwritten. /// <exception cref="System.ApplicationException">Thrown if the Engine /// is currently WORKING.</exception> /// </summary> /// <param name="p"></param> public void AddParameter(Parameter p) { if (status == EngineStatus.WORKING) throw new ApplicationException("CFGLite: [Engine::AddParameter(Parameter)]\n" + "The Engine is currently Working."); //Overwrites any existing parameter with same name ! parameters[p.Name] = p.Clone(); }