eis/inc/dbinc/T_ACT_LINE.h

481 lines
8.3 KiB
C++

// Version: 2015.2.25 14:8:45
#ifndef _T_ACT_LINE_H
#define _T_ACT_LINE_H
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#ifdef _MSC_VER
#pragma warning(disable:4996)
#pragma warning(disable:4267)
#endif
#include "T_ACT_LINEDBAX.h"
class T_ACT_LINE{
friend class T_ACT_LINEDBAX;
private:
//aggregation to DB Class
T_ACT_LINEDBAX 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_Seq;
long l_EntSpeed;
short s_EntSpeedZi;
long l_CntSpeed;
short s_CntSpeedZi;
long l_ExtSpeed;
short s_ExtSpeedZi;
long l_Looper[3];
short s_LooperZi[3];
long l_PorLen[2];
short s_PorLenZi[2];
long l_PorDiam[2];
short s_PorDiamZi[2];
long l_TrLen[2];
short s_TrLenZi[2];
long l_TrDiam[2];
short s_TrDiamZi[2];
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_Seq;
public:
//
// LTA Structure
struct STR_T_ACT_LINE{
int Seq;
int EntSpeed;
int CntSpeed;
int ExtSpeed;
int Looper[3];
int PorLen[2];
int PorDiam[2];
int TrLen[2];
int TrDiam[2];
char toc[27];
char tom[27];
char mop[121];
char mou[31];
}structTable;
// LTA Structure Zi
struct STR_T_ACT_LINEZi{
short EntSpeedZi;
short CntSpeedZi;
short ExtSpeedZi;
short LooperZi[3];
short PorLenZi[2];
short PorDiamZi[2];
short TrLenZi[2];
short TrDiamZi[2];
short tocZi;
short tomZi;
short mopZi;
short mouZi;
}structTableZi;
//
//C O N S T R U C T O R S
//=======================
//
public:
T_ACT_LINE();
//D E S T R U C T O R S
//=======================
//
virtual ~T_ACT_LINE();
//
//C O P Y - C O N S T R U C T O R
//=======================
T_ACT_LINE(const T_ACT_LINE &inst);
// For Constructors with parameters the flag dbAccess
// informs you if the access was successfully or not
T_ACT_LINE( long arg1);
//methods
public:
char* getCreationTime() {return "2015.2.25 14:8:45";};
//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_ACT_LINE operator+(const T_ACT_LINE &inst) const;
//
//O P E R A T O R =
//===================
//
public:
const T_ACT_LINE& operator=(const T_ACT_LINE &inst);
long Seq() const;//{
//return((long)l_Seq );
//}
void set_Seq( long arg );//{
//l_Seq = arg;
//return;
//}
long EntSpeed() const;//{
//return((long)l_EntSpeed );
//}
short EntSpeedZi() const;//{
//return( s_EntSpeedZi);
//}
void set_EntSpeed( long arg );//{
//l_EntSpeed = arg;
//s_EntSpeedZi= 0;
//return;
//}
void set_EntSpeedZi( short arg ) ;//{
//s_EntSpeedZi = arg;
//}
long CntSpeed() const;//{
//return((long)l_CntSpeed );
//}
short CntSpeedZi() const;//{
//return( s_CntSpeedZi);
//}
void set_CntSpeed( long arg );//{
//l_CntSpeed = arg;
//s_CntSpeedZi= 0;
//return;
//}
void set_CntSpeedZi( short arg ) ;//{
//s_CntSpeedZi = arg;
//}
long ExtSpeed() const;//{
//return((long)l_ExtSpeed );
//}
short ExtSpeedZi() const;//{
//return( s_ExtSpeedZi);
//}
void set_ExtSpeed( long arg );//{
//l_ExtSpeed = arg;
//s_ExtSpeedZi= 0;
//return;
//}
void set_ExtSpeedZi( short arg ) ;//{
//s_ExtSpeedZi = arg;
//}
int LooperArraySize();//{
//return(3);
//}
long Looper(int colInd) const;//{
//return((int)l_Looper[colInd] );
//}
short LooperZi(int colInd) const;//{
//return( s_LooperZi[colInd]);
//}
void set_Looper( int colInd, long arg );//{
//l_Looper[colInd] = arg;
//s_LooperZi[colInd]= 0;
//return;
//}
void set_LooperZi( int colInd, short arg );// {
//s_LooperZi[colInd] = arg;
//}
int PorLenArraySize();//{
//return(2);
//}
long PorLen(int colInd) const;//{
//return((int)l_PorLen[colInd] );
//}
short PorLenZi(int colInd) const;//{
//return( s_PorLenZi[colInd]);
//}
void set_PorLen( int colInd, long arg );//{
//l_PorLen[colInd] = arg;
//s_PorLenZi[colInd]= 0;
//return;
//}
void set_PorLenZi( int colInd, short arg );// {
//s_PorLenZi[colInd] = arg;
//}
int PorDiamArraySize();//{
//return(2);
//}
long PorDiam(int colInd) const;//{
//return((int)l_PorDiam[colInd] );
//}
short PorDiamZi(int colInd) const;//{
//return( s_PorDiamZi[colInd]);
//}
void set_PorDiam( int colInd, long arg );//{
//l_PorDiam[colInd] = arg;
//s_PorDiamZi[colInd]= 0;
//return;
//}
void set_PorDiamZi( int colInd, short arg );// {
//s_PorDiamZi[colInd] = arg;
//}
int TrLenArraySize();//{
//return(2);
//}
long TrLen(int colInd) const;//{
//return((int)l_TrLen[colInd] );
//}
short TrLenZi(int colInd) const;//{
//return( s_TrLenZi[colInd]);
//}
void set_TrLen( int colInd, long arg );//{
//l_TrLen[colInd] = arg;
//s_TrLenZi[colInd]= 0;
//return;
//}
void set_TrLenZi( int colInd, short arg );// {
//s_TrLenZi[colInd] = arg;
//}
int TrDiamArraySize();//{
//return(2);
//}
long TrDiam(int colInd) const;//{
//return((int)l_TrDiam[colInd] );
//}
short TrDiamZi(int colInd) const;//{
//return( s_TrDiamZi[colInd]);
//}
void set_TrDiam( int colInd, long arg );//{
//l_TrDiam[colInd] = arg;
//s_TrDiamZi[colInd]= 0;
//return;
//}
void set_TrDiamZi( int colInd, short arg );// {
//s_TrDiamZi[colInd] = 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_Seq();//{
//return((long)l_k_Seq );
//}
void set_k_Seq( long arg );//{
//l_k_Seq = 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_ACT_LINE");
//}
///////////////////////////////////////////////////
int getSqlCode();//{
//return( db.dbSqlCode);
//}
///////////////////////////////////////////////////
int getRowsProcessed();//{
//return( db.dbRowsProcessed);
//}
};
#endif