347 lines
6.6 KiB
C++
347 lines
6.6 KiB
C++
// Version: 2015.8.8 15:13:13
|
|
|
|
#ifndef _T_CYC_EXTSEG095_H
|
|
#define _T_CYC_EXTSEG095_H
|
|
#include <common/BasicStruct.h>
|
|
|
|
using namespace baosight;
|
|
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
#include <stdlib.h>
|
|
#ifdef _MSC_VER
|
|
#pragma warning(disable:4996)
|
|
#pragma warning(disable:4267)
|
|
#endif
|
|
#include "T_CYC_EXTSEG095DBAX.h"
|
|
class T_CYC_EXTSEG095{
|
|
friend class T_CYC_EXTSEG095DBAX;
|
|
private:
|
|
//aggregation to DB Class
|
|
T_CYC_EXTSEG095DBAX 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;
|
|
char c_EnCoilId[21+1];
|
|
short s_EnCoilIdZi;
|
|
char c_ExCoilId[21+1];
|
|
short s_ExCoilIdZi;
|
|
double d_DLPTension;
|
|
short s_DLPTensionZi;
|
|
char c_TC[27];
|
|
short s_TCZi;
|
|
long l_muId;
|
|
char c_muCreator[3];
|
|
short s_musId;
|
|
// 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_CYC_EXTSEG095{
|
|
long SeqNo;
|
|
char EnCoilId[21+1];
|
|
char ExCoilId[21+1];
|
|
double DLPTension;
|
|
char TC[27];
|
|
long muId;
|
|
char muCreator[3];
|
|
short musId;
|
|
}structTable;
|
|
// LTA Structure Zi
|
|
struct STR_T_CYC_EXTSEG095Zi{
|
|
short EnCoilIdZi;
|
|
short ExCoilIdZi;
|
|
short DLPTensionZi;
|
|
short TCZi;
|
|
}structTableZi;
|
|
//
|
|
//C O N S T R U C T O R S
|
|
//=======================
|
|
//
|
|
public:
|
|
T_CYC_EXTSEG095();
|
|
//D E S T R U C T O R S
|
|
//=======================
|
|
//
|
|
virtual ~T_CYC_EXTSEG095();
|
|
//
|
|
//C O P Y - C O N S T R U C T O R
|
|
//=======================
|
|
T_CYC_EXTSEG095(const T_CYC_EXTSEG095 &inst);
|
|
// For Constructors with parameters the flag dbAccess
|
|
// informs you if the access was successfully or not
|
|
T_CYC_EXTSEG095( MU_CODE muCode , long arg1);
|
|
|
|
//methods
|
|
public:
|
|
char* getCreationTime() {return "2015.8.8 15:13:13";};
|
|
//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_CYC_EXTSEG095 operator+(const T_CYC_EXTSEG095 &inst) const;
|
|
|
|
//
|
|
//O P E R A T O R =
|
|
//===================
|
|
//
|
|
public:
|
|
const T_CYC_EXTSEG095& operator=(const T_CYC_EXTSEG095 &inst);
|
|
long SeqNo() const;//{
|
|
//return((long)l_SeqNo );
|
|
//}
|
|
|
|
|
|
void set_SeqNo( long arg );//{
|
|
//l_SeqNo = 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;
|
|
//}
|
|
|
|
char* ExCoilId() const;//{
|
|
//return((char*)c_ExCoilId );
|
|
//}
|
|
|
|
short ExCoilIdZi() const;//{
|
|
//return( s_ExCoilIdZi);
|
|
//}
|
|
|
|
void set_ExCoilId( const char* arg );//{
|
|
//strncpy((char*)c_ExCoilId , arg , sizeof(c_ExCoilId));
|
|
//c_ExCoilId[sizeof(c_ExCoilId)-1] = '\0';
|
|
//s_ExCoilIdZi= 0;
|
|
//return;
|
|
//}
|
|
|
|
void set_ExCoilIdZi( short arg ) ;//{
|
|
//s_ExCoilIdZi = arg;
|
|
//}
|
|
|
|
double DLPTension() const;//{
|
|
//return((double)d_DLPTension );
|
|
//}
|
|
|
|
short DLPTensionZi() const;//{
|
|
//return( s_DLPTensionZi);
|
|
//}
|
|
|
|
void set_DLPTension( double arg );//{
|
|
//d_DLPTension = arg;
|
|
//s_DLPTensionZi= 0;
|
|
//return;
|
|
//}
|
|
|
|
void set_DLPTensionZi( short arg ) ;//{
|
|
//s_DLPTensionZi = arg;
|
|
//}
|
|
|
|
char* TC() const;//{
|
|
//return((char*)c_TC );
|
|
//}
|
|
|
|
short TCZi() const;//{
|
|
//return( s_TCZi);
|
|
//}
|
|
|
|
void set_TC( char* arg );//{
|
|
//strncpy((char*)c_TC , arg , sizeof(c_TC));
|
|
//c_TC[sizeof(c_TC)-1] = '\0';
|
|
//s_TCZi= 0;
|
|
//return;
|
|
//}
|
|
|
|
void set_TCZi( short arg ) ;//{
|
|
//s_TCZi = 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:
|
|
// 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_CYC_EXTSEG095");
|
|
//}
|
|
///////////////////////////////////////////////////
|
|
long getSqlCode();//{
|
|
//return( db.dbSqlCode);
|
|
//}
|
|
///////////////////////////////////////////////////
|
|
long getRowsProcessed();//{
|
|
//return( db.dbRowsProcessed);
|
|
//}
|
|
};
|
|
#endif
|