// Version: 2014.10.23 15:25:41 #ifndef _T_TRK_MAP_H #define _T_TRK_MAP_H #include #include #include #ifdef _MSC_VER #pragma warning(disable:4996) #pragma warning(disable:4267) #endif #include "T_TRK_MAPDBAX.h" class T_TRK_MAP{ friend class T_TRK_MAPDBAX; private: //aggregation to DB Class T_TRK_MAPDBAX db; public: // //A T T R I B U T E S //=================== // bool dbAccess; char* dbMessage;// pointer for the return values of DBAX methodes char messageBuffer[200];// temporary message buffer friend class PapLib; protected: // //A T T R I B U T E S //=================== // long l_SectionNo; long l_InnerId; short s_InnerIdZi; char c_extId[20+1]; short s_extIdZi; long l_CenterFlag; short s_CenterFlagZi; long l_wplen; short s_wplenZi; long l_distance; short s_distanceZi; char c_Description[32+1]; short s_DescriptionZi; // arguments for Primary key long l_k_SectionNo; public: // // LTA Structure struct STR_T_TRK_MAP{ int SectionNo; int InnerId; char extId[20+1]; int CenterFlag; int wplen; int distance; char Description[32+1]; }structTable; // LTA Structure Zi struct STR_T_TRK_MAPZi{ short InnerIdZi; short extIdZi; short CenterFlagZi; short wplenZi; short distanceZi; short DescriptionZi; }structTableZi; // //C O N S T R U C T O R S //======================= // public: T_TRK_MAP(); //D E S T R U C T O R S //======================= // virtual ~T_TRK_MAP(); // //C O P Y - C O N S T R U C T O R //======================= T_TRK_MAP(const T_TRK_MAP &inst); // For Constructors with parameters the flag dbAccess // informs you if the access was successfully or not T_TRK_MAP( long arg1); //methods public: char* getCreationTime() {return "2014.10.23 15:25:41";}; //initial data void initial(); //read data char* readDB(); //update data char* updateDB(); //insert data char* insertDB(); //this methode tries to update a DB record , when the update fails , the methode //tries an insert of the failed record char* storeDB(); //delete data char* deleteDB(); //delete data char* deleteDB(const char* where , long* count ); //openSetDB data char* openSetDB(const char* where ,const char* order ); //getSetDB data char* getSetDB(); //closeSetDB data char* closeSetDB(); //countDB data char* countDB(const char* where , long* count ); char* execute(const char* sql , long* count ); char* dbCommit(); char* dbRollback(); public: // // public methode setPrimKey // // this methode stores the unique key attributes // void setPrimKey(long arg1 ); // public methode initInsertKeys // // this methode stores the unique key attributes // void initInsertKeys( long arg1 ); public: // // public methode setKeysFromRecord // // this methode set the unique key attributes from the DB Record Attributes // void setKeysFromRecord(); // //O P E R A T O R + //=================== // public: T_TRK_MAP operator+(const T_TRK_MAP &inst) const; // //O P E R A T O R = //=================== // public: const T_TRK_MAP& operator=(const T_TRK_MAP &inst); long SectionNo() const;//{ //return((long)l_SectionNo ); //} void set_SectionNo( long arg );//{ //l_SectionNo = arg; //return; //} long InnerId() const;//{ //return((long)l_InnerId ); //} short InnerIdZi() const;//{ //return( s_InnerIdZi); //} void set_InnerId( long arg );//{ //l_InnerId = arg; //s_InnerIdZi= 0; //return; //} void set_InnerIdZi( short arg ) ;//{ //s_InnerIdZi = arg; //} char* extId() const;//{ //return((char*)c_extId ); //} short extIdZi() const;//{ //return( s_extIdZi); //} void set_extId( const char* arg );//{ //strncpy((char*)c_extId , arg , sizeof(c_extId)); //c_extId[sizeof(c_extId)-1] = '\0'; //s_extIdZi= 0; //return; //} void set_extIdZi( short arg ) ;//{ //s_extIdZi = arg; //} long CenterFlag() const;//{ //return((long)l_CenterFlag ); //} short CenterFlagZi() const;//{ //return( s_CenterFlagZi); //} void set_CenterFlag( long arg );//{ //l_CenterFlag = arg; //s_CenterFlagZi= 0; //return; //} void set_CenterFlagZi( short arg ) ;//{ //s_CenterFlagZi = arg; //} long wplen() const;//{ //return((long)l_wplen ); //} short wplenZi() const;//{ //return( s_wplenZi); //} void set_wplen( long arg );//{ //l_wplen = arg; //s_wplenZi= 0; //return; //} void set_wplenZi( short arg ) ;//{ //s_wplenZi = arg; //} long distance() const;//{ //return((long)l_distance ); //} short distanceZi() const;//{ //return( s_distanceZi); //} void set_distance( long arg );//{ //l_distance = arg; //s_distanceZi= 0; //return; //} void set_distanceZi( short arg ) ;//{ //s_distanceZi = arg; //} char* Description() const;//{ //return((char*)c_Description ); //} short DescriptionZi() const;//{ //return( s_DescriptionZi); //} void set_Description( const char* arg );//{ //strncpy((char*)c_Description , arg , sizeof(c_Description)); //c_Description[sizeof(c_Description)-1] = '\0'; //s_DescriptionZi= 0; //return; //} void set_DescriptionZi( short arg ) ;//{ //s_DescriptionZi = arg; //} public: // methodes for Primary key long k_SectionNo();//{ //return((long)l_k_SectionNo ); //} void set_k_SectionNo( long arg );//{ //l_k_SectionNo = arg; //return; //} public: // // public methode fillStructure // // this methode filles the classstructue with the private attributes // void fillStructure();//{ //} /////////////////////////////////////////////////// void fillStructureZi();//{ //} /////////////////////////////////////////////////// void setStructure();// { //return; //} /////////////////////////////////////////////////// void setStructureZi() ;//{ //} /////////////////////////////////////////////////// char* getName();//{ //return("T_TRK_MAP"); //} /////////////////////////////////////////////////// int getSqlCode();//{ //return( db.dbSqlCode); //} /////////////////////////////////////////////////// int getRowsProcessed();//{ //return( db.dbRowsProcessed); //} }; #endif