// Version: 2014.7.30 16:47:28 #ifndef _T_HMI_COLORSETUP_H #define _T_HMI_COLORSETUP_H #include #include #include #ifdef _MSC_VER #pragma warning(disable:4996) #pragma warning(disable:4267) #endif #include "T_HMI_COLORSETUPDBAX.h" class T_HMI_COLORSETUP{ friend class T_HMI_COLORSETUPDBAX; private: //aggregation to DB Class T_HMI_COLORSETUPDBAX 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_Seq; char c_FormName[100+1]; short s_FormNameZi; char c_SetName[100+1]; short s_SetNameZi; char c_SetCode[50+1]; short s_SetCodeZi; long l_ColorA; short s_ColorAZi; long l_ColorR; short s_ColorRZi; long l_ColorG; short s_ColorGZi; long l_ColorB; short s_ColorBZi; char c_toc[27]; short s_tocZi; char c_tom[27]; short s_tomZi; char c_mop[121]; short s_mopZi; char c_mou[31]; short s_mouZi; // arguments for Primary key long l_k_Seq; public: // // LTA Structure struct STR_T_HMI_COLORSETUP{ int Seq; char FormName[100+1]; char SetName[100+1]; char SetCode[50+1]; int ColorA; int ColorR; int ColorG; int ColorB; char toc[27]; char tom[27]; char mop[121]; char mou[31]; }structTable; // LTA Structure Zi struct STR_T_HMI_COLORSETUPZi{ short FormNameZi; short SetNameZi; short SetCodeZi; short ColorAZi; short ColorRZi; short ColorGZi; short ColorBZi; short tocZi; short tomZi; short mopZi; short mouZi; }structTableZi; // //C O N S T R U C T O R S //======================= // public: T_HMI_COLORSETUP(); //D E S T R U C T O R S //======================= // virtual ~T_HMI_COLORSETUP(); // //C O P Y - C O N S T R U C T O R //======================= T_HMI_COLORSETUP(const T_HMI_COLORSETUP &inst); // For Constructors with parameters the flag dbAccess // informs you if the access was successfully or not T_HMI_COLORSETUP( long arg1); //methods public: char* getCreationTime() {return "2014.7.30 16:47:28";}; //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_HMI_COLORSETUP operator+(const T_HMI_COLORSETUP &inst) const; // //O P E R A T O R = //=================== // public: const T_HMI_COLORSETUP& operator=(const T_HMI_COLORSETUP &inst); long Seq() const;//{ //return((long)l_Seq ); //} void set_Seq( long arg );//{ //l_Seq = arg; //return; //} char* FormName() const;//{ //return((char*)c_FormName ); //} short FormNameZi() const;//{ //return( s_FormNameZi); //} void set_FormName( const char* arg );//{ //strncpy((char*)c_FormName , arg , sizeof(c_FormName)); //c_FormName[sizeof(c_FormName)-1] = '\0'; //s_FormNameZi= 0; //return; //} void set_FormNameZi( short arg ) ;//{ //s_FormNameZi = arg; //} char* SetName() const;//{ //return((char*)c_SetName ); //} short SetNameZi() const;//{ //return( s_SetNameZi); //} void set_SetName( const char* arg );//{ //strncpy((char*)c_SetName , arg , sizeof(c_SetName)); //c_SetName[sizeof(c_SetName)-1] = '\0'; //s_SetNameZi= 0; //return; //} void set_SetNameZi( short arg ) ;//{ //s_SetNameZi = arg; //} char* SetCode() const;//{ //return((char*)c_SetCode ); //} short SetCodeZi() const;//{ //return( s_SetCodeZi); //} void set_SetCode( const char* arg );//{ //strncpy((char*)c_SetCode , arg , sizeof(c_SetCode)); //c_SetCode[sizeof(c_SetCode)-1] = '\0'; //s_SetCodeZi= 0; //return; //} void set_SetCodeZi( short arg ) ;//{ //s_SetCodeZi = arg; //} long ColorA() const;//{ //return((long)l_ColorA ); //} short ColorAZi() const;//{ //return( s_ColorAZi); //} void set_ColorA( long arg );//{ //l_ColorA = arg; //s_ColorAZi= 0; //return; //} void set_ColorAZi( short arg ) ;//{ //s_ColorAZi = arg; //} long ColorR() const;//{ //return((long)l_ColorR ); //} short ColorRZi() const;//{ //return( s_ColorRZi); //} void set_ColorR( long arg );//{ //l_ColorR = arg; //s_ColorRZi= 0; //return; //} void set_ColorRZi( short arg ) ;//{ //s_ColorRZi = arg; //} long ColorG() const;//{ //return((long)l_ColorG ); //} short ColorGZi() const;//{ //return( s_ColorGZi); //} void set_ColorG( long arg );//{ //l_ColorG = arg; //s_ColorGZi= 0; //return; //} void set_ColorGZi( short arg ) ;//{ //s_ColorGZi = arg; //} long ColorB() const;//{ //return((long)l_ColorB ); //} short ColorBZi() const;//{ //return( s_ColorBZi); //} void set_ColorB( long arg );//{ //l_ColorB = arg; //s_ColorBZi= 0; //return; //} void set_ColorBZi( short arg ) ;//{ //s_ColorBZi = arg; //} public: char* toc() const;//{ //return((char*)c_toc ); //} short tocZi() const;//{ //return( s_tocZi); //} protected: void set_toc( char* arg );//{ //strncpy((char*)c_toc , arg , sizeof(c_toc)); //c_toc[sizeof(c_toc)-1] = '\0'; //s_tocZi= 0; //return; //} void set_tocZi( short arg );//{ //s_tocZi = arg; //} public: char* tom() const;//{ //return((char*)c_tom ); //} short tomZi() const;//{ //return( s_tomZi); //} protected: void set_tom( char* arg );//{ //strncpy((char*)c_tom , arg , sizeof(c_tom)); //c_tom[sizeof(c_tom)-1] = '\0'; //s_tomZi= 0; //return; //} void set_tomZi( short arg );//{ //s_tomZi = arg; //} public: char* mop() const;//{ //return((char*)c_mop ); //} short mopZi() const;//{ //return( s_mopZi); //} protected: void set_mop( char* arg );//{ //strncpy((char*)c_mop , arg , sizeof(c_mop)); //c_mop[sizeof(c_mop)-1] = '\0'; //s_mopZi= 0; //return; //} void set_mopZi( short arg );//{ //s_mopZi = arg; //} public: char* mou() const;//{ //return((char*)c_mou ); //} short mouZi() const;//{ //return( s_mouZi); //} protected: void set_mou( char* arg );//{ //strncpy((char*)c_mou , arg , sizeof(c_mou)); //c_mou[sizeof(c_mou)-1] = '\0'; //s_mouZi= 0; //return; //} void set_mouZi( short arg );//{ //s_mouZi = arg; //} public: // methodes for Primary key long k_Seq();//{ //return((long)l_k_Seq ); //} void set_k_Seq( long arg );//{ //l_k_Seq = 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_HMI_COLORSETUP"); //} /////////////////////////////////////////////////// int getSqlCode();//{ //return( db.dbSqlCode); //} /////////////////////////////////////////////////// int getRowsProcessed();//{ //return( db.dbRowsProcessed); //} }; #endif