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

#ifndef CDSNodeFH
#define CDSNodeFH
//---------------------------------------------------------------------------

#include <Classes.hpp>
#include <ADODB.hpp>
#include <DB.hpp>
#include "cxCustomData.hpp"
#include "ITSLibF.h"
#include "ITSDbF.h"
#include "CDSLayerF.h"
//---------------------------------------------------------------------------

/*
*  Node class
*/
class TItsNode
{
public:
    TItsNode();
    virtual ~TItsNode();
    void Clear();

private:
    bool    FModified;
    bool    FCompleted;

public:
    String  NODE_ID;
    String  NODE_TYPE;
    String  NODE_NAME;
    String  TURN_P;
    String  RMRK;
    double  X_CRDN;
    double  Y_CRDN;

public:
    __property bool   Modified  = {read = FModified};
    __property bool   Completed = {read = FCompleted, write = FCompleted};
};
//---------------------------------------------------------------------------

/*
* Node Manager
*/
class TItsNodeManager
{
public:
    TItsNodeManager();
    virtual ~TItsNodeManager();

public:
    TItsMap<String, TItsNode*>   FLists;

public:
    bool LoadFromDb(TADOConnection *ADbConn=NULL);
};
//---------------------------------------------------------------------------
extern TItsNodeManager *ItsNodeManager;
//---------------------------------------------------------------------------


#endif

