529 lines
9.0 KiB
C++
529 lines
9.0 KiB
C++
// Version: 2014.7.30 16:47:28
|
|
|
|
#ifndef _T_TRK_SIMCUT_H
|
|
#define _T_TRK_SIMCUT_H
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
#include <stdlib.h>
|
|
#ifdef _MSC_VER
|
|
#pragma warning(disable:4996)
|
|
#pragma warning(disable:4267)
|
|
#endif
|
|
#include "T_TRK_SIMCUTDBAX.h"
|
|
class T_TRK_SIMCUT{
|
|
friend class T_TRK_SIMCUTDBAX;
|
|
private:
|
|
//aggregation to DB Class
|
|
T_TRK_SIMCUTDBAX 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_recordNo;
|
|
char c_EnCoilId[20+1];
|
|
short s_EnCoilIdZi;
|
|
long l_CutMode;
|
|
short s_CutModeZi;
|
|
long l_SPMmode;
|
|
short s_SPMmodeZi;
|
|
long l_Length;
|
|
short s_LengthZi;
|
|
long l_innerdia;
|
|
short s_innerdiaZi;
|
|
long l_outdia;
|
|
short s_outdiaZi;
|
|
long l_width;
|
|
short s_widthZi;
|
|
long l_sleeveCode;
|
|
short s_sleeveCodeZi;
|
|
char c_procEndTime[27];
|
|
short s_procEndTimeZi;
|
|
long l_coilPos;
|
|
short s_coilPosZi;
|
|
long l_cutflag;
|
|
short s_cutflagZi;
|
|
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_recordNo;
|
|
public:
|
|
//
|
|
// LTA Structure
|
|
struct STR_T_TRK_SIMCUT{
|
|
int recordNo;
|
|
char EnCoilId[20+1];
|
|
int CutMode;
|
|
int SPMmode;
|
|
int Length;
|
|
int innerdia;
|
|
int outdia;
|
|
int width;
|
|
int sleeveCode;
|
|
char procEndTime[27];
|
|
int coilPos;
|
|
int cutflag;
|
|
char toc[27];
|
|
char tom[27];
|
|
char mop[121];
|
|
char mou[31];
|
|
}structTable;
|
|
// LTA Structure Zi
|
|
struct STR_T_TRK_SIMCUTZi{
|
|
short EnCoilIdZi;
|
|
short CutModeZi;
|
|
short SPMmodeZi;
|
|
short LengthZi;
|
|
short innerdiaZi;
|
|
short outdiaZi;
|
|
short widthZi;
|
|
short sleeveCodeZi;
|
|
short procEndTimeZi;
|
|
short coilPosZi;
|
|
short cutflagZi;
|
|
short tocZi;
|
|
short tomZi;
|
|
short mopZi;
|
|
short mouZi;
|
|
}structTableZi;
|
|
//
|
|
//C O N S T R U C T O R S
|
|
//=======================
|
|
//
|
|
public:
|
|
T_TRK_SIMCUT();
|
|
//D E S T R U C T O R S
|
|
//=======================
|
|
//
|
|
virtual ~T_TRK_SIMCUT();
|
|
//
|
|
//C O P Y - C O N S T R U C T O R
|
|
//=======================
|
|
T_TRK_SIMCUT(const T_TRK_SIMCUT &inst);
|
|
// For Constructors with parameters the flag dbAccess
|
|
// informs you if the access was successfully or not
|
|
T_TRK_SIMCUT( 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_TRK_SIMCUT operator+(const T_TRK_SIMCUT &inst) const;
|
|
|
|
//
|
|
//O P E R A T O R =
|
|
//===================
|
|
//
|
|
public:
|
|
const T_TRK_SIMCUT& operator=(const T_TRK_SIMCUT &inst);
|
|
long recordNo() const;//{
|
|
//return((long)l_recordNo );
|
|
//}
|
|
|
|
|
|
void set_recordNo( long arg );//{
|
|
//l_recordNo = arg;
|
|
//return;
|
|
//}
|
|
|
|
|
|
char* EnCoilId() const;//{
|
|
//return((char*)c_EnCoilId );
|
|
//}
|
|
|
|
short EnCoilIdZi() const;//{
|
|
//return( s_EnCoilIdZi);
|
|
//}
|
|
|
|
void set_EnCoilId( const char* arg );//{
|
|
//strncpy((char*)c_EnCoilId , arg , sizeof(c_EnCoilId));
|
|
//c_EnCoilId[sizeof(c_EnCoilId)-1] = '\0';
|
|
//s_EnCoilIdZi= 0;
|
|
//return;
|
|
//}
|
|
|
|
void set_EnCoilIdZi( short arg ) ;//{
|
|
//s_EnCoilIdZi = arg;
|
|
//}
|
|
|
|
long CutMode() const;//{
|
|
//return((long)l_CutMode );
|
|
//}
|
|
|
|
short CutModeZi() const;//{
|
|
//return( s_CutModeZi);
|
|
//}
|
|
|
|
void set_CutMode( long arg );//{
|
|
//l_CutMode = arg;
|
|
//s_CutModeZi= 0;
|
|
//return;
|
|
//}
|
|
|
|
void set_CutModeZi( short arg ) ;//{
|
|
//s_CutModeZi = arg;
|
|
//}
|
|
|
|
long SPMmode() const;//{
|
|
//return((long)l_SPMmode );
|
|
//}
|
|
|
|
short SPMmodeZi() const;//{
|
|
//return( s_SPMmodeZi);
|
|
//}
|
|
|
|
void set_SPMmode( long arg );//{
|
|
//l_SPMmode = arg;
|
|
//s_SPMmodeZi= 0;
|
|
//return;
|
|
//}
|
|
|
|
void set_SPMmodeZi( short arg ) ;//{
|
|
//s_SPMmodeZi = arg;
|
|
//}
|
|
|
|
long Length() const;//{
|
|
//return((long)l_Length );
|
|
//}
|
|
|
|
short LengthZi() const;//{
|
|
//return( s_LengthZi);
|
|
//}
|
|
|
|
void set_Length( long arg );//{
|
|
//l_Length = arg;
|
|
//s_LengthZi= 0;
|
|
//return;
|
|
//}
|
|
|
|
void set_LengthZi( short arg ) ;//{
|
|
//s_LengthZi = arg;
|
|
//}
|
|
|
|
long innerdia() const;//{
|
|
//return((long)l_innerdia );
|
|
//}
|
|
|
|
short innerdiaZi() const;//{
|
|
//return( s_innerdiaZi);
|
|
//}
|
|
|
|
void set_innerdia( long arg );//{
|
|
//l_innerdia = arg;
|
|
//s_innerdiaZi= 0;
|
|
//return;
|
|
//}
|
|
|
|
void set_innerdiaZi( short arg ) ;//{
|
|
//s_innerdiaZi = arg;
|
|
//}
|
|
|
|
long outdia() const;//{
|
|
//return((long)l_outdia );
|
|
//}
|
|
|
|
short outdiaZi() const;//{
|
|
//return( s_outdiaZi);
|
|
//}
|
|
|
|
void set_outdia( long arg );//{
|
|
//l_outdia = arg;
|
|
//s_outdiaZi= 0;
|
|
//return;
|
|
//}
|
|
|
|
void set_outdiaZi( short arg ) ;//{
|
|
//s_outdiaZi = arg;
|
|
//}
|
|
|
|
long width() const;//{
|
|
//return((long)l_width );
|
|
//}
|
|
|
|
short widthZi() const;//{
|
|
//return( s_widthZi);
|
|
//}
|
|
|
|
void set_width( long arg );//{
|
|
//l_width = arg;
|
|
//s_widthZi= 0;
|
|
//return;
|
|
//}
|
|
|
|
void set_widthZi( short arg ) ;//{
|
|
//s_widthZi = arg;
|
|
//}
|
|
|
|
long sleeveCode() const;//{
|
|
//return((long)l_sleeveCode );
|
|
//}
|
|
|
|
short sleeveCodeZi() const;//{
|
|
//return( s_sleeveCodeZi);
|
|
//}
|
|
|
|
void set_sleeveCode( long arg );//{
|
|
//l_sleeveCode = arg;
|
|
//s_sleeveCodeZi= 0;
|
|
//return;
|
|
//}
|
|
|
|
void set_sleeveCodeZi( short arg ) ;//{
|
|
//s_sleeveCodeZi = arg;
|
|
//}
|
|
|
|
char* procEndTime() const;//{
|
|
//return((char*)c_procEndTime );
|
|
//}
|
|
|
|
short procEndTimeZi() const;//{
|
|
//return( s_procEndTimeZi);
|
|
//}
|
|
|
|
void set_procEndTime( char* arg );//{
|
|
//strncpy((char*)c_procEndTime , arg , sizeof(c_procEndTime));
|
|
//c_procEndTime[sizeof(c_procEndTime)-1] = '\0';
|
|
//s_procEndTimeZi= 0;
|
|
//return;
|
|
//}
|
|
|
|
void set_procEndTimeZi( short arg ) ;//{
|
|
//s_procEndTimeZi = arg;
|
|
//}
|
|
|
|
long coilPos() const;//{
|
|
//return((long)l_coilPos );
|
|
//}
|
|
|
|
short coilPosZi() const;//{
|
|
//return( s_coilPosZi);
|
|
//}
|
|
|
|
void set_coilPos( long arg );//{
|
|
//l_coilPos = arg;
|
|
//s_coilPosZi= 0;
|
|
//return;
|
|
//}
|
|
|
|
void set_coilPosZi( short arg ) ;//{
|
|
//s_coilPosZi = arg;
|
|
//}
|
|
|
|
long cutflag() const;//{
|
|
//return((long)l_cutflag );
|
|
//}
|
|
|
|
short cutflagZi() const;//{
|
|
//return( s_cutflagZi);
|
|
//}
|
|
|
|
void set_cutflag( long arg );//{
|
|
//l_cutflag = arg;
|
|
//s_cutflagZi= 0;
|
|
//return;
|
|
//}
|
|
|
|
void set_cutflagZi( short arg ) ;//{
|
|
//s_cutflagZi = 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_recordNo();//{
|
|
//return((long)l_k_recordNo );
|
|
//}
|
|
|
|
void set_k_recordNo( long arg );//{
|
|
//l_k_recordNo = 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_SIMCUT");
|
|
//}
|
|
///////////////////////////////////////////////////
|
|
int getSqlCode();//{
|
|
//return( db.dbSqlCode);
|
|
//}
|
|
///////////////////////////////////////////////////
|
|
int getRowsProcessed();//{
|
|
//return( db.dbRowsProcessed);
|
|
//}
|
|
};
|
|
#endif
|