468 lines
8.6 KiB
C++
468 lines
8.6 KiB
C++
// Version: 2019.4.4 10:22:45
|
|
|
|
#ifndef _T_LOV_LIMIT_H
|
|
#define _T_LOV_LIMIT_H
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
#include <stdlib.h>
|
|
#ifdef _MSC_VER
|
|
#pragma warning(disable:4996)
|
|
#pragma warning(disable:4267)
|
|
#endif
|
|
#include "T_LOV_LIMITDBAX.h"
|
|
class T_LOV_LIMIT{
|
|
friend class T_LOV_LIMITDBAX;
|
|
private:
|
|
//aggregation to DB Class
|
|
T_LOV_LIMITDBAX 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_plantType[8+1];
|
|
char c_limitName[60+1];
|
|
long l_CheckType;
|
|
short s_CheckTypeZi;
|
|
long l_Factor;
|
|
short s_FactorZi;
|
|
long l_LowerLimit;
|
|
short s_LowerLimitZi;
|
|
long l_UpperLimit;
|
|
short s_UpperLimitZi;
|
|
char c_Enumerate[256+1];
|
|
short s_EnumerateZi;
|
|
long l_WarnLevel;
|
|
short s_WarnLevelZi;
|
|
char c_ModDescr[256+1];
|
|
short s_ModDescrZi;
|
|
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
|
|
char c_k_plantType[8+1];
|
|
char c_k_limitName[60+1];
|
|
public:
|
|
//
|
|
// LTA Structure
|
|
struct STR_T_LOV_LIMIT{
|
|
char plantType[8+1];
|
|
char limitName[60+1];
|
|
int CheckType;
|
|
int Factor;
|
|
int LowerLimit;
|
|
int UpperLimit;
|
|
char Enumerate[256+1];
|
|
int WarnLevel;
|
|
char ModDescr[256+1];
|
|
char toc[27];
|
|
char tom[27];
|
|
char mop[121];
|
|
char mou[31];
|
|
}structTable;
|
|
// LTA Structure Zi
|
|
struct STR_T_LOV_LIMITZi{
|
|
short CheckTypeZi;
|
|
short FactorZi;
|
|
short LowerLimitZi;
|
|
short UpperLimitZi;
|
|
short EnumerateZi;
|
|
short WarnLevelZi;
|
|
short ModDescrZi;
|
|
short tocZi;
|
|
short tomZi;
|
|
short mopZi;
|
|
short mouZi;
|
|
}structTableZi;
|
|
//
|
|
//C O N S T R U C T O R S
|
|
//=======================
|
|
//
|
|
public:
|
|
T_LOV_LIMIT();
|
|
//D E S T R U C T O R S
|
|
//=======================
|
|
//
|
|
virtual ~T_LOV_LIMIT();
|
|
//
|
|
//C O P Y - C O N S T R U C T O R
|
|
//=======================
|
|
T_LOV_LIMIT(const T_LOV_LIMIT &inst);
|
|
// For Constructors with parameters the flag dbAccess
|
|
// informs you if the access was successfully or not
|
|
T_LOV_LIMIT( const char* arg1,const char* arg2);
|
|
|
|
//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 , const char* arg2 );
|
|
|
|
|
|
// public methode initInsertKeys
|
|
//
|
|
// this methode stores the unique key attributes
|
|
//
|
|
void initInsertKeys( const 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_LOV_LIMIT operator+(const T_LOV_LIMIT &inst) const;
|
|
|
|
//
|
|
//O P E R A T O R =
|
|
//===================
|
|
//
|
|
public:
|
|
const T_LOV_LIMIT& operator=(const T_LOV_LIMIT &inst);
|
|
char* plantType() const;//{
|
|
//return((char*)c_plantType );
|
|
//}
|
|
|
|
|
|
void set_plantType( const char* arg );//{
|
|
//strncpy((char*)c_plantType , arg , sizeof(c_plantType));
|
|
//c_plantType[sizeof(c_plantType)-1] = '\0';
|
|
//return;
|
|
//}
|
|
|
|
|
|
char* limitName() const;//{
|
|
//return((char*)c_limitName );
|
|
//}
|
|
|
|
|
|
void set_limitName( const char* arg );//{
|
|
//strncpy((char*)c_limitName , arg , sizeof(c_limitName));
|
|
//c_limitName[sizeof(c_limitName)-1] = '\0';
|
|
//return;
|
|
//}
|
|
|
|
|
|
long CheckType() const;//{
|
|
//return((long)l_CheckType );
|
|
//}
|
|
|
|
short CheckTypeZi() const;//{
|
|
//return( s_CheckTypeZi);
|
|
//}
|
|
|
|
void set_CheckType( long arg );//{
|
|
//l_CheckType = arg;
|
|
//s_CheckTypeZi= 0;
|
|
//return;
|
|
//}
|
|
|
|
void set_CheckTypeZi( short arg ) ;//{
|
|
//s_CheckTypeZi = arg;
|
|
//}
|
|
|
|
long Factor() const;//{
|
|
//return((long)l_Factor );
|
|
//}
|
|
|
|
short FactorZi() const;//{
|
|
//return( s_FactorZi);
|
|
//}
|
|
|
|
void set_Factor( long arg );//{
|
|
//l_Factor = arg;
|
|
//s_FactorZi= 0;
|
|
//return;
|
|
//}
|
|
|
|
void set_FactorZi( short arg ) ;//{
|
|
//s_FactorZi = arg;
|
|
//}
|
|
|
|
long LowerLimit() const;//{
|
|
//return((long)l_LowerLimit );
|
|
//}
|
|
|
|
short LowerLimitZi() const;//{
|
|
//return( s_LowerLimitZi);
|
|
//}
|
|
|
|
void set_LowerLimit( long arg );//{
|
|
//l_LowerLimit = arg;
|
|
//s_LowerLimitZi= 0;
|
|
//return;
|
|
//}
|
|
|
|
void set_LowerLimitZi( short arg ) ;//{
|
|
//s_LowerLimitZi = arg;
|
|
//}
|
|
|
|
long UpperLimit() const;//{
|
|
//return((long)l_UpperLimit );
|
|
//}
|
|
|
|
short UpperLimitZi() const;//{
|
|
//return( s_UpperLimitZi);
|
|
//}
|
|
|
|
void set_UpperLimit( long arg );//{
|
|
//l_UpperLimit = arg;
|
|
//s_UpperLimitZi= 0;
|
|
//return;
|
|
//}
|
|
|
|
void set_UpperLimitZi( short arg ) ;//{
|
|
//s_UpperLimitZi = arg;
|
|
//}
|
|
|
|
char* Enumerate() const;//{
|
|
//return((char*)c_Enumerate );
|
|
//}
|
|
|
|
short EnumerateZi() const;//{
|
|
//return( s_EnumerateZi);
|
|
//}
|
|
|
|
void set_Enumerate( const char* arg );//{
|
|
//strncpy((char*)c_Enumerate , arg , sizeof(c_Enumerate));
|
|
//c_Enumerate[sizeof(c_Enumerate)-1] = '\0';
|
|
//s_EnumerateZi= 0;
|
|
//return;
|
|
//}
|
|
|
|
void set_EnumerateZi( short arg ) ;//{
|
|
//s_EnumerateZi = arg;
|
|
//}
|
|
|
|
long WarnLevel() const;//{
|
|
//return((long)l_WarnLevel );
|
|
//}
|
|
|
|
short WarnLevelZi() const;//{
|
|
//return( s_WarnLevelZi);
|
|
//}
|
|
|
|
void set_WarnLevel( long arg );//{
|
|
//l_WarnLevel = arg;
|
|
//s_WarnLevelZi= 0;
|
|
//return;
|
|
//}
|
|
|
|
void set_WarnLevelZi( short arg ) ;//{
|
|
//s_WarnLevelZi = arg;
|
|
//}
|
|
|
|
char* ModDescr() const;//{
|
|
//return((char*)c_ModDescr );
|
|
//}
|
|
|
|
short ModDescrZi() const;//{
|
|
//return( s_ModDescrZi);
|
|
//}
|
|
|
|
void set_ModDescr( const char* arg );//{
|
|
//strncpy((char*)c_ModDescr , arg , sizeof(c_ModDescr));
|
|
//c_ModDescr[sizeof(c_ModDescr)-1] = '\0';
|
|
//s_ModDescrZi= 0;
|
|
//return;
|
|
//}
|
|
|
|
void set_ModDescrZi( short arg ) ;//{
|
|
//s_ModDescrZi = 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
|
|
char* k_plantType();//{
|
|
//return((char*)c_k_plantType );
|
|
//}
|
|
|
|
void set_k_plantType( char* arg );//{
|
|
//strncpy((char*)c_k_plantType , arg , sizeof(c_k_plantType));
|
|
//c_k_plantType[sizeof(c_k_plantType)-1] = '\0';
|
|
//return;
|
|
//}
|
|
|
|
char* k_limitName();//{
|
|
//return((char*)c_k_limitName );
|
|
//}
|
|
|
|
void set_k_limitName( char* arg );//{
|
|
//strncpy((char*)c_k_limitName , arg , sizeof(c_k_limitName));
|
|
//c_k_limitName[sizeof(c_k_limitName)-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_LOV_LIMIT");
|
|
//}
|
|
///////////////////////////////////////////////////
|
|
int getSqlCode();//{
|
|
//return( db.dbSqlCode);
|
|
//}
|
|
///////////////////////////////////////////////////
|
|
int getRowsProcessed();//{
|
|
//return( db.dbRowsProcessed);
|
|
//}
|
|
};
|
|
#endif
|