The base record type found in TES plugins.
コード例 #1
0
		/// <summary>
		/// Adds the given sub-record to the record.
		/// </summary>
		/// <param name="br">The record to add.</param>
		public override void AddRecord(BaseRecord br)
		{
			SubRecord sr = br as SubRecord;
			if (sr == null) throw new TESParserException("Record to add was not of the correct type." +
				   Environment.NewLine + "Records can only hold Subrecords.");
			SubRecords.Add(sr);
		}
コード例 #2
0
		/// <summary>
		/// Adds the given sub-record to the record.
		/// </summary>
		/// <param name="br">The record to add.</param>
		public override void AddRecord(BaseRecord br)
		{
			Rec r = br as Rec;
			if (r == null) throw new TESParserException("Record to add was not of the correct type." +
				   Environment.NewLine + "Groups can only hold records or other groups.");
			Records.Add(r);
		}
コード例 #3
0
		/// <summary>
		/// Deletes the specified sub-record from the record.
		/// </summary>
		/// <param name="br">The record to delete.</param>
		public override void DeleteRecord(BaseRecord br)
		{
			SubRecord sr = br as SubRecord;
			if (sr == null) return;
			SubRecords.Remove(sr);
		}
コード例 #4
0
		/// <summary>
		/// Deletes the specified sub-record from the record.
		/// </summary>
		/// <param name="br">The record to delete.</param>
		public override void DeleteRecord(BaseRecord br)
		{
			Rec r = br as Rec;
			if (r == null) return;
			Records.Remove(r);
		}
コード例 #5
0
		/// <summary>
		/// Adds the given sub-record to the record.
		/// </summary>
		/// <param name="br">The record to add.</param>
		public abstract void AddRecord(BaseRecord br);
コード例 #6
0
		/// <summary>
		/// Deletes the specified sub-record from the record.
		/// </summary>
		/// <param name="br">The record to delete.</param>
		public abstract void DeleteRecord(BaseRecord br);
コード例 #7
0
		/// <summary>
		/// Adds the given sub-record to the record.
		/// </summary>
		/// <param name="br">The record to add.</param>
		public override void AddRecord(BaseRecord br)
		{
			throw new TESParserException("Subrecords cannot contain additional data.");
		}
コード例 #8
0
		/// <summary>
		/// Deletes the specified sub-record from the record.
		/// </summary>
		/// <param name="br">The record to delete.</param>
		public override void DeleteRecord(BaseRecord br) { }