Files
LibBSP/LibBSP/Source/Attributes/IndexAttribute.cs
Will 9bf45765a5 Moderate refactor.
Removes "Source" from in front of source engine structures.
Spells out full names of structures in class names.
Adds punctuation to all documentation comments and fixes some mistakes.
Adds some missing documentation comments.
2016-01-26 22:37:52 -07:00

26 lines
1.0 KiB
C#

using System;
using System.Collections.Generic;
namespace LibBSP {
/// <summary>
/// Custom Attribute class to mark a member of a struct as an index into another lump. The
/// member this Attribute is applied to should always be paired with a member with a
/// <see cref="CountAttribute"/> applied to it. The two attributes can the be used to grab a range of objects
/// from the specified lump through the
/// <see cref="BSP.GetReferencedObjects&lt;T&gt;(System.Object, System.String)"/> method.
/// </summary>
public class IndexAttribute : Attribute {
public string lumpName;
/// <summary>
/// Constructs a new instance of an <see cref="IndexAttribute"/> object. The member this Attribute
/// is applied to will be used as an index into the lump referenced by <paramref name="lumpName"/>.
/// </summary>
/// <param name="lumpName">The lump the member is an index into. Corresponds to the public properties in the <see cref="BSP"/> class.</param>
public IndexAttribute(string lumpName) {
this.lumpName = lumpName;
}
}
}