using System;
using System.Collections.Generic;
using System.Text;
namespace Nuclex.Support.Tracking {
/// Progression with an associated weight for the total progress
public class WeightedProgression where ProgressionType : Progression {
///
/// Initializes a new weighted progression with a default weight of 1.0
///
/// Progression whose progress to monitor
public WeightedProgression(ProgressionType progression) : this(progression, 1.0f) { }
/// Initializes a new weighted progression
/// Progression whose progress to monitor
/// Weighting of the progression's progress
public WeightedProgression(ProgressionType progression, float weight) {
this.progression = progression;
this.weight = weight;
}
/// Progression being wrapped by this weighted progression
public ProgressionType Progression {
get { return this.progression; }
}
/// The contribution of this progression to the total progress
public float Weight {
get { return this.weight; }
}
/// Progression whose progress we're tracking
private ProgressionType progression;
/// Weighting of this progression in the total progress
private float weight;
}
} // namespace Nuclex.Support.Tracking