555 lines
14 KiB
C++
555 lines
14 KiB
C++
|
|
// Version: 2020.12.30 14:56:12
|
||
|
|
|
||
|
|
// File: T_RULE_CFG.cpp
|
||
|
|
|
||
|
|
#include "T_RULE_CFG.h"
|
||
|
|
|
||
|
|
T_RULE_CFG::T_RULE_CFG(){
|
||
|
|
// initialise all membervariables
|
||
|
|
initial();
|
||
|
|
}
|
||
|
|
T_RULE_CFG::~T_RULE_CFG(){
|
||
|
|
}
|
||
|
|
void T_RULE_CFG::initial(){
|
||
|
|
// initialise all membervariables
|
||
|
|
set_RuleId((char*)"");
|
||
|
|
set_RuleGroup((char*)"");
|
||
|
|
set_AlgId(0);
|
||
|
|
set_Flag(0);
|
||
|
|
set_FlagZi(-1);
|
||
|
|
set_RuleName((char*)"");
|
||
|
|
set_RuleNameZi(-1);
|
||
|
|
set_RuleParam((char*)"");
|
||
|
|
set_RuleParamZi(-1);
|
||
|
|
set_EqpId((char*)"");
|
||
|
|
set_EqpIdZi(-1);
|
||
|
|
set_toc((char*)"");
|
||
|
|
set_tocZi(-1);
|
||
|
|
set_toc((char*)"");
|
||
|
|
set_tomZi(-1);
|
||
|
|
set_mop((char*)"");
|
||
|
|
set_mopZi(-1);
|
||
|
|
set_mou((char*)"");
|
||
|
|
set_mouZi(-1);
|
||
|
|
// initialies Primary key members
|
||
|
|
set_k_RuleId((char*)"");
|
||
|
|
set_k_RuleGroup((char*)"");
|
||
|
|
set_k_AlgId(0);
|
||
|
|
}
|
||
|
|
T_RULE_CFG::T_RULE_CFG(const char* arg1,const char* arg2,long arg3)
|
||
|
|
{
|
||
|
|
initial();
|
||
|
|
setPrimKey (arg1, arg2, arg3);
|
||
|
|
//read DB record
|
||
|
|
dbAccess = true;
|
||
|
|
dbMessage = readDB();
|
||
|
|
if ( dbMessage != NULL ) {dbAccess = false;}
|
||
|
|
}
|
||
|
|
|
||
|
|
char* T_RULE_CFG:: execute(const char* sql , long* count){
|
||
|
|
return( db.execute( sql , count ) );
|
||
|
|
}
|
||
|
|
|
||
|
|
char* T_RULE_CFG:: dbCommit(){
|
||
|
|
return( db.dbCommit( ) );
|
||
|
|
}
|
||
|
|
|
||
|
|
char* T_RULE_CFG:: dbRollback(){
|
||
|
|
return( db.dbRollback( ) );
|
||
|
|
}
|
||
|
|
|
||
|
|
char* T_RULE_CFG::readDB(){
|
||
|
|
// DB Trace is off
|
||
|
|
return( db.readDB(*this) );
|
||
|
|
}
|
||
|
|
|
||
|
|
char* T_RULE_CFG::updateDB(){
|
||
|
|
// DB Trace is off
|
||
|
|
return( db.updateDB(*this) );
|
||
|
|
}
|
||
|
|
|
||
|
|
char* T_RULE_CFG::insertDB(){
|
||
|
|
// DB Trace is off
|
||
|
|
return( db.insertDB(*this) );
|
||
|
|
}
|
||
|
|
|
||
|
|
char* T_RULE_CFG::deleteDB(){
|
||
|
|
// DB Trace is off
|
||
|
|
return( db.deleteDB(*this) );
|
||
|
|
}
|
||
|
|
|
||
|
|
char* T_RULE_CFG::deleteDB(const char * where, long* count){
|
||
|
|
// DB Trace is off
|
||
|
|
return( db.deleteDB( where , count ) );
|
||
|
|
}
|
||
|
|
|
||
|
|
char* T_RULE_CFG::openSetDB(const char * where,const char* order){
|
||
|
|
// DB Trace is off
|
||
|
|
return( db.openSetDB( where , order ) );
|
||
|
|
}
|
||
|
|
|
||
|
|
char* T_RULE_CFG::countDB(const char * where, long* count){
|
||
|
|
// DB Trace is off
|
||
|
|
return( db.countDB( where , count ) );
|
||
|
|
}
|
||
|
|
|
||
|
|
char* T_RULE_CFG::getSetDB(){
|
||
|
|
// DB Trace is off
|
||
|
|
return( db.getSetDB(*this) );
|
||
|
|
}
|
||
|
|
|
||
|
|
char* T_RULE_CFG::closeSetDB(){
|
||
|
|
// DB Trace is off
|
||
|
|
return( db.closeSetDB() );
|
||
|
|
}
|
||
|
|
|
||
|
|
char* T_RULE_CFG::storeDB(){
|
||
|
|
char* ret = NULL;
|
||
|
|
setKeysFromRecord();
|
||
|
|
ret=db.updateDB(*this);
|
||
|
|
if(ret != NULL){
|
||
|
|
ret=db.insertDB(*this);
|
||
|
|
if(ret != NULL){
|
||
|
|
dbAccess = false;
|
||
|
|
return(ret);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
return(ret);
|
||
|
|
}
|
||
|
|
|
||
|
|
// public methode setPrimKey T_RULE_CFG
|
||
|
|
//
|
||
|
|
// this methode stores the unique key attributes
|
||
|
|
//
|
||
|
|
void T_RULE_CFG::setPrimKey( const char* arg1 , const char* arg2 , long arg3 ){
|
||
|
|
strncpy( (char*)c_k_RuleId , arg1 , sizeof(c_k_RuleId) );
|
||
|
|
c_k_RuleId[sizeof(c_k_RuleId)-1] = '\0';
|
||
|
|
strncpy( (char*)c_k_RuleGroup , arg2 , sizeof(c_k_RuleGroup) );
|
||
|
|
c_k_RuleGroup[sizeof(c_k_RuleGroup)-1] = '\0';
|
||
|
|
l_k_AlgId = arg3;
|
||
|
|
} // end of methode
|
||
|
|
|
||
|
|
void T_RULE_CFG::initInsertKeys( const char* arg1 , const char* arg2 , long arg3 ){
|
||
|
|
setPrimKey ( arg1 , arg2 , arg3);
|
||
|
|
strncpy( (char*)c_RuleId , arg1 , sizeof(c_RuleId) );
|
||
|
|
c_RuleId[sizeof(c_RuleId)-1] = '\0';
|
||
|
|
strncpy( (char*)c_RuleGroup , arg2 , sizeof(c_RuleGroup) );
|
||
|
|
c_RuleGroup[sizeof(c_RuleGroup)-1] = '\0';
|
||
|
|
l_AlgId = arg3;
|
||
|
|
} // end of methode
|
||
|
|
void T_RULE_CFG::setKeysFromRecord(){
|
||
|
|
set_k_RuleId( RuleId() );
|
||
|
|
set_k_RuleGroup( RuleGroup() );
|
||
|
|
set_k_AlgId( AlgId() );
|
||
|
|
} // end of methode
|
||
|
|
//
|
||
|
|
//O P E R A T O R +
|
||
|
|
//===================
|
||
|
|
//
|
||
|
|
T_RULE_CFG T_RULE_CFG::operator+(const T_RULE_CFG &inst) const{
|
||
|
|
T_RULE_CFG ptrT_RULE_CFG(*this);
|
||
|
|
//----------------------------------------------------------
|
||
|
|
ptrT_RULE_CFG.set_RuleId(inst.RuleId());
|
||
|
|
//----------------------------------------------------------
|
||
|
|
ptrT_RULE_CFG.set_RuleGroup(inst.RuleGroup());
|
||
|
|
//----------------------------------------------------------
|
||
|
|
ptrT_RULE_CFG.set_AlgId(inst.AlgId());
|
||
|
|
//----------------------------------------------------------
|
||
|
|
if(inst.FlagZi() != -1){
|
||
|
|
ptrT_RULE_CFG.set_Flag(inst.Flag());
|
||
|
|
ptrT_RULE_CFG.set_FlagZi(inst.FlagZi());
|
||
|
|
}
|
||
|
|
//----------------------------------------------------------
|
||
|
|
if(inst.RuleNameZi() != -1){
|
||
|
|
ptrT_RULE_CFG.set_RuleName(inst.RuleName());
|
||
|
|
ptrT_RULE_CFG.set_RuleNameZi(inst.RuleNameZi());
|
||
|
|
}
|
||
|
|
//----------------------------------------------------------
|
||
|
|
if(inst.RuleParamZi() != -1){
|
||
|
|
ptrT_RULE_CFG.set_RuleParam(inst.RuleParam());
|
||
|
|
ptrT_RULE_CFG.set_RuleParamZi(inst.RuleParamZi());
|
||
|
|
}
|
||
|
|
//----------------------------------------------------------
|
||
|
|
if(inst.EqpIdZi() != -1){
|
||
|
|
ptrT_RULE_CFG.set_EqpId(inst.EqpId());
|
||
|
|
ptrT_RULE_CFG.set_EqpIdZi(inst.EqpIdZi());
|
||
|
|
}
|
||
|
|
//----------------------------------------------------------
|
||
|
|
if(inst.tocZi() != -1){
|
||
|
|
ptrT_RULE_CFG.set_toc(inst.toc());
|
||
|
|
ptrT_RULE_CFG.set_tocZi(inst.tocZi());
|
||
|
|
}
|
||
|
|
//----------------------------------------------------------
|
||
|
|
if(inst.tomZi() != -1){
|
||
|
|
ptrT_RULE_CFG.set_tom(inst.tom());
|
||
|
|
ptrT_RULE_CFG.set_tomZi(inst.tomZi());
|
||
|
|
}
|
||
|
|
//----------------------------------------------------------
|
||
|
|
if(inst.mopZi() != -1){
|
||
|
|
ptrT_RULE_CFG.set_mop(inst.mop());
|
||
|
|
ptrT_RULE_CFG.set_mopZi(inst.mopZi());
|
||
|
|
}
|
||
|
|
//----------------------------------------------------------
|
||
|
|
if(inst.mouZi() != -1){
|
||
|
|
ptrT_RULE_CFG.set_mou(inst.mou());
|
||
|
|
ptrT_RULE_CFG.set_mouZi(inst.mouZi());
|
||
|
|
}
|
||
|
|
return (ptrT_RULE_CFG);
|
||
|
|
}
|
||
|
|
|
||
|
|
//
|
||
|
|
//O P E R A T O R =
|
||
|
|
//===================
|
||
|
|
//
|
||
|
|
const T_RULE_CFG& T_RULE_CFG::operator=(const T_RULE_CFG &inst){
|
||
|
|
//----------------------------------------------------------
|
||
|
|
this->set_RuleId(inst.RuleId());
|
||
|
|
//----------------------------------------------------------
|
||
|
|
this->set_RuleGroup(inst.RuleGroup());
|
||
|
|
//----------------------------------------------------------
|
||
|
|
this->set_AlgId(inst.AlgId());
|
||
|
|
//----------------------------------------------------------
|
||
|
|
this->set_Flag(inst.Flag());
|
||
|
|
this->set_FlagZi(inst.FlagZi());
|
||
|
|
//----------------------------------------------------------
|
||
|
|
this->set_RuleName(inst.RuleName());
|
||
|
|
this->set_RuleNameZi(inst.RuleNameZi());
|
||
|
|
//----------------------------------------------------------
|
||
|
|
this->set_RuleParam(inst.RuleParam());
|
||
|
|
this->set_RuleParamZi(inst.RuleParamZi());
|
||
|
|
//----------------------------------------------------------
|
||
|
|
this->set_EqpId(inst.EqpId());
|
||
|
|
this->set_EqpIdZi(inst.EqpIdZi());
|
||
|
|
//----------------------------------------------------------
|
||
|
|
this->set_toc(inst.toc());
|
||
|
|
this->set_tocZi(inst.tocZi());
|
||
|
|
//----------------------------------------------------------
|
||
|
|
this->set_tom(inst.tom());
|
||
|
|
this->set_tomZi(inst.tomZi());
|
||
|
|
//----------------------------------------------------------
|
||
|
|
this->set_mop(inst.mop());
|
||
|
|
this->set_mopZi(inst.mopZi());
|
||
|
|
//----------------------------------------------------------
|
||
|
|
this->set_mou(inst.mou());
|
||
|
|
this->set_mouZi(inst.mouZi());
|
||
|
|
return (*this);
|
||
|
|
}
|
||
|
|
//
|
||
|
|
//C O P Y - C O N S T R U C T O R
|
||
|
|
//===================
|
||
|
|
//
|
||
|
|
T_RULE_CFG::T_RULE_CFG(const T_RULE_CFG &inst){
|
||
|
|
//----------------------------------------------------------
|
||
|
|
this->set_RuleId(inst.RuleId());
|
||
|
|
//----------------------------------------------------------
|
||
|
|
this->set_RuleGroup(inst.RuleGroup());
|
||
|
|
//----------------------------------------------------------
|
||
|
|
this->set_AlgId(inst.AlgId());
|
||
|
|
//----------------------------------------------------------
|
||
|
|
this->set_Flag(inst.Flag());
|
||
|
|
this->set_FlagZi(inst.FlagZi());
|
||
|
|
//----------------------------------------------------------
|
||
|
|
this->set_RuleName(inst.RuleName());
|
||
|
|
this->set_RuleNameZi(inst.RuleNameZi());
|
||
|
|
//----------------------------------------------------------
|
||
|
|
this->set_RuleParam(inst.RuleParam());
|
||
|
|
this->set_RuleParamZi(inst.RuleParamZi());
|
||
|
|
//----------------------------------------------------------
|
||
|
|
this->set_EqpId(inst.EqpId());
|
||
|
|
this->set_EqpIdZi(inst.EqpIdZi());
|
||
|
|
//----------------------------------------------------------
|
||
|
|
this->set_toc(inst.toc());
|
||
|
|
this->set_tocZi(inst.tocZi());
|
||
|
|
//----------------------------------------------------------
|
||
|
|
this->set_tom(inst.tom());
|
||
|
|
this->set_tomZi(inst.tomZi());
|
||
|
|
//----------------------------------------------------------
|
||
|
|
this->set_mop(inst.mop());
|
||
|
|
this->set_mopZi(inst.mopZi());
|
||
|
|
//----------------------------------------------------------
|
||
|
|
this->set_mou(inst.mou());
|
||
|
|
this->set_mouZi(inst.mouZi());
|
||
|
|
}
|
||
|
|
char* T_RULE_CFG::RuleId() const{
|
||
|
|
return((char*)c_RuleId );
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
void T_RULE_CFG::set_RuleId( const char* arg ){
|
||
|
|
strncpy((char*)c_RuleId , arg , sizeof(c_RuleId));
|
||
|
|
c_RuleId[sizeof(c_RuleId)-1] = '\0';
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
char* T_RULE_CFG::RuleGroup() const{
|
||
|
|
return((char*)c_RuleGroup );
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
void T_RULE_CFG::set_RuleGroup( const char* arg ){
|
||
|
|
strncpy((char*)c_RuleGroup , arg , sizeof(c_RuleGroup));
|
||
|
|
c_RuleGroup[sizeof(c_RuleGroup)-1] = '\0';
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
long T_RULE_CFG::AlgId() const{
|
||
|
|
return((long)l_AlgId );
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
void T_RULE_CFG::set_AlgId( long arg ){
|
||
|
|
l_AlgId = arg;
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
short T_RULE_CFG::Flag() const{
|
||
|
|
return((short)s_Flag );
|
||
|
|
}
|
||
|
|
|
||
|
|
short T_RULE_CFG::FlagZi() const{
|
||
|
|
return( s_FlagZi);
|
||
|
|
}
|
||
|
|
|
||
|
|
void T_RULE_CFG::set_Flag( short arg ){
|
||
|
|
s_Flag = arg;
|
||
|
|
s_FlagZi= 0;
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
|
||
|
|
void T_RULE_CFG::set_FlagZi( short arg ) {
|
||
|
|
s_FlagZi = arg;
|
||
|
|
}
|
||
|
|
|
||
|
|
char* T_RULE_CFG::RuleName() const{
|
||
|
|
return((char*)c_RuleName );
|
||
|
|
}
|
||
|
|
|
||
|
|
short T_RULE_CFG::RuleNameZi() const{
|
||
|
|
return( s_RuleNameZi);
|
||
|
|
}
|
||
|
|
|
||
|
|
void T_RULE_CFG::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 T_RULE_CFG::set_RuleNameZi( short arg ) {
|
||
|
|
s_RuleNameZi = arg;
|
||
|
|
}
|
||
|
|
|
||
|
|
char* T_RULE_CFG::RuleParam() const{
|
||
|
|
return((char*)c_RuleParam );
|
||
|
|
}
|
||
|
|
|
||
|
|
short T_RULE_CFG::RuleParamZi() const{
|
||
|
|
return( s_RuleParamZi);
|
||
|
|
}
|
||
|
|
|
||
|
|
void T_RULE_CFG::set_RuleParam( const char* arg ){
|
||
|
|
strncpy((char*)c_RuleParam , arg , sizeof(c_RuleParam));
|
||
|
|
c_RuleParam[sizeof(c_RuleParam)-1] = '\0';
|
||
|
|
s_RuleParamZi= 0;
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
|
||
|
|
void T_RULE_CFG::set_RuleParamZi( short arg ) {
|
||
|
|
s_RuleParamZi = arg;
|
||
|
|
}
|
||
|
|
|
||
|
|
char* T_RULE_CFG::EqpId() const{
|
||
|
|
return((char*)c_EqpId );
|
||
|
|
}
|
||
|
|
|
||
|
|
short T_RULE_CFG::EqpIdZi() const{
|
||
|
|
return( s_EqpIdZi);
|
||
|
|
}
|
||
|
|
|
||
|
|
void T_RULE_CFG::set_EqpId( const char* arg ){
|
||
|
|
strncpy((char*)c_EqpId , arg , sizeof(c_EqpId));
|
||
|
|
c_EqpId[sizeof(c_EqpId)-1] = '\0';
|
||
|
|
s_EqpIdZi= 0;
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
|
||
|
|
void T_RULE_CFG::set_EqpIdZi( short arg ) {
|
||
|
|
s_EqpIdZi = arg;
|
||
|
|
}
|
||
|
|
|
||
|
|
char* T_RULE_CFG::toc() const{
|
||
|
|
return((char*)c_toc );
|
||
|
|
}
|
||
|
|
|
||
|
|
short T_RULE_CFG::tocZi() const{
|
||
|
|
return( s_tocZi);
|
||
|
|
}
|
||
|
|
|
||
|
|
void T_RULE_CFG::set_toc( char* arg ){
|
||
|
|
strncpy((char*)c_toc , arg , sizeof(c_toc));
|
||
|
|
c_toc[sizeof(c_toc)-1] = '\0';
|
||
|
|
s_tocZi= 0;
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
|
||
|
|
void T_RULE_CFG::set_tocZi( short arg ){
|
||
|
|
s_tocZi = arg;
|
||
|
|
}
|
||
|
|
|
||
|
|
char* T_RULE_CFG::tom() const{
|
||
|
|
return((char*)c_tom );
|
||
|
|
}
|
||
|
|
|
||
|
|
short T_RULE_CFG::tomZi() const{
|
||
|
|
return( s_tomZi);
|
||
|
|
}
|
||
|
|
|
||
|
|
void T_RULE_CFG::set_tom( char* arg ){
|
||
|
|
strncpy((char*)c_tom , arg , sizeof(c_tom));
|
||
|
|
c_tom[sizeof(c_tom)-1] = '\0';
|
||
|
|
s_tomZi= 0;
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
|
||
|
|
void T_RULE_CFG::set_tomZi( short arg ){
|
||
|
|
s_tomZi = arg;
|
||
|
|
}
|
||
|
|
|
||
|
|
char* T_RULE_CFG::mop() const{
|
||
|
|
return((char*)c_mop );
|
||
|
|
}
|
||
|
|
|
||
|
|
short T_RULE_CFG::mopZi() const{
|
||
|
|
return( s_mopZi);
|
||
|
|
}
|
||
|
|
|
||
|
|
void T_RULE_CFG::set_mop( char* arg ){
|
||
|
|
strncpy((char*)c_mop , arg , sizeof(c_mop));
|
||
|
|
c_mop[sizeof(c_mop)-1] = '\0';
|
||
|
|
s_mopZi= 0;
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
|
||
|
|
void T_RULE_CFG::set_mopZi( short arg ){
|
||
|
|
s_mopZi = arg;
|
||
|
|
}
|
||
|
|
|
||
|
|
char* T_RULE_CFG::mou() const{
|
||
|
|
return((char*)c_mou );
|
||
|
|
}
|
||
|
|
|
||
|
|
short T_RULE_CFG::mouZi() const{
|
||
|
|
return( s_mouZi);
|
||
|
|
}
|
||
|
|
|
||
|
|
void T_RULE_CFG::set_mou( char* arg ){
|
||
|
|
strncpy((char*)c_mou , arg , sizeof(c_mou));
|
||
|
|
c_mou[sizeof(c_mou)-1] = '\0';
|
||
|
|
s_mouZi= 0;
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
|
||
|
|
void T_RULE_CFG::set_mouZi( short arg ){
|
||
|
|
s_mouZi = arg;
|
||
|
|
}
|
||
|
|
|
||
|
|
// methodes for Primary key
|
||
|
|
char* T_RULE_CFG::k_RuleId(){
|
||
|
|
return((char*)c_k_RuleId );
|
||
|
|
}
|
||
|
|
|
||
|
|
void T_RULE_CFG::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* T_RULE_CFG::k_RuleGroup(){
|
||
|
|
return((char*)c_k_RuleGroup );
|
||
|
|
}
|
||
|
|
|
||
|
|
void T_RULE_CFG::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;
|
||
|
|
}
|
||
|
|
|
||
|
|
long T_RULE_CFG::k_AlgId(){
|
||
|
|
return((long)l_k_AlgId );
|
||
|
|
}
|
||
|
|
|
||
|
|
void T_RULE_CFG::set_k_AlgId( long arg ){
|
||
|
|
l_k_AlgId = arg;
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
|
||
|
|
//
|
||
|
|
// public methode fillStructure
|
||
|
|
//
|
||
|
|
// this methode filles the classstructue with the private attributes
|
||
|
|
//
|
||
|
|
void T_RULE_CFG::fillStructure(){
|
||
|
|
strncpy ( structTable.RuleId , RuleId(),sizeof(structTable.RuleId));
|
||
|
|
strncpy ( structTable.RuleGroup , RuleGroup(),sizeof(structTable.RuleGroup));
|
||
|
|
structTable.AlgId = AlgId();
|
||
|
|
structTable.Flag = Flag();
|
||
|
|
strncpy ( structTable.RuleName , RuleName(),sizeof(structTable.RuleName));
|
||
|
|
strncpy ( structTable.RuleParam , RuleParam(),sizeof(structTable.RuleParam));
|
||
|
|
strncpy ( structTable.EqpId , EqpId(),sizeof(structTable.EqpId));
|
||
|
|
strncpy ( structTable.toc , toc(),sizeof(structTable.toc));
|
||
|
|
strncpy ( structTable.tom , tom(),sizeof(structTable.tom));
|
||
|
|
strncpy ( structTable.mop , mop(),sizeof(structTable.mop));
|
||
|
|
strncpy ( structTable.mou , mou(),sizeof(structTable.mou));
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
///////////////////////////////////////////////////
|
||
|
|
void T_RULE_CFG::fillStructureZi(){
|
||
|
|
structTableZi.FlagZi = FlagZi();
|
||
|
|
structTableZi.RuleNameZi = RuleNameZi();
|
||
|
|
structTableZi.RuleParamZi = RuleParamZi();
|
||
|
|
structTableZi.EqpIdZi = EqpIdZi();
|
||
|
|
structTableZi.tocZi = tocZi();
|
||
|
|
structTableZi.tomZi = tomZi();
|
||
|
|
structTableZi.mopZi = mopZi();
|
||
|
|
structTableZi.mouZi = mouZi();
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
///////////////////////////////////////////////////
|
||
|
|
void T_RULE_CFG::setStructure() {
|
||
|
|
set_Flag( structTable.Flag);
|
||
|
|
set_RuleName( structTable.RuleName);
|
||
|
|
set_RuleParam( structTable.RuleParam);
|
||
|
|
set_EqpId( structTable.EqpId);
|
||
|
|
set_toc(structTable.toc);
|
||
|
|
set_tom(structTable.tom);
|
||
|
|
set_mop(structTable.mop);
|
||
|
|
set_mou(structTable.mou);
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
///////////////////////////////////////////////////
|
||
|
|
void T_RULE_CFG::setStructureZi() {
|
||
|
|
set_FlagZi( structTableZi.FlagZi);
|
||
|
|
set_RuleNameZi( structTableZi.RuleNameZi);
|
||
|
|
set_RuleParamZi( structTableZi.RuleParamZi);
|
||
|
|
set_EqpIdZi( structTableZi.EqpIdZi);
|
||
|
|
set_tocZi(structTableZi.tocZi);
|
||
|
|
set_tomZi(structTableZi.tomZi);
|
||
|
|
set_mopZi(structTableZi.mopZi);
|
||
|
|
set_mouZi(structTableZi.mouZi);
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
///////////////////////////////////////////////////
|
||
|
|
char* T_RULE_CFG::getName(){
|
||
|
|
return((char*)"T_RULE_CFG");
|
||
|
|
}
|
||
|
|
///////////////////////////////////////////////////
|
||
|
|
int T_RULE_CFG::getSqlCode(){
|
||
|
|
return( db.dbSqlCode);
|
||
|
|
}
|
||
|
|
int T_RULE_CFG::getRowsProcessed(){
|
||
|
|
return( db.dbRowsProcessed);
|
||
|
|
}
|