// Version: 2018.7.12 9:12:50 #ifndef _T_MU_H #define _T_MU_H #include #include #include #ifdef _MSC_VER #pragma warning(disable:4996) #pragma warning(disable:4267) #endif #include "T_MUDBAX.h" class T_MU{ friend class T_MUDBAX; private: //aggregation to DB Class T_MUDBAX 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_muId; char c_muCreator[2+1]; long l_basId; long l_curMusId; short s_curMusIdZi; long l_entMusId; short s_entMusIdZi; char c_extId[20+1]; char c_muTyp[2+1]; long l_outMusId; short s_outMusIdZi; long l_status; short s_statusZi; 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_muId; char c_k_muCreator[2+1]; public: // // LTA Structure struct STR_T_MU{ int muId; char muCreator[2+1]; int basId; int curMusId; int entMusId; char extId[20+1]; char muTyp[2+1]; int outMusId; int status; char toc[27]; char tom[27]; char mop[121]; char mou[31]; }structTable; // LTA Structure Zi struct STR_T_MUZi{ short curMusIdZi; short entMusIdZi; short outMusIdZi; short statusZi; short tocZi; short tomZi; short mopZi; short mouZi; }structTableZi; // //C O N S T R U C T O R S //======================= // public: T_MU(); //D E S T R U C T O R S //======================= // virtual ~T_MU(); // //C O P Y - C O N S T R U C T O R //======================= T_MU(const T_MU &inst); // For Constructors with parameters the flag dbAccess // informs you if the access was successfully or not T_MU( long arg1,const char* arg2); //methods public: char* getCreationTime() {return (char*)"2018.7.12 9:12:50";}; //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 , const char* arg2 ); // public methode initInsertKeys // // this methode stores the unique key attributes // void initInsertKeys( long arg1 , const char* arg2 ); 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_MU operator+(const T_MU &inst) const; // //O P E R A T O R = //=================== // public: const T_MU& operator=(const T_MU &inst); long muId() const;//{ //return((long)l_muId ); //} void set_muId( long arg );//{ //l_muId = arg; //return; //} char* muCreator() const;//{ //return((char*)c_muCreator ); //} void set_muCreator( const char* arg );//{ //strncpy((char*)c_muCreator , arg , sizeof(c_muCreator)); //c_muCreator[sizeof(c_muCreator)-1] = '\0'; //return; //} long basId() const;//{ //return((long)l_basId ); //} void set_basId( long arg );//{ //l_basId = arg; //return; //} long curMusId() const;//{ //return((long)l_curMusId ); //} short curMusIdZi() const;//{ //return( s_curMusIdZi); //} void set_curMusId( long arg );//{ //l_curMusId = arg; //s_curMusIdZi= 0; //return; //} void set_curMusIdZi( short arg ) ;//{ //s_curMusIdZi = arg; //} long entMusId() const;//{ //return((long)l_entMusId ); //} short entMusIdZi() const;//{ //return( s_entMusIdZi); //} void set_entMusId( long arg );//{ //l_entMusId = arg; //s_entMusIdZi= 0; //return; //} void set_entMusIdZi( short arg ) ;//{ //s_entMusIdZi = arg; //} char* extId() const;//{ //return((char*)c_extId ); //} void set_extId( const char* arg );//{ //strncpy((char*)c_extId , arg , sizeof(c_extId)); //c_extId[sizeof(c_extId)-1] = '\0'; //return; //} char* muTyp() const;//{ //return((char*)c_muTyp ); //} void set_muTyp( const char* arg );//{ //strncpy((char*)c_muTyp , arg , sizeof(c_muTyp)); //c_muTyp[sizeof(c_muTyp)-1] = '\0'; //return; //} long outMusId() const;//{ //return((long)l_outMusId ); //} short outMusIdZi() const;//{ //return( s_outMusIdZi); //} void set_outMusId( long arg );//{ //l_outMusId = arg; //s_outMusIdZi= 0; //return; //} void set_outMusIdZi( short arg ) ;//{ //s_outMusIdZi = arg; //} long status() const;//{ //return((long)l_status ); //} short statusZi() const;//{ //return( s_statusZi); //} void set_status( long arg );//{ //l_status = arg; //s_statusZi= 0; //return; //} void set_statusZi( short arg ) ;//{ //s_statusZi = 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_muId();//{ //return((long)l_k_muId ); //} void set_k_muId( long arg );//{ //l_k_muId = arg; //return; //} char* k_muCreator();//{ //return((char*)c_k_muCreator ); //} void set_k_muCreator( char* arg );//{ //strncpy((char*)c_k_muCreator , arg , sizeof(c_k_muCreator)); //c_k_muCreator[sizeof(c_k_muCreator)-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_MU"); //} /////////////////////////////////////////////////// int getSqlCode();//{ //return( db.dbSqlCode); //} /////////////////////////////////////////////////// int getRowsProcessed();//{ //return( db.dbRowsProcessed); //} }; #endif