// Version: 2014.7.30 16:47:28 #ifndef _T_SET_CUT_H #define _T_SET_CUT_H #include using namespace baosight; #include #include #include #ifdef _MSC_VER #pragma warning(disable:4996) #pragma warning(disable:4267) #endif #include "T_SET_CUTDBAX.h" class T_SET_CUT{ friend class T_SET_CUTDBAX; private: //aggregation to DB Class T_SET_CUTDBAX 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_SeqNo; long l_CutLenACT; short s_CutLenACTZi; long l_CutLenSet; short s_CutLenSetZi; long l_CutLengthACT; short s_CutLengthACTZi; long l_CutModeACT; short s_CutModeACTZi; long l_CutModeSet; short s_CutModeSetZi; long l_CutWeightACT; short s_CutWeightACTZi; long l_CutWeightSet; short s_CutWeightSetZi; long l_EntryLength; short s_EntryLengthZi; long l_Idia; short s_IdiaZi; long l_NextFlag; short s_NextFlagZi; long l_Odia; short s_OdiaZi; long l_SampleTailSet; short s_SampleTailSetZi; long l_SampleHeadSet; short s_SampleHeadSetZi; long l_sleeveType; short s_sleeveTypeZi; long l_SampleTailACT; short s_SampleTailACTZi; long l_SampleHeadACT; short s_SampleHeadACTZi; long l_muId; char c_muCreator[3]; short s_musId; 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[3]; short s_k_musId; long l_k_SeqNo; public: // // LTA Structure struct STR_T_SET_CUT{ int SeqNo; int CutLenACT; int CutLenSet; int CutLengthACT; int CutModeACT; int CutModeSet; int CutWeightACT; int CutWeightSet; int EntryLength; int Idia; int NextFlag; int Odia; int SampleTailSet; int SampleHeadSet; int sleeveType; int SampleTailACT; int SampleHeadACT; int muId; char muCreator[3]; short musId; char toc[27]; char tom[27]; char mop[121]; char mou[31]; }structTable; // LTA Structure Zi struct STR_T_SET_CUTZi{ short CutLenACTZi; short CutLenSetZi; short CutLengthACTZi; short CutModeACTZi; short CutModeSetZi; short CutWeightACTZi; short CutWeightSetZi; short EntryLengthZi; short IdiaZi; short NextFlagZi; short OdiaZi; short SampleTailSetZi; short SampleHeadSetZi; short sleeveTypeZi; short SampleTailACTZi; short SampleHeadACTZi; short tocZi; short tomZi; short mopZi; short mouZi; }structTableZi; // //C O N S T R U C T O R S //======================= // public: T_SET_CUT(); //D E S T R U C T O R S //======================= // virtual ~T_SET_CUT(); // //C O P Y - C O N S T R U C T O R //======================= T_SET_CUT(const T_SET_CUT &inst); // For Constructors with parameters the flag dbAccess // informs you if the access was successfully or not T_SET_CUT( MU_CODE muCode , 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 , const char* arg2 , short arg3 , long arg4 ); void setPrimKey( MU_CODE muCode , long arg1 ); // public methode initInsertKeys // // this methode stores the unique key attributes // void initInsertKeys( long arg1 , const char* arg2 , short arg3 , long arg4 ); void initInsertKeys( MU_CODE muCode , 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_SET_CUT operator+(const T_SET_CUT &inst) const; // //O P E R A T O R = //=================== // public: const T_SET_CUT& operator=(const T_SET_CUT &inst); long SeqNo() const;//{ //return((long)l_SeqNo ); //} void set_SeqNo( long arg );//{ //l_SeqNo = arg; //return; //} long CutLenACT() const;//{ //return((long)l_CutLenACT ); //} short CutLenACTZi() const;//{ //return( s_CutLenACTZi); //} void set_CutLenACT( long arg );//{ //l_CutLenACT = arg; //s_CutLenACTZi= 0; //return; //} void set_CutLenACTZi( short arg ) ;//{ //s_CutLenACTZi = arg; //} long CutLenSet() const;//{ //return((long)l_CutLenSet ); //} short CutLenSetZi() const;//{ //return( s_CutLenSetZi); //} void set_CutLenSet( long arg );//{ //l_CutLenSet = arg; //s_CutLenSetZi= 0; //return; //} void set_CutLenSetZi( short arg ) ;//{ //s_CutLenSetZi = arg; //} long CutLengthACT() const;//{ //return((long)l_CutLengthACT ); //} short CutLengthACTZi() const;//{ //return( s_CutLengthACTZi); //} void set_CutLengthACT( long arg );//{ //l_CutLengthACT = arg; //s_CutLengthACTZi= 0; //return; //} void set_CutLengthACTZi( short arg ) ;//{ //s_CutLengthACTZi = arg; //} long CutModeACT() const;//{ //return((long)l_CutModeACT ); //} short CutModeACTZi() const;//{ //return( s_CutModeACTZi); //} void set_CutModeACT( long arg );//{ //l_CutModeACT = arg; //s_CutModeACTZi= 0; //return; //} void set_CutModeACTZi( short arg ) ;//{ //s_CutModeACTZi = arg; //} long CutModeSet() const;//{ //return((long)l_CutModeSet ); //} short CutModeSetZi() const;//{ //return( s_CutModeSetZi); //} void set_CutModeSet( long arg );//{ //l_CutModeSet = arg; //s_CutModeSetZi= 0; //return; //} void set_CutModeSetZi( short arg ) ;//{ //s_CutModeSetZi = arg; //} long CutWeightACT() const;//{ //return((long)l_CutWeightACT ); //} short CutWeightACTZi() const;//{ //return( s_CutWeightACTZi); //} void set_CutWeightACT( long arg );//{ //l_CutWeightACT = arg; //s_CutWeightACTZi= 0; //return; //} void set_CutWeightACTZi( short arg ) ;//{ //s_CutWeightACTZi = arg; //} long CutWeightSet() const;//{ //return((long)l_CutWeightSet ); //} short CutWeightSetZi() const;//{ //return( s_CutWeightSetZi); //} void set_CutWeightSet( long arg );//{ //l_CutWeightSet = arg; //s_CutWeightSetZi= 0; //return; //} void set_CutWeightSetZi( short arg ) ;//{ //s_CutWeightSetZi = arg; //} long EntryLength() const;//{ //return((long)l_EntryLength ); //} short EntryLengthZi() const;//{ //return( s_EntryLengthZi); //} void set_EntryLength( long arg );//{ //l_EntryLength = arg; //s_EntryLengthZi= 0; //return; //} void set_EntryLengthZi( short arg ) ;//{ //s_EntryLengthZi = arg; //} long Idia() const;//{ //return((long)l_Idia ); //} short IdiaZi() const;//{ //return( s_IdiaZi); //} void set_Idia( long arg );//{ //l_Idia = arg; //s_IdiaZi= 0; //return; //} void set_IdiaZi( short arg ) ;//{ //s_IdiaZi = arg; //} long NextFlag() const;//{ //return((long)l_NextFlag ); //} short NextFlagZi() const;//{ //return( s_NextFlagZi); //} void set_NextFlag( long arg );//{ //l_NextFlag = arg; //s_NextFlagZi= 0; //return; //} void set_NextFlagZi( short arg ) ;//{ //s_NextFlagZi = arg; //} long Odia() const;//{ //return((long)l_Odia ); //} short OdiaZi() const;//{ //return( s_OdiaZi); //} void set_Odia( long arg );//{ //l_Odia = arg; //s_OdiaZi= 0; //return; //} void set_OdiaZi( short arg ) ;//{ //s_OdiaZi = arg; //} long SampleTailSet() const;//{ //return((long)l_SampleTailSet ); //} short SampleTailSetZi() const;//{ //return( s_SampleTailSetZi); //} void set_SampleTailSet( long arg );//{ //l_SampleTailSet = arg; //s_SampleTailSetZi= 0; //return; //} void set_SampleTailSetZi( short arg ) ;//{ //s_SampleTailSetZi = arg; //} long SampleHeadSet() const;//{ //return((long)l_SampleHeadSet ); //} short SampleHeadSetZi() const;//{ //return( s_SampleHeadSetZi); //} void set_SampleHeadSet( long arg );//{ //l_SampleHeadSet = arg; //s_SampleHeadSetZi= 0; //return; //} void set_SampleHeadSetZi( short arg ) ;//{ //s_SampleHeadSetZi = arg; //} long sleeveType() const;//{ //return((long)l_sleeveType ); //} short sleeveTypeZi() const;//{ //return( s_sleeveTypeZi); //} void set_sleeveType( long arg );//{ //l_sleeveType = arg; //s_sleeveTypeZi= 0; //return; //} void set_sleeveTypeZi( short arg ) ;//{ //s_sleeveTypeZi = arg; //} long SampleTailACT() const;//{ //return((long)l_SampleTailACT ); //} short SampleTailACTZi() const;//{ //return( s_SampleTailACTZi); //} void set_SampleTailACT( long arg );//{ //l_SampleTailACT = arg; //s_SampleTailACTZi= 0; //return; //} void set_SampleTailACTZi( short arg ) ;//{ //s_SampleTailACTZi = arg; //} long SampleHeadACT() const;//{ //return((long)l_SampleHeadACT ); //} short SampleHeadACTZi() const;//{ //return( s_SampleHeadACTZi); //} void set_SampleHeadACT( long arg );//{ //l_SampleHeadACT = arg; //s_SampleHeadACTZi= 0; //return; //} void set_SampleHeadACTZi( short arg ) ;//{ //s_SampleHeadACTZi = arg; //} 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; //} short musId() const;//{ //return((short)s_musId ); //} void set_musId( short arg );//{ //s_musId = arg; //return; //} 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; //} short k_musId();//{ //return((short)s_k_musId ); //} void set_k_musId( short arg );//{ //s_k_musId = arg; //return; //} long k_SeqNo();//{ //return((long)l_k_SeqNo ); //} void set_k_SeqNo( long arg );//{ //l_k_SeqNo = 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_SET_CUT"); //} /////////////////////////////////////////////////// int getSqlCode();//{ //return( db.dbSqlCode); //} /////////////////////////////////////////////////// int getRowsProcessed();//{ //return( db.dbRowsProcessed); //} }; #endif