eis/inc/dbinc/T_PDI_ED.h

553 lines
9.5 KiB
C++

// Version: 2021.3.25 16:25:20
#ifndef _T_PDI_ED_H
#define _T_PDI_ED_H
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#ifdef _MSC_VER
#pragma warning(disable:4996)
#pragma warning(disable:4267)
#endif
#include "T_PDI_EDDBAX.h"
class T_PDI_ED{
friend class T_PDI_EDDBAX;
private:
//aggregation to DB Class
T_PDI_EDDBAX 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
//===================
//
char c_entId[50+1];
char c_steelgrade[20+1];
short s_steelgradeZi;
char c_alloycode[20+1];
short s_alloycodeZi;
double d_thick;
short s_thickZi;
double d_width;
short s_widthZi;
double d_nspare1;
short s_nspare1Zi;
double d_nspare2;
short s_nspare2Zi;
double d_nspare3;
short s_nspare3Zi;
double d_nspare4;
short s_nspare4Zi;
double d_nspare5;
short s_nspare5Zi;
double d_nspare6;
short s_nspare6Zi;
double d_nspare7;
short s_nspare7Zi;
double d_nspare8;
short s_nspare8Zi;
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
char c_k_entId[50+1];
public:
//
// LTA Structure
struct STR_T_PDI_ED{
char entId[50+1];
char steelgrade[20+1];
char alloycode[20+1];
double thick;
double width;
double nspare1;
double nspare2;
double nspare3;
double nspare4;
double nspare5;
double nspare6;
double nspare7;
double nspare8;
char toc[27];
char tom[27];
char mop[121];
char mou[31];
}structTable;
// LTA Structure Zi
struct STR_T_PDI_EDZi{
short steelgradeZi;
short alloycodeZi;
short thickZi;
short widthZi;
short nspare1Zi;
short nspare2Zi;
short nspare3Zi;
short nspare4Zi;
short nspare5Zi;
short nspare6Zi;
short nspare7Zi;
short nspare8Zi;
short tocZi;
short tomZi;
short mopZi;
short mouZi;
}structTableZi;
//
//C O N S T R U C T O R S
//=======================
//
public:
T_PDI_ED();
//D E S T R U C T O R S
//=======================
//
virtual ~T_PDI_ED();
//
//C O P Y - C O N S T R U C T O R
//=======================
T_PDI_ED(const T_PDI_ED &inst);
// For Constructors with parameters the flag dbAccess
// informs you if the access was successfully or not
T_PDI_ED( const char* arg1);
//methods
public:
char* getCreationTime() {return (char*)"2021.3.25 16:25:20";};
//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(const char* arg1 );
// public methode initInsertKeys
//
// this methode stores the unique key attributes
//
void initInsertKeys( const char* 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_PDI_ED operator+(const T_PDI_ED &inst) const;
//
//O P E R A T O R =
//===================
//
public:
const T_PDI_ED& operator=(const T_PDI_ED &inst);
char* entId() const;//{
//return((char*)c_entId );
//}
void set_entId( const char* arg );//{
//strncpy((char*)c_entId , arg , sizeof(c_entId));
//c_entId[sizeof(c_entId)-1] = '\0';
//return;
//}
char* steelgrade() const;//{
//return((char*)c_steelgrade );
//}
short steelgradeZi() const;//{
//return( s_steelgradeZi);
//}
void set_steelgrade( const char* arg );//{
//strncpy((char*)c_steelgrade , arg , sizeof(c_steelgrade));
//c_steelgrade[sizeof(c_steelgrade)-1] = '\0';
//s_steelgradeZi= 0;
//return;
//}
void set_steelgradeZi( short arg ) ;//{
//s_steelgradeZi = arg;
//}
char* alloycode() const;//{
//return((char*)c_alloycode );
//}
short alloycodeZi() const;//{
//return( s_alloycodeZi);
//}
void set_alloycode( const char* arg );//{
//strncpy((char*)c_alloycode , arg , sizeof(c_alloycode));
//c_alloycode[sizeof(c_alloycode)-1] = '\0';
//s_alloycodeZi= 0;
//return;
//}
void set_alloycodeZi( short arg ) ;//{
//s_alloycodeZi = arg;
//}
double thick() const;//{
//return((double)d_thick );
//}
short thickZi() const;//{
//return( s_thickZi);
//}
void set_thick( double arg );//{
//d_thick = arg;
//s_thickZi= 0;
//return;
//}
void set_thickZi( short arg ) ;//{
//s_thickZi = arg;
//}
double width() const;//{
//return((double)d_width );
//}
short widthZi() const;//{
//return( s_widthZi);
//}
void set_width( double arg );//{
//d_width = arg;
//s_widthZi= 0;
//return;
//}
void set_widthZi( short arg ) ;//{
//s_widthZi = arg;
//}
double nspare1() const;//{
//return((double)d_nspare1 );
//}
short nspare1Zi() const;//{
//return( s_nspare1Zi);
//}
void set_nspare1( double arg );//{
//d_nspare1 = arg;
//s_nspare1Zi= 0;
//return;
//}
void set_nspare1Zi( short arg ) ;//{
//s_nspare1Zi = arg;
//}
double nspare2() const;//{
//return((double)d_nspare2 );
//}
short nspare2Zi() const;//{
//return( s_nspare2Zi);
//}
void set_nspare2( double arg );//{
//d_nspare2 = arg;
//s_nspare2Zi= 0;
//return;
//}
void set_nspare2Zi( short arg ) ;//{
//s_nspare2Zi = arg;
//}
double nspare3() const;//{
//return((double)d_nspare3 );
//}
short nspare3Zi() const;//{
//return( s_nspare3Zi);
//}
void set_nspare3( double arg );//{
//d_nspare3 = arg;
//s_nspare3Zi= 0;
//return;
//}
void set_nspare3Zi( short arg ) ;//{
//s_nspare3Zi = arg;
//}
double nspare4() const;//{
//return((double)d_nspare4 );
//}
short nspare4Zi() const;//{
//return( s_nspare4Zi);
//}
void set_nspare4( double arg );//{
//d_nspare4 = arg;
//s_nspare4Zi= 0;
//return;
//}
void set_nspare4Zi( short arg ) ;//{
//s_nspare4Zi = arg;
//}
double nspare5() const;//{
//return((double)d_nspare5 );
//}
short nspare5Zi() const;//{
//return( s_nspare5Zi);
//}
void set_nspare5( double arg );//{
//d_nspare5 = arg;
//s_nspare5Zi= 0;
//return;
//}
void set_nspare5Zi( short arg ) ;//{
//s_nspare5Zi = arg;
//}
double nspare6() const;//{
//return((double)d_nspare6 );
//}
short nspare6Zi() const;//{
//return( s_nspare6Zi);
//}
void set_nspare6( double arg );//{
//d_nspare6 = arg;
//s_nspare6Zi= 0;
//return;
//}
void set_nspare6Zi( short arg ) ;//{
//s_nspare6Zi = arg;
//}
double nspare7() const;//{
//return((double)d_nspare7 );
//}
short nspare7Zi() const;//{
//return( s_nspare7Zi);
//}
void set_nspare7( double arg );//{
//d_nspare7 = arg;
//s_nspare7Zi= 0;
//return;
//}
void set_nspare7Zi( short arg ) ;//{
//s_nspare7Zi = arg;
//}
double nspare8() const;//{
//return((double)d_nspare8 );
//}
short nspare8Zi() const;//{
//return( s_nspare8Zi);
//}
void set_nspare8( double arg );//{
//d_nspare8 = arg;
//s_nspare8Zi= 0;
//return;
//}
void set_nspare8Zi( short arg ) ;//{
//s_nspare8Zi = 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
char* k_entId();//{
//return((char*)c_k_entId );
//}
void set_k_entId( char* arg );//{
//strncpy((char*)c_k_entId , arg , sizeof(c_k_entId));
//c_k_entId[sizeof(c_k_entId)-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_PDI_ED");
//}
///////////////////////////////////////////////////
int getSqlCode();//{
//return( db.dbSqlCode);
//}
///////////////////////////////////////////////////
int getRowsProcessed();//{
//return( db.dbRowsProcessed);
//}
};
#endif