468 lines
8.3 KiB
C
468 lines
8.3 KiB
C
|
|
// Version: 2019.4.4 10:22:45
|
||
|
|
|
||
|
|
#ifndef _T_LOV_RADAR_H
|
||
|
|
#define _T_LOV_RADAR_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_RADARDBAX.h"
|
||
|
|
class T_LOV_RADAR{
|
||
|
|
friend class T_LOV_RADARDBAX;
|
||
|
|
private:
|
||
|
|
//aggregation to DB Class
|
||
|
|
T_LOV_RADARDBAX 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_polar[50+1];
|
||
|
|
long l_seq;
|
||
|
|
char c_polarName[50+1];
|
||
|
|
short s_polarNameZi;
|
||
|
|
char c_type[50+1];
|
||
|
|
short s_typeZi;
|
||
|
|
char c_zone[50+1];
|
||
|
|
short s_zoneZi;
|
||
|
|
char c_zoneItem[50+1];
|
||
|
|
short s_zoneItemZi;
|
||
|
|
long l_limitMax;
|
||
|
|
short s_limitMaxZi;
|
||
|
|
long l_limitMin;
|
||
|
|
short s_limitMinZi;
|
||
|
|
long l_weightFactor;
|
||
|
|
short s_weightFactorZi;
|
||
|
|
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_polar[50+1];
|
||
|
|
long l_k_seq;
|
||
|
|
public:
|
||
|
|
//
|
||
|
|
// LTA Structure
|
||
|
|
struct STR_T_LOV_RADAR{
|
||
|
|
char polar[50+1];
|
||
|
|
int seq;
|
||
|
|
char polarName[50+1];
|
||
|
|
char type[50+1];
|
||
|
|
char zone[50+1];
|
||
|
|
char zoneItem[50+1];
|
||
|
|
int limitMax;
|
||
|
|
int limitMin;
|
||
|
|
int weightFactor;
|
||
|
|
char toc[27];
|
||
|
|
char tom[27];
|
||
|
|
char mop[121];
|
||
|
|
char mou[31];
|
||
|
|
}structTable;
|
||
|
|
// LTA Structure Zi
|
||
|
|
struct STR_T_LOV_RADARZi{
|
||
|
|
short polarNameZi;
|
||
|
|
short typeZi;
|
||
|
|
short zoneZi;
|
||
|
|
short zoneItemZi;
|
||
|
|
short limitMaxZi;
|
||
|
|
short limitMinZi;
|
||
|
|
short weightFactorZi;
|
||
|
|
short tocZi;
|
||
|
|
short tomZi;
|
||
|
|
short mopZi;
|
||
|
|
short mouZi;
|
||
|
|
}structTableZi;
|
||
|
|
//
|
||
|
|
//C O N S T R U C T O R S
|
||
|
|
//=======================
|
||
|
|
//
|
||
|
|
public:
|
||
|
|
T_LOV_RADAR();
|
||
|
|
//D E S T R U C T O R S
|
||
|
|
//=======================
|
||
|
|
//
|
||
|
|
virtual ~T_LOV_RADAR();
|
||
|
|
//
|
||
|
|
//C O P Y - C O N S T R U C T O R
|
||
|
|
//=======================
|
||
|
|
T_LOV_RADAR(const T_LOV_RADAR &inst);
|
||
|
|
// For Constructors with parameters the flag dbAccess
|
||
|
|
// informs you if the access was successfully or not
|
||
|
|
T_LOV_RADAR( const char* arg1,long 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 , long arg2 );
|
||
|
|
|
||
|
|
|
||
|
|
// public methode initInsertKeys
|
||
|
|
//
|
||
|
|
// this methode stores the unique key attributes
|
||
|
|
//
|
||
|
|
void initInsertKeys( const char* arg1 , long 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_RADAR operator+(const T_LOV_RADAR &inst) const;
|
||
|
|
|
||
|
|
//
|
||
|
|
//O P E R A T O R =
|
||
|
|
//===================
|
||
|
|
//
|
||
|
|
public:
|
||
|
|
const T_LOV_RADAR& operator=(const T_LOV_RADAR &inst);
|
||
|
|
char* polar() const;//{
|
||
|
|
//return((char*)c_polar );
|
||
|
|
//}
|
||
|
|
|
||
|
|
|
||
|
|
void set_polar( const char* arg );//{
|
||
|
|
//strncpy((char*)c_polar , arg , sizeof(c_polar));
|
||
|
|
//c_polar[sizeof(c_polar)-1] = '\0';
|
||
|
|
//return;
|
||
|
|
//}
|
||
|
|
|
||
|
|
|
||
|
|
long seq() const;//{
|
||
|
|
//return((long)l_seq );
|
||
|
|
//}
|
||
|
|
|
||
|
|
|
||
|
|
void set_seq( long arg );//{
|
||
|
|
//l_seq = arg;
|
||
|
|
//return;
|
||
|
|
//}
|
||
|
|
|
||
|
|
|
||
|
|
char* polarName() const;//{
|
||
|
|
//return((char*)c_polarName );
|
||
|
|
//}
|
||
|
|
|
||
|
|
short polarNameZi() const;//{
|
||
|
|
//return( s_polarNameZi);
|
||
|
|
//}
|
||
|
|
|
||
|
|
void set_polarName( const char* arg );//{
|
||
|
|
//strncpy((char*)c_polarName , arg , sizeof(c_polarName));
|
||
|
|
//c_polarName[sizeof(c_polarName)-1] = '\0';
|
||
|
|
//s_polarNameZi= 0;
|
||
|
|
//return;
|
||
|
|
//}
|
||
|
|
|
||
|
|
void set_polarNameZi( short arg ) ;//{
|
||
|
|
//s_polarNameZi = arg;
|
||
|
|
//}
|
||
|
|
|
||
|
|
char* type() const;//{
|
||
|
|
//return((char*)c_type );
|
||
|
|
//}
|
||
|
|
|
||
|
|
short typeZi() const;//{
|
||
|
|
//return( s_typeZi);
|
||
|
|
//}
|
||
|
|
|
||
|
|
void set_type( const char* arg );//{
|
||
|
|
//strncpy((char*)c_type , arg , sizeof(c_type));
|
||
|
|
//c_type[sizeof(c_type)-1] = '\0';
|
||
|
|
//s_typeZi= 0;
|
||
|
|
//return;
|
||
|
|
//}
|
||
|
|
|
||
|
|
void set_typeZi( short arg ) ;//{
|
||
|
|
//s_typeZi = arg;
|
||
|
|
//}
|
||
|
|
|
||
|
|
char* zone() const;//{
|
||
|
|
//return((char*)c_zone );
|
||
|
|
//}
|
||
|
|
|
||
|
|
short zoneZi() const;//{
|
||
|
|
//return( s_zoneZi);
|
||
|
|
//}
|
||
|
|
|
||
|
|
void set_zone( const char* arg );//{
|
||
|
|
//strncpy((char*)c_zone , arg , sizeof(c_zone));
|
||
|
|
//c_zone[sizeof(c_zone)-1] = '\0';
|
||
|
|
//s_zoneZi= 0;
|
||
|
|
//return;
|
||
|
|
//}
|
||
|
|
|
||
|
|
void set_zoneZi( short arg ) ;//{
|
||
|
|
//s_zoneZi = arg;
|
||
|
|
//}
|
||
|
|
|
||
|
|
char* zoneItem() const;//{
|
||
|
|
//return((char*)c_zoneItem );
|
||
|
|
//}
|
||
|
|
|
||
|
|
short zoneItemZi() const;//{
|
||
|
|
//return( s_zoneItemZi);
|
||
|
|
//}
|
||
|
|
|
||
|
|
void set_zoneItem( const char* arg );//{
|
||
|
|
//strncpy((char*)c_zoneItem , arg , sizeof(c_zoneItem));
|
||
|
|
//c_zoneItem[sizeof(c_zoneItem)-1] = '\0';
|
||
|
|
//s_zoneItemZi= 0;
|
||
|
|
//return;
|
||
|
|
//}
|
||
|
|
|
||
|
|
void set_zoneItemZi( short arg ) ;//{
|
||
|
|
//s_zoneItemZi = arg;
|
||
|
|
//}
|
||
|
|
|
||
|
|
long limitMax() const;//{
|
||
|
|
//return((long)l_limitMax );
|
||
|
|
//}
|
||
|
|
|
||
|
|
short limitMaxZi() const;//{
|
||
|
|
//return( s_limitMaxZi);
|
||
|
|
//}
|
||
|
|
|
||
|
|
void set_limitMax( long arg );//{
|
||
|
|
//l_limitMax = arg;
|
||
|
|
//s_limitMaxZi= 0;
|
||
|
|
//return;
|
||
|
|
//}
|
||
|
|
|
||
|
|
void set_limitMaxZi( short arg ) ;//{
|
||
|
|
//s_limitMaxZi = arg;
|
||
|
|
//}
|
||
|
|
|
||
|
|
long limitMin() const;//{
|
||
|
|
//return((long)l_limitMin );
|
||
|
|
//}
|
||
|
|
|
||
|
|
short limitMinZi() const;//{
|
||
|
|
//return( s_limitMinZi);
|
||
|
|
//}
|
||
|
|
|
||
|
|
void set_limitMin( long arg );//{
|
||
|
|
//l_limitMin = arg;
|
||
|
|
//s_limitMinZi= 0;
|
||
|
|
//return;
|
||
|
|
//}
|
||
|
|
|
||
|
|
void set_limitMinZi( short arg ) ;//{
|
||
|
|
//s_limitMinZi = arg;
|
||
|
|
//}
|
||
|
|
|
||
|
|
long weightFactor() const;//{
|
||
|
|
//return((long)l_weightFactor );
|
||
|
|
//}
|
||
|
|
|
||
|
|
short weightFactorZi() const;//{
|
||
|
|
//return( s_weightFactorZi);
|
||
|
|
//}
|
||
|
|
|
||
|
|
void set_weightFactor( long arg );//{
|
||
|
|
//l_weightFactor = arg;
|
||
|
|
//s_weightFactorZi= 0;
|
||
|
|
//return;
|
||
|
|
//}
|
||
|
|
|
||
|
|
void set_weightFactorZi( short arg ) ;//{
|
||
|
|
//s_weightFactorZi = 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_polar();//{
|
||
|
|
//return((char*)c_k_polar );
|
||
|
|
//}
|
||
|
|
|
||
|
|
void set_k_polar( char* arg );//{
|
||
|
|
//strncpy((char*)c_k_polar , arg , sizeof(c_k_polar));
|
||
|
|
//c_k_polar[sizeof(c_k_polar)-1] = '\0';
|
||
|
|
//return;
|
||
|
|
//}
|
||
|
|
|
||
|
|
long k_seq();//{
|
||
|
|
//return((long)l_k_seq );
|
||
|
|
//}
|
||
|
|
|
||
|
|
void set_k_seq( long arg );//{
|
||
|
|
//l_k_seq = arg;
|
||
|
|
//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_RADAR");
|
||
|
|
//}
|
||
|
|
///////////////////////////////////////////////////
|
||
|
|
int getSqlCode();//{
|
||
|
|
//return( db.dbSqlCode);
|
||
|
|
//}
|
||
|
|
///////////////////////////////////////////////////
|
||
|
|
int getRowsProcessed();//{
|
||
|
|
//return( db.dbRowsProcessed);
|
||
|
|
//}
|
||
|
|
};
|
||
|
|
#endif
|