800 lines
22 KiB
C++
800 lines
22 KiB
C++
// Version: 2020.7.15 20:54:34
|
|
|
|
// File: T_STA_PARAM.cpp
|
|
|
|
#include "T_STA_PARAM.h"
|
|
|
|
T_STA_PARAM::T_STA_PARAM(){
|
|
// initialise all membervariables
|
|
initial();
|
|
}
|
|
T_STA_PARAM::~T_STA_PARAM(){
|
|
}
|
|
void T_STA_PARAM::initial(){
|
|
// initialise all membervariables
|
|
set_tagName((char*)"");
|
|
set_tagNameChinese((char*)"");
|
|
set_tagNameChineseZi(-1);
|
|
set_useOnline(0);
|
|
set_useOnlineZi(-1);
|
|
set_useOffline(0);
|
|
set_useOfflineZi(-1);
|
|
set_count(0);
|
|
set_countZi(-1);
|
|
set_dataFromDate((char*)"");
|
|
set_dataFromDateZi(-1);
|
|
set_dataToDate((char*)"");
|
|
set_dataToDateZi(-1);
|
|
set_sectionLeft(0.0);
|
|
set_sectionLeftZi(-1);
|
|
set_sectionRight(0.0);
|
|
set_sectionRightZi(-1);
|
|
set_precision(0);
|
|
set_precisionZi(-1);
|
|
set_capacity(0);
|
|
set_capacityZi(-1);
|
|
set_notUseHistory(0);
|
|
set_notUseHistoryZi(-1);
|
|
set_isDone(0);
|
|
set_isDoneZi(-1);
|
|
set_useAutoconfigRule(0);
|
|
set_useAutoconfigRuleZi(-1);
|
|
set_algId((char*)"");
|
|
set_algIdZi(-1);
|
|
set_ruleId((char*)"");
|
|
set_ruleIdZi(-1);
|
|
set_ruleMin(0);
|
|
set_ruleMinZi(-1);
|
|
set_ruleMax(0);
|
|
set_ruleMaxZi(-1);
|
|
// initialies Primary key members
|
|
set_k_tagName((char*)"");
|
|
}
|
|
T_STA_PARAM::T_STA_PARAM(const char* arg1)
|
|
{
|
|
initial();
|
|
setPrimKey (arg1);
|
|
//read DB record
|
|
dbAccess = true;
|
|
dbMessage = readDB();
|
|
if ( dbMessage != NULL ) {dbAccess = false;}
|
|
}
|
|
|
|
char* T_STA_PARAM:: execute(const char* sql , long* count){
|
|
return( db.execute( sql , count ) );
|
|
}
|
|
|
|
char* T_STA_PARAM:: dbCommit(){
|
|
return( db.dbCommit( ) );
|
|
}
|
|
|
|
char* T_STA_PARAM:: dbRollback(){
|
|
return( db.dbRollback( ) );
|
|
}
|
|
|
|
char* T_STA_PARAM::readDB(){
|
|
// DB Trace is off
|
|
return( db.readDB(*this) );
|
|
}
|
|
|
|
char* T_STA_PARAM::updateDB(){
|
|
// DB Trace is off
|
|
return( db.updateDB(*this) );
|
|
}
|
|
|
|
char* T_STA_PARAM::insertDB(){
|
|
// DB Trace is off
|
|
return( db.insertDB(*this) );
|
|
}
|
|
|
|
char* T_STA_PARAM::deleteDB(){
|
|
// DB Trace is off
|
|
return( db.deleteDB(*this) );
|
|
}
|
|
|
|
char* T_STA_PARAM::deleteDB(const char * where, long* count){
|
|
// DB Trace is off
|
|
return( db.deleteDB( where , count ) );
|
|
}
|
|
|
|
char* T_STA_PARAM::openSetDB(const char * where,const char* order){
|
|
// DB Trace is off
|
|
return( db.openSetDB( where , order ) );
|
|
}
|
|
|
|
char* T_STA_PARAM::countDB(const char * where, long* count){
|
|
// DB Trace is off
|
|
return( db.countDB( where , count ) );
|
|
}
|
|
|
|
char* T_STA_PARAM::getSetDB(){
|
|
// DB Trace is off
|
|
return( db.getSetDB(*this) );
|
|
}
|
|
|
|
char* T_STA_PARAM::closeSetDB(){
|
|
// DB Trace is off
|
|
return( db.closeSetDB() );
|
|
}
|
|
|
|
char* T_STA_PARAM::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_STA_PARAM
|
|
//
|
|
// this methode stores the unique key attributes
|
|
//
|
|
void T_STA_PARAM::setPrimKey( const char* arg1 ){
|
|
strncpy( (char*)c_k_tagName , arg1 , sizeof(c_k_tagName) );
|
|
c_k_tagName[sizeof(c_k_tagName)-1] = '\0';
|
|
} // end of methode
|
|
|
|
void T_STA_PARAM::initInsertKeys( const char* arg1 ){
|
|
setPrimKey ( arg1);
|
|
strncpy( (char*)c_tagName , arg1 , sizeof(c_tagName) );
|
|
c_tagName[sizeof(c_tagName)-1] = '\0';
|
|
} // end of methode
|
|
void T_STA_PARAM::setKeysFromRecord(){
|
|
set_k_tagName( tagName() );
|
|
} // end of methode
|
|
//
|
|
//O P E R A T O R +
|
|
//===================
|
|
//
|
|
T_STA_PARAM T_STA_PARAM::operator+(const T_STA_PARAM &inst) const{
|
|
T_STA_PARAM ptrT_STA_PARAM(*this);
|
|
//----------------------------------------------------------
|
|
ptrT_STA_PARAM.set_tagName(inst.tagName());
|
|
//----------------------------------------------------------
|
|
if(inst.tagNameChineseZi() != -1){
|
|
ptrT_STA_PARAM.set_tagNameChinese(inst.tagNameChinese());
|
|
ptrT_STA_PARAM.set_tagNameChineseZi(inst.tagNameChineseZi());
|
|
}
|
|
//----------------------------------------------------------
|
|
if(inst.useOnlineZi() != -1){
|
|
ptrT_STA_PARAM.set_useOnline(inst.useOnline());
|
|
ptrT_STA_PARAM.set_useOnlineZi(inst.useOnlineZi());
|
|
}
|
|
//----------------------------------------------------------
|
|
if(inst.useOfflineZi() != -1){
|
|
ptrT_STA_PARAM.set_useOffline(inst.useOffline());
|
|
ptrT_STA_PARAM.set_useOfflineZi(inst.useOfflineZi());
|
|
}
|
|
//----------------------------------------------------------
|
|
if(inst.countZi() != -1){
|
|
ptrT_STA_PARAM.set_count(inst.count());
|
|
ptrT_STA_PARAM.set_countZi(inst.countZi());
|
|
}
|
|
//----------------------------------------------------------
|
|
if(inst.dataFromDateZi() != -1){
|
|
ptrT_STA_PARAM.set_dataFromDate(inst.dataFromDate());
|
|
ptrT_STA_PARAM.set_dataFromDateZi(inst.dataFromDateZi());
|
|
}
|
|
//----------------------------------------------------------
|
|
if(inst.dataToDateZi() != -1){
|
|
ptrT_STA_PARAM.set_dataToDate(inst.dataToDate());
|
|
ptrT_STA_PARAM.set_dataToDateZi(inst.dataToDateZi());
|
|
}
|
|
//----------------------------------------------------------
|
|
if(inst.sectionLeftZi() != -1){
|
|
ptrT_STA_PARAM.set_sectionLeft(inst.sectionLeft());
|
|
ptrT_STA_PARAM.set_sectionLeftZi(inst.sectionLeftZi());
|
|
}
|
|
//----------------------------------------------------------
|
|
if(inst.sectionRightZi() != -1){
|
|
ptrT_STA_PARAM.set_sectionRight(inst.sectionRight());
|
|
ptrT_STA_PARAM.set_sectionRightZi(inst.sectionRightZi());
|
|
}
|
|
//----------------------------------------------------------
|
|
if(inst.precisionZi() != -1){
|
|
ptrT_STA_PARAM.set_precision(inst.precision());
|
|
ptrT_STA_PARAM.set_precisionZi(inst.precisionZi());
|
|
}
|
|
//----------------------------------------------------------
|
|
if(inst.capacityZi() != -1){
|
|
ptrT_STA_PARAM.set_capacity(inst.capacity());
|
|
ptrT_STA_PARAM.set_capacityZi(inst.capacityZi());
|
|
}
|
|
//----------------------------------------------------------
|
|
if(inst.notUseHistoryZi() != -1){
|
|
ptrT_STA_PARAM.set_notUseHistory(inst.notUseHistory());
|
|
ptrT_STA_PARAM.set_notUseHistoryZi(inst.notUseHistoryZi());
|
|
}
|
|
//----------------------------------------------------------
|
|
if(inst.isDoneZi() != -1){
|
|
ptrT_STA_PARAM.set_isDone(inst.isDone());
|
|
ptrT_STA_PARAM.set_isDoneZi(inst.isDoneZi());
|
|
}
|
|
//----------------------------------------------------------
|
|
if(inst.useAutoconfigRuleZi() != -1){
|
|
ptrT_STA_PARAM.set_useAutoconfigRule(inst.useAutoconfigRule());
|
|
ptrT_STA_PARAM.set_useAutoconfigRuleZi(inst.useAutoconfigRuleZi());
|
|
}
|
|
//----------------------------------------------------------
|
|
if(inst.algIdZi() != -1){
|
|
ptrT_STA_PARAM.set_algId(inst.algId());
|
|
ptrT_STA_PARAM.set_algIdZi(inst.algIdZi());
|
|
}
|
|
//----------------------------------------------------------
|
|
if(inst.ruleIdZi() != -1){
|
|
ptrT_STA_PARAM.set_ruleId(inst.ruleId());
|
|
ptrT_STA_PARAM.set_ruleIdZi(inst.ruleIdZi());
|
|
}
|
|
//----------------------------------------------------------
|
|
if(inst.ruleMinZi() != -1){
|
|
ptrT_STA_PARAM.set_ruleMin(inst.ruleMin());
|
|
ptrT_STA_PARAM.set_ruleMinZi(inst.ruleMinZi());
|
|
}
|
|
//----------------------------------------------------------
|
|
if(inst.ruleMaxZi() != -1){
|
|
ptrT_STA_PARAM.set_ruleMax(inst.ruleMax());
|
|
ptrT_STA_PARAM.set_ruleMaxZi(inst.ruleMaxZi());
|
|
}
|
|
return (ptrT_STA_PARAM);
|
|
}
|
|
|
|
//
|
|
//O P E R A T O R =
|
|
//===================
|
|
//
|
|
const T_STA_PARAM& T_STA_PARAM::operator=(const T_STA_PARAM &inst){
|
|
//----------------------------------------------------------
|
|
this->set_tagName(inst.tagName());
|
|
//----------------------------------------------------------
|
|
this->set_tagNameChinese(inst.tagNameChinese());
|
|
this->set_tagNameChineseZi(inst.tagNameChineseZi());
|
|
//----------------------------------------------------------
|
|
this->set_useOnline(inst.useOnline());
|
|
this->set_useOnlineZi(inst.useOnlineZi());
|
|
//----------------------------------------------------------
|
|
this->set_useOffline(inst.useOffline());
|
|
this->set_useOfflineZi(inst.useOfflineZi());
|
|
//----------------------------------------------------------
|
|
this->set_count(inst.count());
|
|
this->set_countZi(inst.countZi());
|
|
//----------------------------------------------------------
|
|
this->set_dataFromDate(inst.dataFromDate());
|
|
this->set_dataFromDateZi(inst.dataFromDateZi());
|
|
//----------------------------------------------------------
|
|
this->set_dataToDate(inst.dataToDate());
|
|
this->set_dataToDateZi(inst.dataToDateZi());
|
|
//----------------------------------------------------------
|
|
this->set_sectionLeft(inst.sectionLeft());
|
|
this->set_sectionLeftZi(inst.sectionLeftZi());
|
|
//----------------------------------------------------------
|
|
this->set_sectionRight(inst.sectionRight());
|
|
this->set_sectionRightZi(inst.sectionRightZi());
|
|
//----------------------------------------------------------
|
|
this->set_precision(inst.precision());
|
|
this->set_precisionZi(inst.precisionZi());
|
|
//----------------------------------------------------------
|
|
this->set_capacity(inst.capacity());
|
|
this->set_capacityZi(inst.capacityZi());
|
|
//----------------------------------------------------------
|
|
this->set_notUseHistory(inst.notUseHistory());
|
|
this->set_notUseHistoryZi(inst.notUseHistoryZi());
|
|
//----------------------------------------------------------
|
|
this->set_isDone(inst.isDone());
|
|
this->set_isDoneZi(inst.isDoneZi());
|
|
//----------------------------------------------------------
|
|
this->set_useAutoconfigRule(inst.useAutoconfigRule());
|
|
this->set_useAutoconfigRuleZi(inst.useAutoconfigRuleZi());
|
|
//----------------------------------------------------------
|
|
this->set_algId(inst.algId());
|
|
this->set_algIdZi(inst.algIdZi());
|
|
//----------------------------------------------------------
|
|
this->set_ruleId(inst.ruleId());
|
|
this->set_ruleIdZi(inst.ruleIdZi());
|
|
//----------------------------------------------------------
|
|
this->set_ruleMin(inst.ruleMin());
|
|
this->set_ruleMinZi(inst.ruleMinZi());
|
|
//----------------------------------------------------------
|
|
this->set_ruleMax(inst.ruleMax());
|
|
this->set_ruleMaxZi(inst.ruleMaxZi());
|
|
return (*this);
|
|
}
|
|
//
|
|
//C O P Y - C O N S T R U C T O R
|
|
//===================
|
|
//
|
|
T_STA_PARAM::T_STA_PARAM(const T_STA_PARAM &inst){
|
|
//----------------------------------------------------------
|
|
this->set_tagName(inst.tagName());
|
|
//----------------------------------------------------------
|
|
this->set_tagNameChinese(inst.tagNameChinese());
|
|
this->set_tagNameChineseZi(inst.tagNameChineseZi());
|
|
//----------------------------------------------------------
|
|
this->set_useOnline(inst.useOnline());
|
|
this->set_useOnlineZi(inst.useOnlineZi());
|
|
//----------------------------------------------------------
|
|
this->set_useOffline(inst.useOffline());
|
|
this->set_useOfflineZi(inst.useOfflineZi());
|
|
//----------------------------------------------------------
|
|
this->set_count(inst.count());
|
|
this->set_countZi(inst.countZi());
|
|
//----------------------------------------------------------
|
|
this->set_dataFromDate(inst.dataFromDate());
|
|
this->set_dataFromDateZi(inst.dataFromDateZi());
|
|
//----------------------------------------------------------
|
|
this->set_dataToDate(inst.dataToDate());
|
|
this->set_dataToDateZi(inst.dataToDateZi());
|
|
//----------------------------------------------------------
|
|
this->set_sectionLeft(inst.sectionLeft());
|
|
this->set_sectionLeftZi(inst.sectionLeftZi());
|
|
//----------------------------------------------------------
|
|
this->set_sectionRight(inst.sectionRight());
|
|
this->set_sectionRightZi(inst.sectionRightZi());
|
|
//----------------------------------------------------------
|
|
this->set_precision(inst.precision());
|
|
this->set_precisionZi(inst.precisionZi());
|
|
//----------------------------------------------------------
|
|
this->set_capacity(inst.capacity());
|
|
this->set_capacityZi(inst.capacityZi());
|
|
//----------------------------------------------------------
|
|
this->set_notUseHistory(inst.notUseHistory());
|
|
this->set_notUseHistoryZi(inst.notUseHistoryZi());
|
|
//----------------------------------------------------------
|
|
this->set_isDone(inst.isDone());
|
|
this->set_isDoneZi(inst.isDoneZi());
|
|
//----------------------------------------------------------
|
|
this->set_useAutoconfigRule(inst.useAutoconfigRule());
|
|
this->set_useAutoconfigRuleZi(inst.useAutoconfigRuleZi());
|
|
//----------------------------------------------------------
|
|
this->set_algId(inst.algId());
|
|
this->set_algIdZi(inst.algIdZi());
|
|
//----------------------------------------------------------
|
|
this->set_ruleId(inst.ruleId());
|
|
this->set_ruleIdZi(inst.ruleIdZi());
|
|
//----------------------------------------------------------
|
|
this->set_ruleMin(inst.ruleMin());
|
|
this->set_ruleMinZi(inst.ruleMinZi());
|
|
//----------------------------------------------------------
|
|
this->set_ruleMax(inst.ruleMax());
|
|
this->set_ruleMaxZi(inst.ruleMaxZi());
|
|
}
|
|
char* T_STA_PARAM::tagName() const{
|
|
return((char*)c_tagName );
|
|
}
|
|
|
|
|
|
void T_STA_PARAM::set_tagName( const char* arg ){
|
|
strncpy((char*)c_tagName , arg , sizeof(c_tagName));
|
|
c_tagName[sizeof(c_tagName)-1] = '\0';
|
|
return;
|
|
}
|
|
|
|
|
|
char* T_STA_PARAM::tagNameChinese() const{
|
|
return((char*)c_tagNameChinese );
|
|
}
|
|
|
|
short T_STA_PARAM::tagNameChineseZi() const{
|
|
return( s_tagNameChineseZi);
|
|
}
|
|
|
|
void T_STA_PARAM::set_tagNameChinese( const char* arg ){
|
|
strncpy((char*)c_tagNameChinese , arg , sizeof(c_tagNameChinese));
|
|
c_tagNameChinese[sizeof(c_tagNameChinese)-1] = '\0';
|
|
s_tagNameChineseZi= 0;
|
|
return;
|
|
}
|
|
|
|
void T_STA_PARAM::set_tagNameChineseZi( short arg ) {
|
|
s_tagNameChineseZi = arg;
|
|
}
|
|
|
|
short T_STA_PARAM::useOnline() const{
|
|
return((short)s_useOnline );
|
|
}
|
|
|
|
short T_STA_PARAM::useOnlineZi() const{
|
|
return( s_useOnlineZi);
|
|
}
|
|
|
|
void T_STA_PARAM::set_useOnline( short arg ){
|
|
s_useOnline = arg;
|
|
s_useOnlineZi= 0;
|
|
return;
|
|
}
|
|
|
|
void T_STA_PARAM::set_useOnlineZi( short arg ) {
|
|
s_useOnlineZi = arg;
|
|
}
|
|
|
|
short T_STA_PARAM::useOffline() const{
|
|
return((short)s_useOffline );
|
|
}
|
|
|
|
short T_STA_PARAM::useOfflineZi() const{
|
|
return( s_useOfflineZi);
|
|
}
|
|
|
|
void T_STA_PARAM::set_useOffline( short arg ){
|
|
s_useOffline = arg;
|
|
s_useOfflineZi= 0;
|
|
return;
|
|
}
|
|
|
|
void T_STA_PARAM::set_useOfflineZi( short arg ) {
|
|
s_useOfflineZi = arg;
|
|
}
|
|
|
|
long T_STA_PARAM::count() const{
|
|
return((long)l_count );
|
|
}
|
|
|
|
short T_STA_PARAM::countZi() const{
|
|
return( s_countZi);
|
|
}
|
|
|
|
void T_STA_PARAM::set_count( long arg ){
|
|
l_count = arg;
|
|
s_countZi= 0;
|
|
return;
|
|
}
|
|
|
|
void T_STA_PARAM::set_countZi( short arg ) {
|
|
s_countZi = arg;
|
|
}
|
|
|
|
char* T_STA_PARAM::dataFromDate() const{
|
|
return((char*)c_dataFromDate );
|
|
}
|
|
|
|
short T_STA_PARAM::dataFromDateZi() const{
|
|
return( s_dataFromDateZi);
|
|
}
|
|
|
|
void T_STA_PARAM::set_dataFromDate( char* arg ){
|
|
strncpy((char*)c_dataFromDate , arg , sizeof(c_dataFromDate));
|
|
c_dataFromDate[sizeof(c_dataFromDate)-1] = '\0';
|
|
s_dataFromDateZi= 0;
|
|
return;
|
|
}
|
|
|
|
void T_STA_PARAM::set_dataFromDateZi( short arg ) {
|
|
s_dataFromDateZi = arg;
|
|
}
|
|
|
|
char* T_STA_PARAM::dataToDate() const{
|
|
return((char*)c_dataToDate );
|
|
}
|
|
|
|
short T_STA_PARAM::dataToDateZi() const{
|
|
return( s_dataToDateZi);
|
|
}
|
|
|
|
void T_STA_PARAM::set_dataToDate( char* arg ){
|
|
strncpy((char*)c_dataToDate , arg , sizeof(c_dataToDate));
|
|
c_dataToDate[sizeof(c_dataToDate)-1] = '\0';
|
|
s_dataToDateZi= 0;
|
|
return;
|
|
}
|
|
|
|
void T_STA_PARAM::set_dataToDateZi( short arg ) {
|
|
s_dataToDateZi = arg;
|
|
}
|
|
|
|
double T_STA_PARAM::sectionLeft() const{
|
|
return((double)d_sectionLeft );
|
|
}
|
|
|
|
short T_STA_PARAM::sectionLeftZi() const{
|
|
return( s_sectionLeftZi);
|
|
}
|
|
|
|
void T_STA_PARAM::set_sectionLeft( double arg ){
|
|
d_sectionLeft = arg;
|
|
s_sectionLeftZi= 0;
|
|
return;
|
|
}
|
|
|
|
void T_STA_PARAM::set_sectionLeftZi( short arg ) {
|
|
s_sectionLeftZi = arg;
|
|
}
|
|
|
|
double T_STA_PARAM::sectionRight() const{
|
|
return((double)d_sectionRight );
|
|
}
|
|
|
|
short T_STA_PARAM::sectionRightZi() const{
|
|
return( s_sectionRightZi);
|
|
}
|
|
|
|
void T_STA_PARAM::set_sectionRight( double arg ){
|
|
d_sectionRight = arg;
|
|
s_sectionRightZi= 0;
|
|
return;
|
|
}
|
|
|
|
void T_STA_PARAM::set_sectionRightZi( short arg ) {
|
|
s_sectionRightZi = arg;
|
|
}
|
|
|
|
short T_STA_PARAM::precision() const{
|
|
return((short)s_precision );
|
|
}
|
|
|
|
short T_STA_PARAM::precisionZi() const{
|
|
return( s_precisionZi);
|
|
}
|
|
|
|
void T_STA_PARAM::set_precision( short arg ){
|
|
s_precision = arg;
|
|
s_precisionZi= 0;
|
|
return;
|
|
}
|
|
|
|
void T_STA_PARAM::set_precisionZi( short arg ) {
|
|
s_precisionZi = arg;
|
|
}
|
|
|
|
short T_STA_PARAM::capacity() const{
|
|
return((short)s_capacity );
|
|
}
|
|
|
|
short T_STA_PARAM::capacityZi() const{
|
|
return( s_capacityZi);
|
|
}
|
|
|
|
void T_STA_PARAM::set_capacity( short arg ){
|
|
s_capacity = arg;
|
|
s_capacityZi= 0;
|
|
return;
|
|
}
|
|
|
|
void T_STA_PARAM::set_capacityZi( short arg ) {
|
|
s_capacityZi = arg;
|
|
}
|
|
|
|
short T_STA_PARAM::notUseHistory() const{
|
|
return((short)s_notUseHistory );
|
|
}
|
|
|
|
short T_STA_PARAM::notUseHistoryZi() const{
|
|
return( s_notUseHistoryZi);
|
|
}
|
|
|
|
void T_STA_PARAM::set_notUseHistory( short arg ){
|
|
s_notUseHistory = arg;
|
|
s_notUseHistoryZi= 0;
|
|
return;
|
|
}
|
|
|
|
void T_STA_PARAM::set_notUseHistoryZi( short arg ) {
|
|
s_notUseHistoryZi = arg;
|
|
}
|
|
|
|
short T_STA_PARAM::isDone() const{
|
|
return((short)s_isDone );
|
|
}
|
|
|
|
short T_STA_PARAM::isDoneZi() const{
|
|
return( s_isDoneZi);
|
|
}
|
|
|
|
void T_STA_PARAM::set_isDone( short arg ){
|
|
s_isDone = arg;
|
|
s_isDoneZi= 0;
|
|
return;
|
|
}
|
|
|
|
void T_STA_PARAM::set_isDoneZi( short arg ) {
|
|
s_isDoneZi = arg;
|
|
}
|
|
|
|
short T_STA_PARAM::useAutoconfigRule() const{
|
|
return((short)s_useAutoconfigRule );
|
|
}
|
|
|
|
short T_STA_PARAM::useAutoconfigRuleZi() const{
|
|
return( s_useAutoconfigRuleZi);
|
|
}
|
|
|
|
void T_STA_PARAM::set_useAutoconfigRule( short arg ){
|
|
s_useAutoconfigRule = arg;
|
|
s_useAutoconfigRuleZi= 0;
|
|
return;
|
|
}
|
|
|
|
void T_STA_PARAM::set_useAutoconfigRuleZi( short arg ) {
|
|
s_useAutoconfigRuleZi = arg;
|
|
}
|
|
|
|
char* T_STA_PARAM::algId() const{
|
|
return((char*)c_algId );
|
|
}
|
|
|
|
short T_STA_PARAM::algIdZi() const{
|
|
return( s_algIdZi);
|
|
}
|
|
|
|
void T_STA_PARAM::set_algId( const char* arg ){
|
|
strncpy((char*)c_algId , arg , sizeof(c_algId));
|
|
c_algId[sizeof(c_algId)-1] = '\0';
|
|
s_algIdZi= 0;
|
|
return;
|
|
}
|
|
|
|
void T_STA_PARAM::set_algIdZi( short arg ) {
|
|
s_algIdZi = arg;
|
|
}
|
|
|
|
char* T_STA_PARAM::ruleId() const{
|
|
return((char*)c_ruleId );
|
|
}
|
|
|
|
short T_STA_PARAM::ruleIdZi() const{
|
|
return( s_ruleIdZi);
|
|
}
|
|
|
|
void T_STA_PARAM::set_ruleId( const char* arg ){
|
|
strncpy((char*)c_ruleId , arg , sizeof(c_ruleId));
|
|
c_ruleId[sizeof(c_ruleId)-1] = '\0';
|
|
s_ruleIdZi= 0;
|
|
return;
|
|
}
|
|
|
|
void T_STA_PARAM::set_ruleIdZi( short arg ) {
|
|
s_ruleIdZi = arg;
|
|
}
|
|
|
|
short T_STA_PARAM::ruleMin() const{
|
|
return((short)s_ruleMin );
|
|
}
|
|
|
|
short T_STA_PARAM::ruleMinZi() const{
|
|
return( s_ruleMinZi);
|
|
}
|
|
|
|
void T_STA_PARAM::set_ruleMin( short arg ){
|
|
s_ruleMin = arg;
|
|
s_ruleMinZi= 0;
|
|
return;
|
|
}
|
|
|
|
void T_STA_PARAM::set_ruleMinZi( short arg ) {
|
|
s_ruleMinZi = arg;
|
|
}
|
|
|
|
short T_STA_PARAM::ruleMax() const{
|
|
return((short)s_ruleMax );
|
|
}
|
|
|
|
short T_STA_PARAM::ruleMaxZi() const{
|
|
return( s_ruleMaxZi);
|
|
}
|
|
|
|
void T_STA_PARAM::set_ruleMax( short arg ){
|
|
s_ruleMax = arg;
|
|
s_ruleMaxZi= 0;
|
|
return;
|
|
}
|
|
|
|
void T_STA_PARAM::set_ruleMaxZi( short arg ) {
|
|
s_ruleMaxZi = arg;
|
|
}
|
|
|
|
// methodes for Primary key
|
|
char* T_STA_PARAM::k_tagName(){
|
|
return((char*)c_k_tagName );
|
|
}
|
|
|
|
void T_STA_PARAM::set_k_tagName( char* arg ){
|
|
strncpy((char*)c_k_tagName , arg , sizeof(c_k_tagName));
|
|
c_k_tagName[sizeof(c_k_tagName)-1] = '\0';
|
|
return;
|
|
}
|
|
|
|
//
|
|
// public methode fillStructure
|
|
//
|
|
// this methode filles the classstructue with the private attributes
|
|
//
|
|
void T_STA_PARAM::fillStructure(){
|
|
strncpy ( structTable.tagName , tagName(),sizeof(structTable.tagName));
|
|
strncpy ( structTable.tagNameChinese , tagNameChinese(),sizeof(structTable.tagNameChinese));
|
|
structTable.useOnline = useOnline();
|
|
structTable.useOffline = useOffline();
|
|
structTable.count = count();
|
|
strncpy ( structTable.dataFromDate , dataFromDate(),sizeof(structTable.dataFromDate));
|
|
strncpy ( structTable.dataToDate , dataToDate(),sizeof(structTable.dataToDate));
|
|
structTable.sectionLeft = sectionLeft();
|
|
structTable.sectionRight = sectionRight();
|
|
structTable.precision = precision();
|
|
structTable.capacity = capacity();
|
|
structTable.notUseHistory = notUseHistory();
|
|
structTable.isDone = isDone();
|
|
structTable.useAutoconfigRule = useAutoconfigRule();
|
|
strncpy ( structTable.algId , algId(),sizeof(structTable.algId));
|
|
strncpy ( structTable.ruleId , ruleId(),sizeof(structTable.ruleId));
|
|
structTable.ruleMin = ruleMin();
|
|
structTable.ruleMax = ruleMax();
|
|
return;
|
|
}
|
|
///////////////////////////////////////////////////
|
|
void T_STA_PARAM::fillStructureZi(){
|
|
structTableZi.tagNameChineseZi = tagNameChineseZi();
|
|
structTableZi.useOnlineZi = useOnlineZi();
|
|
structTableZi.useOfflineZi = useOfflineZi();
|
|
structTableZi.countZi = countZi();
|
|
structTableZi.dataFromDateZi = dataFromDateZi();
|
|
structTableZi.dataToDateZi = dataToDateZi();
|
|
structTableZi.sectionLeftZi = sectionLeftZi();
|
|
structTableZi.sectionRightZi = sectionRightZi();
|
|
structTableZi.precisionZi = precisionZi();
|
|
structTableZi.capacityZi = capacityZi();
|
|
structTableZi.notUseHistoryZi = notUseHistoryZi();
|
|
structTableZi.isDoneZi = isDoneZi();
|
|
structTableZi.useAutoconfigRuleZi = useAutoconfigRuleZi();
|
|
structTableZi.algIdZi = algIdZi();
|
|
structTableZi.ruleIdZi = ruleIdZi();
|
|
structTableZi.ruleMinZi = ruleMinZi();
|
|
structTableZi.ruleMaxZi = ruleMaxZi();
|
|
return;
|
|
}
|
|
///////////////////////////////////////////////////
|
|
void T_STA_PARAM::setStructure() {
|
|
set_tagNameChinese( structTable.tagNameChinese);
|
|
set_useOnline( structTable.useOnline);
|
|
set_useOffline( structTable.useOffline);
|
|
set_count( structTable.count);
|
|
set_dataFromDate( structTable.dataFromDate);
|
|
set_dataToDate( structTable.dataToDate);
|
|
set_sectionLeft( structTable.sectionLeft);
|
|
set_sectionRight( structTable.sectionRight);
|
|
set_precision( structTable.precision);
|
|
set_capacity( structTable.capacity);
|
|
set_notUseHistory( structTable.notUseHistory);
|
|
set_isDone( structTable.isDone);
|
|
set_useAutoconfigRule( structTable.useAutoconfigRule);
|
|
set_algId( structTable.algId);
|
|
set_ruleId( structTable.ruleId);
|
|
set_ruleMin( structTable.ruleMin);
|
|
set_ruleMax( structTable.ruleMax);
|
|
return;
|
|
}
|
|
///////////////////////////////////////////////////
|
|
void T_STA_PARAM::setStructureZi() {
|
|
set_tagNameChineseZi( structTableZi.tagNameChineseZi);
|
|
set_useOnlineZi( structTableZi.useOnlineZi);
|
|
set_useOfflineZi( structTableZi.useOfflineZi);
|
|
set_countZi( structTableZi.countZi);
|
|
set_dataFromDateZi( structTableZi.dataFromDateZi);
|
|
set_dataToDateZi( structTableZi.dataToDateZi);
|
|
set_sectionLeftZi( structTableZi.sectionLeftZi);
|
|
set_sectionRightZi( structTableZi.sectionRightZi);
|
|
set_precisionZi( structTableZi.precisionZi);
|
|
set_capacityZi( structTableZi.capacityZi);
|
|
set_notUseHistoryZi( structTableZi.notUseHistoryZi);
|
|
set_isDoneZi( structTableZi.isDoneZi);
|
|
set_useAutoconfigRuleZi( structTableZi.useAutoconfigRuleZi);
|
|
set_algIdZi( structTableZi.algIdZi);
|
|
set_ruleIdZi( structTableZi.ruleIdZi);
|
|
set_ruleMinZi( structTableZi.ruleMinZi);
|
|
set_ruleMaxZi( structTableZi.ruleMaxZi);
|
|
return;
|
|
}
|
|
///////////////////////////////////////////////////
|
|
char* T_STA_PARAM::getName(){
|
|
return((char*)"T_STA_PARAM");
|
|
}
|
|
///////////////////////////////////////////////////
|
|
int T_STA_PARAM::getSqlCode(){
|
|
return( db.dbSqlCode);
|
|
}
|
|
int T_STA_PARAM::getRowsProcessed(){
|
|
return( db.dbRowsProcessed);
|
|
}
|