eis/inc/dbinc/T_DRIVE_ALARM.h

259 lines
5.1 KiB
C++

// Version: 2019.12.10 14:56:52
#ifndef _T_DRIVE_ALARM_H
#define _T_DRIVE_ALARM_H
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#ifdef _MSC_VER
#pragma warning(disable:4996)
#pragma warning(disable:4267)
#endif
#include "T_DRIVE_ALARMDBAX.h"
class T_DRIVE_ALARM{
friend class T_DRIVE_ALARMDBAX;
private:
//aggregation to DB Class
T_DRIVE_ALARMDBAX 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_item[100+1];
char c_code[100+1];
short s_codeZi;
char c_chinese[100+1];
short s_chineseZi;
long l_result[16];
short s_resultZi[16];
// arguments for Primary key
char c_k_item[100+1];
public:
//
// LTA Structure
struct STR_T_DRIVE_ALARM{
char item[100+1];
char code[100+1];
char chinese[100+1];
int result[16];
}structTable;
// LTA Structure Zi
struct STR_T_DRIVE_ALARMZi{
short codeZi;
short chineseZi;
short resultZi[16];
}structTableZi;
//
//C O N S T R U C T O R S
//=======================
//
public:
T_DRIVE_ALARM();
//D E S T R U C T O R S
//=======================
//
virtual ~T_DRIVE_ALARM();
//
//C O P Y - C O N S T R U C T O R
//=======================
T_DRIVE_ALARM(const T_DRIVE_ALARM &inst);
// For Constructors with parameters the flag dbAccess
// informs you if the access was successfully or not
T_DRIVE_ALARM( const char* arg1);
//methods
public:
char* getCreationTime() {return (char*)"2019.12.10 14:56:52";};
//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_DRIVE_ALARM operator+(const T_DRIVE_ALARM &inst) const;
//
//O P E R A T O R =
//===================
//
public:
const T_DRIVE_ALARM& operator=(const T_DRIVE_ALARM &inst);
char* item() const;//{
//return((char*)c_item );
//}
void set_item( const char* arg );//{
//strncpy((char*)c_item , arg , sizeof(c_item));
//c_item[sizeof(c_item)-1] = '\0';
//return;
//}
char* code() const;//{
//return((char*)c_code );
//}
short codeZi() const;//{
//return( s_codeZi);
//}
void set_code( const char* arg );//{
//strncpy((char*)c_code , arg , sizeof(c_code));
//c_code[sizeof(c_code)-1] = '\0';
//s_codeZi= 0;
//return;
//}
void set_codeZi( short arg ) ;//{
//s_codeZi = arg;
//}
char* chinese() const;//{
//return((char*)c_chinese );
//}
short chineseZi() const;//{
//return( s_chineseZi);
//}
void set_chinese( const char* arg );//{
//strncpy((char*)c_chinese , arg , sizeof(c_chinese));
//c_chinese[sizeof(c_chinese)-1] = '\0';
//s_chineseZi= 0;
//return;
//}
void set_chineseZi( short arg ) ;//{
//s_chineseZi = arg;
//}
int resultArraySize();//{
//return(16);
//}
long result(int colInd) const;//{
//return((int)l_result[colInd] );
//}
short resultZi(int colInd) const;//{
//return( s_resultZi[colInd]);
//}
void set_result( int colInd, long arg );//{
//l_result[colInd] = arg;
//s_resultZi[colInd]= 0;
//return;
//}
void set_resultZi( int colInd, short arg );// {
//s_resultZi[colInd] = arg;
//}
public:
// methodes for Primary key
char* k_item();//{
//return((char*)c_k_item );
//}
void set_k_item( char* arg );//{
//strncpy((char*)c_k_item , arg , sizeof(c_k_item));
//c_k_item[sizeof(c_k_item)-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_DRIVE_ALARM");
//}
///////////////////////////////////////////////////
int getSqlCode();//{
//return( db.dbSqlCode);
//}
///////////////////////////////////////////////////
int getRowsProcessed();//{
//return( db.dbRowsProcessed);
//}
};
#endif