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

#ifndef MOMENTINTERVAL_H
#define MOMENTINTERVAL_H

class IMakeMomentInterval;
class MomentIntervalDetail;
class NextMI;
class MomentInterval;

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

    void addDetail();

    void calcTotal();

    void recalcTotal();

    void complete();

    void cancel();

    void mi_generateNext();

    void mi_assessWRTPrior();
    
    void mi_assessWRTNext();

    void mi_comparePlanVsActual();

    static void listMIs();

    static void assessAcrossMIs();

  private:

    int number;
    int dateOrDateTimeOrInterval;
    int priority;
    int total;
    int status;

    /** @supplierCardinality 1 */
    IMakeMomentInterval * lnkUnnamed1;

    /**
     *@shapeType AggregationLink
     *    @associates <b>MomentIntervalDetail</b>
     * @clientCardinality 1
     * @supplierCardinality 1..*
     */
    vector<MomentIntervalDetail *> lnkUnnamed;

    /**
     * @supplierCardinality 0..*
     * @clientCardinality 1
     */
    NextMI * lnkUnnamed2;

    /**
     * @supplierCardinality 0..*
     * @clientRole plan
     * @supplierRole actual
     * @clientCardinality 0..1
     */
    MomentInterval * lnkUnnamed3;
};
#endif //MOMENTINTERVAL_H
