//---------------------------------------------------------------------------

#ifndef CDSVmsTrafficFH
#define CDSVmsTrafficFH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <ADODB.hpp>
#include <DB.hpp>
#include "LibSTLF.hpp"
#include "ITSDbF.h"
//---------------------------------------------------------------------------

/*
*  Link Traffic class
*/
class TVmsTraffic
{
public:
    TVmsTraffic();
    virtual ~TVmsTraffic();
    void Clear();
private:
    bool    FModified;
    bool    FCompleted;

public:
    int    LEVL;
    String LINKID;
    int    SPEED;
    String CMTR_GRAD_CD;
    String TRF_GRADE;
    String REGDATE;
    int    DATACNT;
    int    TRVTM;
};
//---------------------------------------------------------------------------

/*
* Link Traffic Manager
*/
class TVmsTrafficManager
{
public:
    TVmsTrafficManager();
    virtual ~TVmsTrafficManager();

    void Init();
    bool IsLoading();

public:
    bool                   FLink;
    bool                   FIfsc;
    bool                   FRoad;
    ListMap<TVmsTraffic>   FLists;

public:
    bool LoadFromDb(TADOConnection *ADbConn=NULL);
};

//---------------------------------------------------------------------------
extern TVmsTrafficManager *VmsTrafficManager;
//---------------------------------------------------------------------------

#endif
