/******************************************************************************
** Copyright(c) 2025 MAK Technologies, Inc.
** All rights reserved.
******************************************************************************/

//! \file DtCDBAttributeIndex.h
//! \brief Abstract class to manage Cdb class/instance attributes indexes (dbf) information
//! \ingroup osgearth_cdb_utils

#pragma once

#include <osgearth_cdb_utils/DtCDBExport.h>

#define theINDEXNOTINITIALIZED -1

namespace makVrv {
   namespace oe {
      namespace CDB
      {
         //! \brief Class used to keep "class" indexes attributes index dbf information 
         //! \ingroup osgearth_cdb_utils
         class DT_DLL_OSGEARTH_CDB_UTILS DtCDBClassIndex
         {
         public:
            //! \brief  CTOR
            DtCDBClassIndex();

            // *** Common Indexes ****

            //! \brief (Class) CNAM Column index
            int myClassIndexCNAM;
            //! \brief (Class) Feature Attribute Classification Code Column index
            int myClassIndexFACC;
            //! \brief (Class) FACC Sub Code Column index
            int myClassIndexFSC;
            //! \brief (Class) Composite Material Index Column index
            int myClassIndexCMIX;
            //! \brief (Class) Absolute Height Flag Column index
            int myClassIndexAHGT;
            //! \brief (Class) Height above Surface Level Column index
            int myClassIndexHGT;
            //! \brief (Class) Model Name Column index
            int myClassIndexMODL;
            //! \brief (Class) flag indicating whether the modeled feature is geotypical or geospecific.
            int myClassIndexMODT;
            //! \brief (Class) Model Bounding Sphere Index
            int myClassIndexBSR;
            //! \brief (Class) Model Bounding Box Height Index

            // *** Start GT Indexes ****

            //! \brief (Class) Model Name Column index
            int myClassIndexBBH;
            //! \brief (Class) Model Bounding Box Weight Index
            int myClassIndexBBW;
            //! \brief (Class) Model Bounding Box Length Index
            int myClassIndexBBL;

            // *** Start GS Specific Indexes ****
            //! \brief (Class) Model Level Of Detail index
            int myClassIndexMLOD;

            // *** Start LightPoint Specific Indexes ****

            //! \brief Class LTYP Column index
            int myClassIndexLTYP;

            // *** Start T2D Geometry Model Specific Indexes ****

            //! \brief T2D flt model ID index
            int myClassIndexModelID;
            //! \brief T2D flt model SigSize index
            int myClassIndexSigSize;
            //! \brief T2D flt model LayerCount index
            int myClassIndexLayerCount;
            //! \brief T2D flt model TexName index
            int myClassIndexTexName;
            //! \brief T2D flt model PointUV index
            int myClassIndexPointUV;

            // *** Start GeoPolitical Specific Indexes ****

            //! \brief Density Measure (% light cover) – Lighting cover measured by
            //! percent within area of feature at night
            int myClassIndexDML;
            //! \brief Light Material IndeX – Index into the Composite Material Table that
            //! is used to determine the Light Material composition of the associated
            //! city illumination
            int myClassIndexLMIX;
            //! \brief Location Accuracy - A precision value used to quantify the relative
            //! precision of the Location point representing the specific GeoPolitical
            //! Location.
            int myClassIndexLACC;


            // *** Start RoadNetwork/RailRoadNetwork Specific Indexes ****

            //! \brief Traffic Flow Index
            int myClassIndexTRF;
            //! \brief Lane/Track Number - The number of track(s) or lanes of the feature, including both directions.
            int myClassIndexLTN;
            //! \brief Width with Greater than 1 meter Precision
            int myClassIndexWGP;
            //! \brief Directivity - The general direction of the feature (unidirectional, bidirectional, Omni-directional).
            int myClassIndexDIR;

         };

         //! Class used to keep "instance" indexes attributes dbf information 
         //! \ingroup osgdb_osgearth_model_cdb
         class DT_DLL_OSGEARTH_CDB_UTILS DtCDBInstanceIndex
         {
         public:
            //! \brief  CTOR
            DtCDBInstanceIndex();

            // *** Common Indexes ****

            //! \brief (Instance) Class Name Column index
            int myInstanceIndexCNAM;
            //! \brief (Instance) Angle of Orientation Column index
            int myInstanceIndexAO1;


            // *** Start GT Specific Indexes ****

            //! \brief (Instance) Scaling X Column index
            int myInstanceIndexSCALx;
            //! \brief (Instance) Scaling Y Column index
            int myInstanceIndexSCALy;
            //! \brief (Instance) Scaling Z  Column index
            int myInstanceIndexSCALz;


            // *** Start GS Specific Indexes ****


            // *** Start GeoPolitical Specific Indexes ****

            //! \brief Layer Priority Number – A vector feature is “visible” if it has a
            //! higher numeric layer number than other coplanar vector feature.
            int myInstanceIndexLPN;
            //! \brief Boundary Type - A value that uniquely represents the Boundary
            //! Attribution Type.
            int myInstanceIndexBOTY;
            //! \brief Location Type - A value that uniquely represents the Location
            //! Attribution Type.
            int myInstanceIndexLOTY;
            //! \brief Populated Place Type - A value that uniquely represents the
            //! Populated Place Attribution Type
            int myInstanceIndexPOPT;
         
            // *** Start LightPoint Specific Indexes ****

            //! \brief Instance APID Column index
            int myInstanceIndexAPID;
            //! \brief Instance LPH Column index
            int myInstanceIndexLPH;
            //! \brief Instance RWID Column index
            int myInstanceIndexRWID;

            // *** Start RoadNetwork/RailRoadNetwork Specific Indexes ****
            //! \brief LENgth of Lineal
            int myInstanceIndexLENL;
            //! \brief Relative TActical Importance
            int myInstanceIndexRTAI;
            //! \brief Width 
            int myInstanceIndexWGP;
            //! \brief Start Junction ID
            int myInstanceIndexSJID;
            //! \brief End Junction ID
            int myInstanceIndexEJID;

            // *** Start HydrographyNetwork Specific Indexes ****
            //! \brief Depth below surface level
            int myInstanceIndexDEP;

         };

      }
   }
} // namespace makVrv::oe::CDB
