/*-------------------------------------------------------------------------------
Copyright (c)2000 TogetherSoft Corporation. Patents pending. All rights reserved.
-------------------------------------------------------------------------------*/

#ifndef MOMENTINTERVAL_H
#define MOMENTINTERVAL_H

class IMakeMomentInterval;

/**
 * @stereotype moment-interval 
 */
class MomentInterval {
  public:
    int makeMomentInterval();

    void addDetail();

    void calcTotal();

    void recalTotal();

    void complete();

    void cancel();

    void mi_generateNext();

    void mi_assessWRTPrior();

    void mi_assessWRTNext();

    void mi_comparePlanVsActual();

    static int listMIs();

    static int assessAcrossMIs();

  private:
    int number;
    int dateOrDateTimeOrInterval;
    int priority;
    int total;
    int status;

    /**
     * @clientCardinality 0..1
     * @clientRole plan
     * @supplierCardinality 0..*
     * @supplierRole actual 
     */
    MomentInterval * lnkMomentInterval;

    /**
     * @shapeType AggregationLink
     * @associates <b>MIDetail</b>
     * @supplierCardinality 1..*
     * @clientCardinality 1 
     */
    vector < MIDetail * > lnkMIDetail;

    /**
     * @supplierCardinality 1 
     */
    IMakeMomentInterval * lnkIMakeMomentInterval;
};
#endif //MOMENTINTERVAL_H
