Skip to content

Commit

Permalink
added comments for publicly visible things of FloatVector3, FeatureLa…
Browse files Browse the repository at this point in the history
…yer, FeatureLayerExt, LabelCategory, Selection
  • Loading branch information
jany-tenaj committed Jun 18, 2016
1 parent fcbf2e1 commit 1deeb73
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 7 deletions.
3 changes: 3 additions & 0 deletions Source/DotSpatial.NTSExtension/FloatVector3.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@

namespace DotSpatial.NTSExtension
{
/// <summary>
/// A float based 3 dimensional vector class, implementing all interesting features of vectors.
/// </summary>
public struct FloatVector3
{
#region Fields
Expand Down
4 changes: 4 additions & 0 deletions Source/DotSpatial.Symbology/FeatureLayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2156,6 +2156,10 @@ private void LabelSetupClick(object sender, EventArgs e)

#endregion

/// <summary>
/// Disposes the resources of the FeatureLayer.
/// </summary>
/// <param name="disposeManagedResources">Indicates whether managed resources should be disposed too.</param>
protected override void Dispose(bool disposeManagedResources)
{
if (disposeManagedResources)
Expand Down
7 changes: 5 additions & 2 deletions Source/DotSpatial.Symbology/FeatureLayerExt.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,17 @@

namespace DotSpatial.Symbology
{
/// <summary>
/// Extension methods for DotSpatial.Symbology.IFeatureLayer.
/// </summary>
public static class FeatureLayerExt
{
#region Methods

/// <summary>
/// Inverts the selection
/// Inverts the selection.
/// </summary>
/// <param name="featureLayer"></param>
/// <param name="featureLayer">IFeatureLayer whose selection is inverted.</param>
public static void InvertSelection(this IFeatureLayer featureLayer)
{
Envelope ignoreMe;
Expand Down
12 changes: 8 additions & 4 deletions Source/DotSpatial.Symbology/LabelCategory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public class LabelCategory : ILabelCategory
private ILabelSymbolizer _symbolizer;


private Expression _exp;
private readonly Expression _exp;

#endregion

Expand Down Expand Up @@ -94,6 +94,10 @@ public virtual LabelCategory Copy()
return result;
}

/// <summary>
/// Returns the categories name or "No Name" if the name is not set.
/// </summary>
/// <returns>The categories name or "No Name" if the name is not set.</returns>
public override string ToString()
{
return string.IsNullOrEmpty(Name) ? "<No Name>" : Name;
Expand All @@ -114,14 +118,14 @@ public bool UpdateExpressionColumns(DataColumnCollection columns)
/// </summary>
/// <param name="row">Datarow the expression gets calculated for.</param>
/// <param name="selected">Indicates whether the feature is selected.</param>
/// <param name="FID">The FID of the feature, the expression gets calculated for.</param>
/// <param name="fid">The FID of the feature, the expression gets calculated for.</param>
/// <returns>null if there was an error while parsing the expression, else the calculated expression</returns>
public string CalculateExpression(DataRow row, bool selected, int FID)
public string CalculateExpression(DataRow row, bool selected, int fid)
{
string ff = (selected ? _selectionSymbolizer : _symbolizer).FloatingFormat;
_exp.FloatingFormat = ff != null ? ff.Trim() : "";
_exp.ParseExpression(_expression);
return _exp.CalculateRowValue(row, FID);
return _exp.CalculateRowValue(row, fid);
}

#endregion
Expand Down
5 changes: 4 additions & 1 deletion Source/DotSpatial.Symbology/Selection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,15 @@

namespace DotSpatial.Symbology
{
/// <summary>
/// Selection is used to remember all the selected features of the corresponding IFeatureSet.
/// </summary>
public class Selection : FeatureSelection
{
#region Constructors

/// <summary>
/// Creates a new instance of Selection
/// Creates a new instance of Selection.
/// </summary>
public Selection(IFeatureSet fs, IDrawingFilter inFilter)
: base(fs, inFilter, FilterType.Selection)
Expand Down

0 comments on commit 1deeb73

Please sign in to comment.