// Version: 2020.4.10 16:35:16 #ifndef _T_TIME_SET_H #define _T_TIME_SET_H #include #include #include #ifdef _MSC_VER #pragma warning(disable:4996) #pragma warning(disable:4267) #endif #include "T_TIME_SETDBAX.h" class T_TIME_SET{ friend class T_TIME_SETDBAX; private: //aggregation to DB Class T_TIME_SETDBAX 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 //=================== // char c_code[100+1]; char c_chinese[100+1]; short s_chineseZi; long l_warntop; short s_warntopZi; long l_warnbot; short s_warnbotZi; long l_errortop; short s_errortopZi; long l_errorbot; short s_errorbotZi; // arguments for Primary key char c_k_code[100+1]; public: // // LTA Structure struct STR_T_TIME_SET{ char code[100+1]; char chinese[100+1]; int warntop; int warnbot; int errortop; int errorbot; }structTable; // LTA Structure Zi struct STR_T_TIME_SETZi{ short chineseZi; short warntopZi; short warnbotZi; short errortopZi; short errorbotZi; }structTableZi; // //C O N S T R U C T O R S //======================= // public: T_TIME_SET(); //D E S T R U C T O R S //======================= // virtual ~T_TIME_SET(); // //C O P Y - C O N S T R U C T O R //======================= T_TIME_SET(const T_TIME_SET &inst); // For Constructors with parameters the flag dbAccess // informs you if the access was successfully or not T_TIME_SET( const char* arg1); //methods public: char* getCreationTime() {return (char*)"2020.4.10 16:35:16";}; //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(const char* arg1 ); // public methode initInsertKeys // // this methode stores the unique key attributes // void initInsertKeys( const char* 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_TIME_SET operator+(const T_TIME_SET &inst) const; // //O P E R A T O R = //=================== // public: const T_TIME_SET& operator=(const T_TIME_SET &inst); char* code() const;//{ //return((char*)c_code ); //} void set_code( const char* arg );//{ //strncpy((char*)c_code , arg , sizeof(c_code)); //c_code[sizeof(c_code)-1] = '\0'; //return; //} char* chinese() const;//{ //return((char*)c_chinese ); //} short chineseZi() const;//{ //return( s_chineseZi); //} void set_chinese( const char* arg );//{ //strncpy((char*)c_chinese , arg , sizeof(c_chinese)); //c_chinese[sizeof(c_chinese)-1] = '\0'; //s_chineseZi= 0; //return; //} void set_chineseZi( short arg ) ;//{ //s_chineseZi = arg; //} long warntop() const;//{ //return((long)l_warntop ); //} short warntopZi() const;//{ //return( s_warntopZi); //} void set_warntop( long arg );//{ //l_warntop = arg; //s_warntopZi= 0; //return; //} void set_warntopZi( short arg ) ;//{ //s_warntopZi = arg; //} long warnbot() const;//{ //return((long)l_warnbot ); //} short warnbotZi() const;//{ //return( s_warnbotZi); //} void set_warnbot( long arg );//{ //l_warnbot = arg; //s_warnbotZi= 0; //return; //} void set_warnbotZi( short arg ) ;//{ //s_warnbotZi = arg; //} long errortop() const;//{ //return((long)l_errortop ); //} short errortopZi() const;//{ //return( s_errortopZi); //} void set_errortop( long arg );//{ //l_errortop = arg; //s_errortopZi= 0; //return; //} void set_errortopZi( short arg ) ;//{ //s_errortopZi = arg; //} long errorbot() const;//{ //return((long)l_errorbot ); //} short errorbotZi() const;//{ //return( s_errorbotZi); //} void set_errorbot( long arg );//{ //l_errorbot = arg; //s_errorbotZi= 0; //return; //} void set_errorbotZi( short arg ) ;//{ //s_errorbotZi = arg; //} public: // methodes for Primary key char* k_code();//{ //return((char*)c_k_code ); //} void set_k_code( char* arg );//{ //strncpy((char*)c_k_code , arg , sizeof(c_k_code)); //c_k_code[sizeof(c_k_code)-1] = '\0'; //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((char*)"T_TIME_SET"); //} /////////////////////////////////////////////////// int getSqlCode();//{ //return( db.dbSqlCode); //} /////////////////////////////////////////////////// int getRowsProcessed();//{ //return( db.dbRowsProcessed); //} }; #endif