eis/inc/dbinc/T_STA_PROAB_A.h

346 lines
6.8 KiB
C++

// Version: 2020.7.15 20:54:34
#ifndef _T_STA_PROAB_A_H
#define _T_STA_PROAB_A_H
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#ifdef _MSC_VER
#pragma warning(disable:4996)
#pragma warning(disable:4267)
#endif
#include "T_STA_PROAB_ADBAX.h"
class T_STA_PROAB_A{
friend class T_STA_PROAB_ADBAX;
private:
//aggregation to DB Class
T_STA_PROAB_ADBAX 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_updateTime[27];
char c_tagName[50+1];
char c_tagNameChinese[100+1];
short s_tagNameChineseZi;
double d_standardDeviation;
short s_standardDeviationZi;
char c_data[7000+1];
short s_dataZi;
double d_ruleMin;
short s_ruleMinZi;
double d_ruleMax;
short s_ruleMaxZi;
short s_source;
short s_sourceZi;
// arguments for Primary key
char c_k_updateTime[27];
char c_k_tagName[50+1];
public:
//
// LTA Structure
struct STR_T_STA_PROAB_A{
char updateTime[27];
char tagName[50+1];
char tagNameChinese[100+1];
double standardDeviation;
char data[7000+1];
double ruleMin;
double ruleMax;
short source;
}structTable;
// LTA Structure Zi
struct STR_T_STA_PROAB_AZi{
short tagNameChineseZi;
short standardDeviationZi;
short dataZi;
short ruleMinZi;
short ruleMaxZi;
short sourceZi;
}structTableZi;
//
//C O N S T R U C T O R S
//=======================
//
public:
T_STA_PROAB_A();
//D E S T R U C T O R S
//=======================
//
virtual ~T_STA_PROAB_A();
//
//C O P Y - C O N S T R U C T O R
//=======================
T_STA_PROAB_A(const T_STA_PROAB_A &inst);
// For Constructors with parameters the flag dbAccess
// informs you if the access was successfully or not
T_STA_PROAB_A( char* arg1,const char* arg2);
//methods
public:
char* getCreationTime() {return (char*)"2020.7.15 20:54:34";};
//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(char* arg1 , const char* arg2 );
// public methode initInsertKeys
//
// this methode stores the unique key attributes
//
void initInsertKeys( char* arg1 , const char* arg2 );
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_STA_PROAB_A operator+(const T_STA_PROAB_A &inst) const;
//
//O P E R A T O R =
//===================
//
public:
const T_STA_PROAB_A& operator=(const T_STA_PROAB_A &inst);
char* updateTime() const;//{
//return((char*)c_updateTime );
//}
void set_updateTime( char* arg );//{
//strncpy((char*)c_updateTime , arg , sizeof(c_updateTime));
//c_updateTime[sizeof(c_updateTime)-1] = '\0';
//return;
//}
char* tagName() const;//{
//return((char*)c_tagName );
//}
void set_tagName( const char* arg );//{
//strncpy((char*)c_tagName , arg , sizeof(c_tagName));
//c_tagName[sizeof(c_tagName)-1] = '\0';
//return;
//}
char* tagNameChinese() const;//{
//return((char*)c_tagNameChinese );
//}
short tagNameChineseZi() const;//{
//return( s_tagNameChineseZi);
//}
void set_tagNameChinese( const char* arg );//{
//strncpy((char*)c_tagNameChinese , arg , sizeof(c_tagNameChinese));
//c_tagNameChinese[sizeof(c_tagNameChinese)-1] = '\0';
//s_tagNameChineseZi= 0;
//return;
//}
void set_tagNameChineseZi( short arg ) ;//{
//s_tagNameChineseZi = arg;
//}
double standardDeviation() const;//{
//return((double)d_standardDeviation );
//}
short standardDeviationZi() const;//{
//return( s_standardDeviationZi);
//}
void set_standardDeviation( double arg );//{
//d_standardDeviation = arg;
//s_standardDeviationZi= 0;
//return;
//}
void set_standardDeviationZi( short arg ) ;//{
//s_standardDeviationZi = arg;
//}
char* data() const;//{
//return((char*)c_data );
//}
short dataZi() const;//{
//return( s_dataZi);
//}
void set_data( const char* arg );//{
//strncpy((char*)c_data , arg , sizeof(c_data));
//c_data[sizeof(c_data)-1] = '\0';
//s_dataZi= 0;
//return;
//}
void set_dataZi( short arg ) ;//{
//s_dataZi = arg;
//}
double ruleMin() const;//{
//return((double)d_ruleMin );
//}
short ruleMinZi() const;//{
//return( s_ruleMinZi);
//}
void set_ruleMin( double arg );//{
//d_ruleMin = arg;
//s_ruleMinZi= 0;
//return;
//}
void set_ruleMinZi( short arg ) ;//{
//s_ruleMinZi = arg;
//}
double ruleMax() const;//{
//return((double)d_ruleMax );
//}
short ruleMaxZi() const;//{
//return( s_ruleMaxZi);
//}
void set_ruleMax( double arg );//{
//d_ruleMax = arg;
//s_ruleMaxZi= 0;
//return;
//}
void set_ruleMaxZi( short arg ) ;//{
//s_ruleMaxZi = arg;
//}
short source() const;//{
//return((short)s_source );
//}
short sourceZi() const;//{
//return( s_sourceZi);
//}
void set_source( short arg );//{
//s_source = arg;
//s_sourceZi= 0;
//return;
//}
void set_sourceZi( short arg ) ;//{
//s_sourceZi = arg;
//}
public:
// methodes for Primary key
char* k_updateTime();//{
//return((char*)c_k_updateTime );
//}
void set_k_updateTime( char* arg );//{
//strncpy((char*)c_k_updateTime , arg , sizeof(c_k_updateTime));
//c_k_updateTime[sizeof(c_k_updateTime)-1] = '\0';
//return;
//}
char* k_tagName();//{
//return((char*)c_k_tagName );
//}
void set_k_tagName( char* arg );//{
//strncpy((char*)c_k_tagName , arg , sizeof(c_k_tagName));
//c_k_tagName[sizeof(c_k_tagName)-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_STA_PROAB_A");
//}
///////////////////////////////////////////////////
int getSqlCode();//{
//return( db.dbSqlCode);
//}
///////////////////////////////////////////////////
int getRowsProcessed();//{
//return( db.dbRowsProcessed);
//}
};
#endif