eis/inc/dbinc/T_RULE_RESULT.h

351 lines
7.1 KiB
C++

// Version: 2021.3.3 10:24:15
#ifndef _T_RULE_RESULT_H
#define _T_RULE_RESULT_H
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#ifdef _MSC_VER
#pragma warning(disable:4996)
#pragma warning(disable:4267)
#endif
#include "T_RULE_RESULTDBAX.h"
class T_RULE_RESULT{
friend class T_RULE_RESULTDBAX;
private:
//aggregation to DB Class
T_RULE_RESULTDBAX 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_RuleBTime[27];
char c_RuleId[40+1];
char c_RuleGroup[20+1];
char c_RuleName[100+1];
short s_RuleNameZi;
char c_Result[1000+1];
short s_ResultZi;
long l_DealResult;
short s_DealResultZi;
char c_RuleETime[27];
short s_RuleETimeZi;
char c_DealTime[27];
short s_DealTimeZi;
// arguments for Primary key
char c_k_RuleBTime[27];
char c_k_RuleId[40+1];
char c_k_RuleGroup[20+1];
public:
//
// LTA Structure
struct STR_T_RULE_RESULT{
char RuleBTime[27];
char RuleId[40+1];
char RuleGroup[20+1];
char RuleName[100+1];
char Result[1000+1];
int DealResult;
char RuleETime[27];
char DealTime[27];
}structTable;
// LTA Structure Zi
struct STR_T_RULE_RESULTZi{
short RuleNameZi;
short ResultZi;
short DealResultZi;
short RuleETimeZi;
short DealTimeZi;
}structTableZi;
//
//C O N S T R U C T O R S
//=======================
//
public:
T_RULE_RESULT();
//D E S T R U C T O R S
//=======================
//
virtual ~T_RULE_RESULT();
//
//C O P Y - C O N S T R U C T O R
//=======================
T_RULE_RESULT(const T_RULE_RESULT &inst);
// For Constructors with parameters the flag dbAccess
// informs you if the access was successfully or not
T_RULE_RESULT( char* arg1,const char* arg2,const char* arg3);
//methods
public:
char* getCreationTime() {return (char*)"2021.3.3 10:24:15";};
//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 , const char* arg3 );
// public methode initInsertKeys
//
// this methode stores the unique key attributes
//
void initInsertKeys( char* arg1 , const char* arg2 , const char* arg3 );
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_RULE_RESULT operator+(const T_RULE_RESULT &inst) const;
//
//O P E R A T O R =
//===================
//
public:
const T_RULE_RESULT& operator=(const T_RULE_RESULT &inst);
char* RuleBTime() const;//{
//return((char*)c_RuleBTime );
//}
void set_RuleBTime( char* arg );//{
//strncpy((char*)c_RuleBTime , arg , sizeof(c_RuleBTime));
//c_RuleBTime[sizeof(c_RuleBTime)-1] = '\0';
//return;
//}
char* RuleId() const;//{
//return((char*)c_RuleId );
//}
void set_RuleId( const char* arg );//{
//strncpy((char*)c_RuleId , arg , sizeof(c_RuleId));
//c_RuleId[sizeof(c_RuleId)-1] = '\0';
//return;
//}
char* RuleGroup() const;//{
//return((char*)c_RuleGroup );
//}
void set_RuleGroup( const char* arg );//{
//strncpy((char*)c_RuleGroup , arg , sizeof(c_RuleGroup));
//c_RuleGroup[sizeof(c_RuleGroup)-1] = '\0';
//return;
//}
char* RuleName() const;//{
//return((char*)c_RuleName );
//}
short RuleNameZi() const;//{
//return( s_RuleNameZi);
//}
void set_RuleName( const char* arg );//{
//strncpy((char*)c_RuleName , arg , sizeof(c_RuleName));
//c_RuleName[sizeof(c_RuleName)-1] = '\0';
//s_RuleNameZi= 0;
//return;
//}
void set_RuleNameZi( short arg ) ;//{
//s_RuleNameZi = arg;
//}
char* Result() const;//{
//return((char*)c_Result );
//}
short ResultZi() const;//{
//return( s_ResultZi);
//}
void set_Result( const char* arg );//{
//strncpy((char*)c_Result , arg , sizeof(c_Result));
//c_Result[sizeof(c_Result)-1] = '\0';
//s_ResultZi= 0;
//return;
//}
void set_ResultZi( short arg ) ;//{
//s_ResultZi = arg;
//}
long DealResult() const;//{
//return((long)l_DealResult );
//}
short DealResultZi() const;//{
//return( s_DealResultZi);
//}
void set_DealResult( long arg );//{
//l_DealResult = arg;
//s_DealResultZi= 0;
//return;
//}
void set_DealResultZi( short arg ) ;//{
//s_DealResultZi = arg;
//}
char* RuleETime() const;//{
//return((char*)c_RuleETime );
//}
short RuleETimeZi() const;//{
//return( s_RuleETimeZi);
//}
void set_RuleETime( char* arg );//{
//strncpy((char*)c_RuleETime , arg , sizeof(c_RuleETime));
//c_RuleETime[sizeof(c_RuleETime)-1] = '\0';
//s_RuleETimeZi= 0;
//return;
//}
void set_RuleETimeZi( short arg ) ;//{
//s_RuleETimeZi = arg;
//}
char* DealTime() const;//{
//return((char*)c_DealTime );
//}
short DealTimeZi() const;//{
//return( s_DealTimeZi);
//}
void set_DealTime( char* arg );//{
//strncpy((char*)c_DealTime , arg , sizeof(c_DealTime));
//c_DealTime[sizeof(c_DealTime)-1] = '\0';
//s_DealTimeZi= 0;
//return;
//}
void set_DealTimeZi( short arg ) ;//{
//s_DealTimeZi = arg;
//}
public:
// methodes for Primary key
char* k_RuleBTime();//{
//return((char*)c_k_RuleBTime );
//}
void set_k_RuleBTime( char* arg );//{
//strncpy((char*)c_k_RuleBTime , arg , sizeof(c_k_RuleBTime));
//c_k_RuleBTime[sizeof(c_k_RuleBTime)-1] = '\0';
//return;
//}
char* k_RuleId();//{
//return((char*)c_k_RuleId );
//}
void set_k_RuleId( char* arg );//{
//strncpy((char*)c_k_RuleId , arg , sizeof(c_k_RuleId));
//c_k_RuleId[sizeof(c_k_RuleId)-1] = '\0';
//return;
//}
char* k_RuleGroup();//{
//return((char*)c_k_RuleGroup );
//}
void set_k_RuleGroup( char* arg );//{
//strncpy((char*)c_k_RuleGroup , arg , sizeof(c_k_RuleGroup));
//c_k_RuleGroup[sizeof(c_k_RuleGroup)-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_RULE_RESULT");
//}
///////////////////////////////////////////////////
int getSqlCode();//{
//return( db.dbSqlCode);
//}
///////////////////////////////////////////////////
int getRowsProcessed();//{
//return( db.dbRowsProcessed);
//}
};
#endif