// $Source: /usr/local/SimSoft/SoftShop/NewSimC/Kalender.h,v $
// $Revision: 1.14 $
// $Author: baum $
// $Date: 2001/11/29 15:52:23 $
//
// Login name of the user who locked the revision
// $Locker:  $
// Tag name used to checkout the file
// $Name: Release-20 $
// State assigned to revision
// $State: Exp $
//
//
// $Log: Kalender.h,v $
// Revision 1.14  2001/11/29 15:52:23  baum
// -In Kalender.cpp und Kalender.h Handsteuerung eingebaut
//

#ifndef _KALENDER_H
#define _KALENDER_H     1

#include "SimTime.h"
#include "List.h"

#ifdef _KALENDER_CPP
#  undef _impexp
#  define _impexp __declspec(dllexport)
#elif defined BUILD_NEWSIMC_DLL
#  undef _impexp
#  define _impexp 
#else
#  undef _impexp
#  define _impexp __declspec(dllimport)
#endif

#if defined __GNUC__ || defined __hpux
#  undef _impexp
#  define _impexp
#endif

//---------------------------------------------------------
// Zeitmechanismus
//---------------------------------------------------------

class _impexp notiz {
  public:
    notiz (const SimTime& zeit, int typ, int info1 = 0, int info2 = 0, 
                                        int info3 = 0);
    notiz (const notiz&);					
    ~notiz ();
    static void setup ();
    static void cleanup ();
    static bool isInitialized ();
    const SimTime& Zeit () const;
    void setZeit (const SimTime& zeit);
    int Typ() const;
    void setTyp (int typ);
    int Info1 () const;
    int Info2 () const;
    int Info3 () const;
    void setInfo3 (int info);
    void planeein ();
    void planesofort ();
    void cancel ();

    ostream& print (ostream& ostrm) const;

    static int AktTyp ();
    static int AktInfo1 ();
    static int AktInfo2 ();
    static int AktInfo3 ();

    static const SimTime& NextEventTime ();

    static void  druckkalender (ostream& ostrm);
    static bool  waslos ();
    static void  planeein (const SimTime& zeit, int typ, int info1 = 0, 
                           int info2 = 0, int info3 = 0);
    static void  planedelta (const SimTime& zeit, int typ, int info1 = 0, 
                             int info2 = 0, int info3 = 0);
    static void  planesofort (int typ, int info1 = 0, int info2 = 0, 
                              int info3 = 0);
 // fuer Testzwecke rei050506
    static int inKalender (int ET);
  private:
    notiz ();	// deklariert, aber nicht implementiert

    SimTime ObjZeit;
    int ObjTyp;
    int ObjInfo1, ObjInfo2, ObjInfo3;

    static notiz*      ClassAktuell;
    static List<notiz> ClassKalender;
    static LCursor<notiz> ClassNext;

    friend _impexp bool waslos ();			      
    friend _impexp const SimTime& Modellzeit ();			      
}; // notiz

inline ostream& operator << (ostream& o, const notiz& n) {
  return n.print(o);
}

_impexp extern int rzs;
_impexp extern int rzsmanuell;
_impexp extern int echtzeitsim;

//---rudi---03.Sept.2001
_impexp extern int hla;
_impexp extern hlaAsynchronousDelivery; // rudi
_impexp extern hlaTimeRegulating; // rudi
_impexp extern hlaTimeConstrained; // rudi
_impexp extern hlaRzsEcho; // rudi
_impexp extern hlaRemoteControl; // rudi

_impexp const SimTime& Modellzeit ();
_impexp const SimTime& Modellende ();
_impexp void  setModellende (const SimTime& ende);

#endif // !_KALENDER_H 
