468 lines
8.4 KiB
C++
468 lines
8.4 KiB
C++
// Version: 2014.7.30 16:47:28
|
|
|
|
#ifndef _T_TRK_DIV_H
|
|
#define _T_TRK_DIV_H
|
|
#include <common/BasicStruct.h>
|
|
|
|
using namespace baosight;
|
|
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
#include <stdlib.h>
|
|
#ifdef _MSC_VER
|
|
#pragma warning(disable:4996)
|
|
#pragma warning(disable:4267)
|
|
#endif
|
|
#include "T_TRK_DIVDBAX.h"
|
|
class T_TRK_DIV{
|
|
friend class T_TRK_DIVDBAX;
|
|
private:
|
|
//aggregation to DB Class
|
|
T_TRK_DIVDBAX 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
|
|
//===================
|
|
//
|
|
long l_oriMuId;
|
|
short s_oriMuIdZi;
|
|
char c_oriMuCreator[2+1];
|
|
short s_oriMuCreatorZi;
|
|
long l_oriMusId;
|
|
short s_oriMusIdZi;
|
|
long l_oriBasId;
|
|
short s_oriBasIdZi;
|
|
char c_oriExtId[20+1];
|
|
short s_oriExtIdZi;
|
|
char c_oriMuTyp[2+1];
|
|
short s_oriMuTypZi;
|
|
long l_muId;
|
|
char c_muCreator[3];
|
|
short s_musId;
|
|
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
|
|
long l_k_muId;
|
|
char c_k_muCreator[3];
|
|
short s_k_musId;
|
|
public:
|
|
//
|
|
// LTA Structure
|
|
struct STR_T_TRK_DIV{
|
|
int oriMuId;
|
|
char oriMuCreator[2+1];
|
|
int oriMusId;
|
|
int oriBasId;
|
|
char oriExtId[20+1];
|
|
char oriMuTyp[2+1];
|
|
int muId;
|
|
char muCreator[3];
|
|
short musId;
|
|
char toc[27];
|
|
char tom[27];
|
|
char mop[121];
|
|
char mou[31];
|
|
}structTable;
|
|
// LTA Structure Zi
|
|
struct STR_T_TRK_DIVZi{
|
|
short oriMuIdZi;
|
|
short oriMuCreatorZi;
|
|
short oriMusIdZi;
|
|
short oriBasIdZi;
|
|
short oriExtIdZi;
|
|
short oriMuTypZi;
|
|
short tocZi;
|
|
short tomZi;
|
|
short mopZi;
|
|
short mouZi;
|
|
}structTableZi;
|
|
//
|
|
//C O N S T R U C T O R S
|
|
//=======================
|
|
//
|
|
public:
|
|
T_TRK_DIV();
|
|
//D E S T R U C T O R S
|
|
//=======================
|
|
//
|
|
virtual ~T_TRK_DIV();
|
|
//
|
|
//C O P Y - C O N S T R U C T O R
|
|
//=======================
|
|
T_TRK_DIV(const T_TRK_DIV &inst);
|
|
// For Constructors with parameters the flag dbAccess
|
|
// informs you if the access was successfully or not
|
|
T_TRK_DIV( MU_CODE muCode );
|
|
|
|
//methods
|
|
public:
|
|
char* getCreationTime() {return "2014.7.30 16:47:28";};
|
|
//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(long arg1 , const char* arg2 , short arg3);
|
|
|
|
void setPrimKey( MU_CODE muCode );
|
|
|
|
// public methode initInsertKeys
|
|
//
|
|
// this methode stores the unique key attributes
|
|
//
|
|
void initInsertKeys( long arg1 , const char* arg2 , short arg3 );
|
|
|
|
void initInsertKeys( MU_CODE muCode );
|
|
|
|
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_TRK_DIV operator+(const T_TRK_DIV &inst) const;
|
|
|
|
//
|
|
//O P E R A T O R =
|
|
//===================
|
|
//
|
|
public:
|
|
const T_TRK_DIV& operator=(const T_TRK_DIV &inst);
|
|
long oriMuId() const;//{
|
|
//return((long)l_oriMuId );
|
|
//}
|
|
|
|
short oriMuIdZi() const;//{
|
|
//return( s_oriMuIdZi);
|
|
//}
|
|
|
|
void set_oriMuId( long arg );//{
|
|
//l_oriMuId = arg;
|
|
//s_oriMuIdZi= 0;
|
|
//return;
|
|
//}
|
|
|
|
void set_oriMuIdZi( short arg ) ;//{
|
|
//s_oriMuIdZi = arg;
|
|
//}
|
|
|
|
char* oriMuCreator() const;//{
|
|
//return((char*)c_oriMuCreator );
|
|
//}
|
|
|
|
short oriMuCreatorZi() const;//{
|
|
//return( s_oriMuCreatorZi);
|
|
//}
|
|
|
|
void set_oriMuCreator( const char* arg );//{
|
|
//strncpy((char*)c_oriMuCreator , arg , sizeof(c_oriMuCreator));
|
|
//c_oriMuCreator[sizeof(c_oriMuCreator)-1] = '\0';
|
|
//s_oriMuCreatorZi= 0;
|
|
//return;
|
|
//}
|
|
|
|
void set_oriMuCreatorZi( short arg ) ;//{
|
|
//s_oriMuCreatorZi = arg;
|
|
//}
|
|
|
|
long oriMusId() const;//{
|
|
//return((long)l_oriMusId );
|
|
//}
|
|
|
|
short oriMusIdZi() const;//{
|
|
//return( s_oriMusIdZi);
|
|
//}
|
|
|
|
void set_oriMusId( long arg );//{
|
|
//l_oriMusId = arg;
|
|
//s_oriMusIdZi= 0;
|
|
//return;
|
|
//}
|
|
|
|
void set_oriMusIdZi( short arg ) ;//{
|
|
//s_oriMusIdZi = arg;
|
|
//}
|
|
|
|
long oriBasId() const;//{
|
|
//return((long)l_oriBasId );
|
|
//}
|
|
|
|
short oriBasIdZi() const;//{
|
|
//return( s_oriBasIdZi);
|
|
//}
|
|
|
|
void set_oriBasId( long arg );//{
|
|
//l_oriBasId = arg;
|
|
//s_oriBasIdZi= 0;
|
|
//return;
|
|
//}
|
|
|
|
void set_oriBasIdZi( short arg ) ;//{
|
|
//s_oriBasIdZi = arg;
|
|
//}
|
|
|
|
char* oriExtId() const;//{
|
|
//return((char*)c_oriExtId );
|
|
//}
|
|
|
|
short oriExtIdZi() const;//{
|
|
//return( s_oriExtIdZi);
|
|
//}
|
|
|
|
void set_oriExtId( const char* arg );//{
|
|
//strncpy((char*)c_oriExtId , arg , sizeof(c_oriExtId));
|
|
//c_oriExtId[sizeof(c_oriExtId)-1] = '\0';
|
|
//s_oriExtIdZi= 0;
|
|
//return;
|
|
//}
|
|
|
|
void set_oriExtIdZi( short arg ) ;//{
|
|
//s_oriExtIdZi = arg;
|
|
//}
|
|
|
|
char* oriMuTyp() const;//{
|
|
//return((char*)c_oriMuTyp );
|
|
//}
|
|
|
|
short oriMuTypZi() const;//{
|
|
//return( s_oriMuTypZi);
|
|
//}
|
|
|
|
void set_oriMuTyp( const char* arg );//{
|
|
//strncpy((char*)c_oriMuTyp , arg , sizeof(c_oriMuTyp));
|
|
//c_oriMuTyp[sizeof(c_oriMuTyp)-1] = '\0';
|
|
//s_oriMuTypZi= 0;
|
|
//return;
|
|
//}
|
|
|
|
void set_oriMuTypZi( short arg ) ;//{
|
|
//s_oriMuTypZi = arg;
|
|
//}
|
|
|
|
long muId() const;//{
|
|
//return((long)l_muId );
|
|
//}
|
|
|
|
void set_muId( long arg );//{
|
|
//l_muId = arg;
|
|
//return;
|
|
//}
|
|
|
|
char* muCreator() const;//{
|
|
//return((char*)c_muCreator );
|
|
//}
|
|
|
|
void set_muCreator( const char* arg );//{
|
|
//strncpy((char*)c_muCreator , arg , sizeof(c_muCreator));
|
|
//c_muCreator[sizeof(c_muCreator)-1] = '\0';
|
|
//return;
|
|
//}
|
|
|
|
short musId() const;//{
|
|
//return((short)s_musId );
|
|
//}
|
|
|
|
void set_musId( short arg );//{
|
|
//s_musId = arg;
|
|
//return;
|
|
//}
|
|
|
|
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
|
|
long k_muId();//{
|
|
//return((long)l_k_muId );
|
|
//}
|
|
|
|
void set_k_muId( long arg );//{
|
|
//l_k_muId = arg;
|
|
//return;
|
|
//}
|
|
|
|
char* k_muCreator();//{
|
|
//return((char*)c_k_muCreator );
|
|
//}
|
|
|
|
void set_k_muCreator( char* arg );//{
|
|
//strncpy((char*)c_k_muCreator , arg , sizeof(c_k_muCreator));
|
|
//c_k_muCreator[sizeof(c_k_muCreator)-1] = '\0';
|
|
//return;
|
|
//}
|
|
|
|
short k_musId();//{
|
|
//return((short)s_k_musId );
|
|
//}
|
|
|
|
void set_k_musId( short arg );//{
|
|
//s_k_musId = 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("T_TRK_DIV");
|
|
//}
|
|
///////////////////////////////////////////////////
|
|
int getSqlCode();//{
|
|
//return( db.dbSqlCode);
|
|
//}
|
|
///////////////////////////////////////////////////
|
|
int getRowsProcessed();//{
|
|
//return( db.dbRowsProcessed);
|
|
//}
|
|
};
|
|
#endif
|