509 lines
8.7 KiB
C++
509 lines
8.7 KiB
C++
// Version: 2014.9.2 16:30:15
|
|
|
|
#ifndef _T_LOV_ELONGAT_H
|
|
#define _T_LOV_ELONGAT_H
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
#include <stdlib.h>
|
|
#ifdef _MSC_VER
|
|
#pragma warning(disable:4996)
|
|
#pragma warning(disable:4267)
|
|
#endif
|
|
#include "T_LOV_ELONGATDBAX.h"
|
|
class T_LOV_ELONGAT{
|
|
friend class T_LOV_ELONGATDBAX;
|
|
private:
|
|
//aggregation to DB Class
|
|
T_LOV_ELONGATDBAX 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_SGCode;
|
|
long l_ThickMax;
|
|
long l_ThickMin;
|
|
long l_WidthMax;
|
|
long l_WidthMin;
|
|
short s_TlMode;
|
|
short s_TlModeZi;
|
|
double d_TlElongation;
|
|
short s_TlElongationZi;
|
|
double d_TlBending1;
|
|
short s_TlBending1Zi;
|
|
double d_TlBending2;
|
|
short s_TlBending2Zi;
|
|
double d_TlBending3;
|
|
short s_TlBending3Zi;
|
|
double d_TlBendingR;
|
|
short s_TlBendingRZi;
|
|
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_SGCode;
|
|
long l_k_ThickMax;
|
|
long l_k_ThickMin;
|
|
long l_k_WidthMax;
|
|
long l_k_WidthMin;
|
|
public:
|
|
//
|
|
// LTA Structure
|
|
struct STR_T_LOV_ELONGAT{
|
|
int SGCode;
|
|
int ThickMax;
|
|
int ThickMin;
|
|
int WidthMax;
|
|
int WidthMin;
|
|
short TlMode;
|
|
double TlElongation;
|
|
double TlBending1;
|
|
double TlBending2;
|
|
double TlBending3;
|
|
double TlBendingR;
|
|
char toc[27];
|
|
char tom[27];
|
|
char mop[121];
|
|
char mou[31];
|
|
}structTable;
|
|
// LTA Structure Zi
|
|
struct STR_T_LOV_ELONGATZi{
|
|
short TlModeZi;
|
|
short TlElongationZi;
|
|
short TlBending1Zi;
|
|
short TlBending2Zi;
|
|
short TlBending3Zi;
|
|
short TlBendingRZi;
|
|
short tocZi;
|
|
short tomZi;
|
|
short mopZi;
|
|
short mouZi;
|
|
}structTableZi;
|
|
//
|
|
//C O N S T R U C T O R S
|
|
//=======================
|
|
//
|
|
public:
|
|
T_LOV_ELONGAT();
|
|
//D E S T R U C T O R S
|
|
//=======================
|
|
//
|
|
virtual ~T_LOV_ELONGAT();
|
|
//
|
|
//C O P Y - C O N S T R U C T O R
|
|
//=======================
|
|
T_LOV_ELONGAT(const T_LOV_ELONGAT &inst);
|
|
// For Constructors with parameters the flag dbAccess
|
|
// informs you if the access was successfully or not
|
|
T_LOV_ELONGAT( long arg1,long arg2,long arg3,long arg4,long arg5);
|
|
|
|
//methods
|
|
public:
|
|
char* getCreationTime() {return "2014.9.2 16:30:15";};
|
|
//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 , long arg2 , long arg3 , long arg4 , long arg5 );
|
|
|
|
|
|
// public methode initInsertKeys
|
|
//
|
|
// this methode stores the unique key attributes
|
|
//
|
|
void initInsertKeys( long arg1 , long arg2 , long arg3 , long arg4 , long arg5 );
|
|
|
|
|
|
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_LOV_ELONGAT operator+(const T_LOV_ELONGAT &inst) const;
|
|
|
|
//
|
|
//O P E R A T O R =
|
|
//===================
|
|
//
|
|
public:
|
|
const T_LOV_ELONGAT& operator=(const T_LOV_ELONGAT &inst);
|
|
long SGCode() const;//{
|
|
//return((long)l_SGCode );
|
|
//}
|
|
|
|
|
|
void set_SGCode( long arg );//{
|
|
//l_SGCode = arg;
|
|
//return;
|
|
//}
|
|
|
|
|
|
long ThickMax() const;//{
|
|
//return((long)l_ThickMax );
|
|
//}
|
|
|
|
|
|
void set_ThickMax( long arg );//{
|
|
//l_ThickMax = arg;
|
|
//return;
|
|
//}
|
|
|
|
|
|
long ThickMin() const;//{
|
|
//return((long)l_ThickMin );
|
|
//}
|
|
|
|
|
|
void set_ThickMin( long arg );//{
|
|
//l_ThickMin = arg;
|
|
//return;
|
|
//}
|
|
|
|
|
|
long WidthMax() const;//{
|
|
//return((long)l_WidthMax );
|
|
//}
|
|
|
|
|
|
void set_WidthMax( long arg );//{
|
|
//l_WidthMax = arg;
|
|
//return;
|
|
//}
|
|
|
|
|
|
long WidthMin() const;//{
|
|
//return((long)l_WidthMin );
|
|
//}
|
|
|
|
|
|
void set_WidthMin( long arg );//{
|
|
//l_WidthMin = arg;
|
|
//return;
|
|
//}
|
|
|
|
|
|
short TlMode() const;//{
|
|
//return((short)s_TlMode );
|
|
//}
|
|
|
|
short TlModeZi() const;//{
|
|
//return( s_TlModeZi);
|
|
//}
|
|
|
|
void set_TlMode( short arg );//{
|
|
//s_TlMode = arg;
|
|
//s_TlModeZi= 0;
|
|
//return;
|
|
//}
|
|
|
|
void set_TlModeZi( short arg ) ;//{
|
|
//s_TlModeZi = arg;
|
|
//}
|
|
|
|
double TlElongation() const;//{
|
|
//return((double)d_TlElongation );
|
|
//}
|
|
|
|
short TlElongationZi() const;//{
|
|
//return( s_TlElongationZi);
|
|
//}
|
|
|
|
void set_TlElongation( double arg );//{
|
|
//d_TlElongation = arg;
|
|
//s_TlElongationZi= 0;
|
|
//return;
|
|
//}
|
|
|
|
void set_TlElongationZi( short arg ) ;//{
|
|
//s_TlElongationZi = arg;
|
|
//}
|
|
|
|
double TlBending1() const;//{
|
|
//return((double)d_TlBending1 );
|
|
//}
|
|
|
|
short TlBending1Zi() const;//{
|
|
//return( s_TlBending1Zi);
|
|
//}
|
|
|
|
void set_TlBending1( double arg );//{
|
|
//d_TlBending1 = arg;
|
|
//s_TlBending1Zi= 0;
|
|
//return;
|
|
//}
|
|
|
|
void set_TlBending1Zi( short arg ) ;//{
|
|
//s_TlBending1Zi = arg;
|
|
//}
|
|
|
|
double TlBending2() const;//{
|
|
//return((double)d_TlBending2 );
|
|
//}
|
|
|
|
short TlBending2Zi() const;//{
|
|
//return( s_TlBending2Zi);
|
|
//}
|
|
|
|
void set_TlBending2( double arg );//{
|
|
//d_TlBending2 = arg;
|
|
//s_TlBending2Zi= 0;
|
|
//return;
|
|
//}
|
|
|
|
void set_TlBending2Zi( short arg ) ;//{
|
|
//s_TlBending2Zi = arg;
|
|
//}
|
|
|
|
double TlBending3() const;//{
|
|
//return((double)d_TlBending3 );
|
|
//}
|
|
|
|
short TlBending3Zi() const;//{
|
|
//return( s_TlBending3Zi);
|
|
//}
|
|
|
|
void set_TlBending3( double arg );//{
|
|
//d_TlBending3 = arg;
|
|
//s_TlBending3Zi= 0;
|
|
//return;
|
|
//}
|
|
|
|
void set_TlBending3Zi( short arg ) ;//{
|
|
//s_TlBending3Zi = arg;
|
|
//}
|
|
|
|
double TlBendingR() const;//{
|
|
//return((double)d_TlBendingR );
|
|
//}
|
|
|
|
short TlBendingRZi() const;//{
|
|
//return( s_TlBendingRZi);
|
|
//}
|
|
|
|
void set_TlBendingR( double arg );//{
|
|
//d_TlBendingR = arg;
|
|
//s_TlBendingRZi= 0;
|
|
//return;
|
|
//}
|
|
|
|
void set_TlBendingRZi( short arg ) ;//{
|
|
//s_TlBendingRZi = 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_SGCode();//{
|
|
//return((long)l_k_SGCode );
|
|
//}
|
|
|
|
void set_k_SGCode( long arg );//{
|
|
//l_k_SGCode = arg;
|
|
//return;
|
|
//}
|
|
|
|
long k_ThickMax();//{
|
|
//return((long)l_k_ThickMax );
|
|
//}
|
|
|
|
void set_k_ThickMax( long arg );//{
|
|
//l_k_ThickMax = arg;
|
|
//return;
|
|
//}
|
|
|
|
long k_ThickMin();//{
|
|
//return((long)l_k_ThickMin );
|
|
//}
|
|
|
|
void set_k_ThickMin( long arg );//{
|
|
//l_k_ThickMin = arg;
|
|
//return;
|
|
//}
|
|
|
|
long k_WidthMax();//{
|
|
//return((long)l_k_WidthMax );
|
|
//}
|
|
|
|
void set_k_WidthMax( long arg );//{
|
|
//l_k_WidthMax = arg;
|
|
//return;
|
|
//}
|
|
|
|
long k_WidthMin();//{
|
|
//return((long)l_k_WidthMin );
|
|
//}
|
|
|
|
void set_k_WidthMin( long arg );//{
|
|
//l_k_WidthMin = 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_LOV_ELONGAT");
|
|
//}
|
|
///////////////////////////////////////////////////
|
|
int getSqlCode();//{
|
|
//return( db.dbSqlCode);
|
|
//}
|
|
///////////////////////////////////////////////////
|
|
int getRowsProcessed();//{
|
|
//return( db.dbRowsProcessed);
|
|
//}
|
|
};
|
|
#endif
|