299 lines
5.3 KiB
C++
299 lines
5.3 KiB
C++
// Version: 2019.4.4 10:22:45
|
|
|
|
#ifndef _T_TRK_CUT_H
|
|
#define _T_TRK_CUT_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_CUTDBAX.h"
|
|
class T_TRK_CUT{
|
|
friend class T_TRK_CUTDBAX;
|
|
private:
|
|
//aggregation to DB Class
|
|
T_TRK_CUTDBAX 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_extId[21+1];
|
|
char c_entId[21+1];
|
|
short s_entIdZi;
|
|
long l_mode;
|
|
short s_modeZi;
|
|
long l_start;
|
|
short s_startZi;
|
|
long l_end;
|
|
short s_endZi;
|
|
char c_TC[27];
|
|
short s_TCZi;
|
|
// arguments for Primary key
|
|
char c_k_extId[21+1];
|
|
public:
|
|
//
|
|
// LTA Structure
|
|
struct STR_T_TRK_CUT{
|
|
char extId[21+1];
|
|
char entId[21+1];
|
|
int mode;
|
|
int start;
|
|
int end;
|
|
char TC[27];
|
|
}structTable;
|
|
// LTA Structure Zi
|
|
struct STR_T_TRK_CUTZi{
|
|
short entIdZi;
|
|
short modeZi;
|
|
short startZi;
|
|
short endZi;
|
|
short TCZi;
|
|
}structTableZi;
|
|
//
|
|
//C O N S T R U C T O R S
|
|
//=======================
|
|
//
|
|
public:
|
|
T_TRK_CUT();
|
|
//D E S T R U C T O R S
|
|
//=======================
|
|
//
|
|
virtual ~T_TRK_CUT();
|
|
//
|
|
//C O P Y - C O N S T R U C T O R
|
|
//=======================
|
|
T_TRK_CUT(const T_TRK_CUT &inst);
|
|
// For Constructors with parameters the flag dbAccess
|
|
// informs you if the access was successfully or not
|
|
T_TRK_CUT( const char* arg1);
|
|
|
|
//methods
|
|
public:
|
|
char* getCreationTime() {return (char*)"2019.4.4 10:22: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(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_TRK_CUT operator+(const T_TRK_CUT &inst) const;
|
|
|
|
//
|
|
//O P E R A T O R =
|
|
//===================
|
|
//
|
|
public:
|
|
const T_TRK_CUT& operator=(const T_TRK_CUT &inst);
|
|
char* extId() const;//{
|
|
//return((char*)c_extId );
|
|
//}
|
|
|
|
|
|
void set_extId( const char* arg );//{
|
|
//strncpy((char*)c_extId , arg , sizeof(c_extId));
|
|
//c_extId[sizeof(c_extId)-1] = '\0';
|
|
//return;
|
|
//}
|
|
|
|
|
|
char* entId() const;//{
|
|
//return((char*)c_entId );
|
|
//}
|
|
|
|
short entIdZi() const;//{
|
|
//return( s_entIdZi);
|
|
//}
|
|
|
|
void set_entId( const char* arg );//{
|
|
//strncpy((char*)c_entId , arg , sizeof(c_entId));
|
|
//c_entId[sizeof(c_entId)-1] = '\0';
|
|
//s_entIdZi= 0;
|
|
//return;
|
|
//}
|
|
|
|
void set_entIdZi( short arg ) ;//{
|
|
//s_entIdZi = arg;
|
|
//}
|
|
|
|
long mode() const;//{
|
|
//return((long)l_mode );
|
|
//}
|
|
|
|
short modeZi() const;//{
|
|
//return( s_modeZi);
|
|
//}
|
|
|
|
void set_mode( long arg );//{
|
|
//l_mode = arg;
|
|
//s_modeZi= 0;
|
|
//return;
|
|
//}
|
|
|
|
void set_modeZi( short arg ) ;//{
|
|
//s_modeZi = arg;
|
|
//}
|
|
|
|
long start() const;//{
|
|
//return((long)l_start );
|
|
//}
|
|
|
|
short startZi() const;//{
|
|
//return( s_startZi);
|
|
//}
|
|
|
|
void set_start( long arg );//{
|
|
//l_start = arg;
|
|
//s_startZi= 0;
|
|
//return;
|
|
//}
|
|
|
|
void set_startZi( short arg ) ;//{
|
|
//s_startZi = arg;
|
|
//}
|
|
|
|
long end() const;//{
|
|
//return((long)l_end );
|
|
//}
|
|
|
|
short endZi() const;//{
|
|
//return( s_endZi);
|
|
//}
|
|
|
|
void set_end( long arg );//{
|
|
//l_end = arg;
|
|
//s_endZi= 0;
|
|
//return;
|
|
//}
|
|
|
|
void set_endZi( short arg ) ;//{
|
|
//s_endZi = 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;
|
|
//}
|
|
|
|
public:
|
|
// methodes for Primary key
|
|
char* k_extId();//{
|
|
//return((char*)c_k_extId );
|
|
//}
|
|
|
|
void set_k_extId( char* arg );//{
|
|
//strncpy((char*)c_k_extId , arg , sizeof(c_k_extId));
|
|
//c_k_extId[sizeof(c_k_extId)-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_TRK_CUT");
|
|
//}
|
|
///////////////////////////////////////////////////
|
|
int getSqlCode();//{
|
|
//return( db.dbSqlCode);
|
|
//}
|
|
///////////////////////////////////////////////////
|
|
int getRowsProcessed();//{
|
|
//return( db.dbRowsProcessed);
|
|
//}
|
|
};
|
|
#endif
|