439 lines
11 KiB
C++
439 lines
11 KiB
C++
// Version: 2015.8.8 15:13:13
|
|
|
|
// File: T_CYC_EXTSEG095.cpp
|
|
|
|
#include "T_CYC_EXTSEG095.h"
|
|
|
|
T_CYC_EXTSEG095::T_CYC_EXTSEG095(){
|
|
// initialise all membervariables
|
|
initial();
|
|
}
|
|
T_CYC_EXTSEG095::~T_CYC_EXTSEG095(){
|
|
}
|
|
void T_CYC_EXTSEG095::initial(){
|
|
// initialise all membervariables
|
|
set_SeqNo(0);
|
|
set_EnCoilId("");
|
|
set_EnCoilIdZi(-1);
|
|
set_ExCoilId("");
|
|
set_ExCoilIdZi(-1);
|
|
set_DLPTension(0.0);
|
|
set_DLPTensionZi(-1);
|
|
set_TC("");
|
|
set_TCZi(-1);
|
|
set_muId(0);
|
|
set_muCreator("");
|
|
set_musId(0);
|
|
// initialies Primary key members
|
|
set_k_muId(0);
|
|
set_k_muCreator("");
|
|
set_k_musId(0);
|
|
set_k_SeqNo(0);
|
|
}
|
|
T_CYC_EXTSEG095::T_CYC_EXTSEG095(MU_CODE muCode , long arg1)
|
|
{
|
|
initial();
|
|
setPrimKey (muCode , arg1);
|
|
//read DB record
|
|
dbAccess = true;
|
|
dbMessage = readDB();
|
|
if ( dbMessage != NULL ) {dbAccess = false;}
|
|
}
|
|
|
|
char* T_CYC_EXTSEG095:: execute(const char* sql , long* count){
|
|
return( db.execute( sql , count ) );
|
|
}
|
|
|
|
char* T_CYC_EXTSEG095:: dbCommit(){
|
|
return( db.dbCommit( ) );
|
|
}
|
|
|
|
char* T_CYC_EXTSEG095:: dbRollback(){
|
|
return( db.dbRollback( ) );
|
|
}
|
|
|
|
char* T_CYC_EXTSEG095::readDB(){
|
|
// DB Trace is off
|
|
return( db.readDB(*this) );
|
|
}
|
|
|
|
char* T_CYC_EXTSEG095::updateDB(){
|
|
// DB Trace is off
|
|
return( db.updateDB(*this) );
|
|
}
|
|
|
|
char* T_CYC_EXTSEG095::insertDB(){
|
|
// DB Trace is off
|
|
return( db.insertDB(*this) );
|
|
}
|
|
|
|
char* T_CYC_EXTSEG095::deleteDB(){
|
|
// DB Trace is off
|
|
return( db.deleteDB(*this) );
|
|
}
|
|
|
|
char* T_CYC_EXTSEG095::deleteDB(const char * where, long* count){
|
|
// DB Trace is off
|
|
return( db.deleteDB( where , count ) );
|
|
}
|
|
|
|
char* T_CYC_EXTSEG095::openSetDB(const char * where,const char* order){
|
|
// DB Trace is off
|
|
return( db.openSetDB( where , order ) );
|
|
}
|
|
|
|
char* T_CYC_EXTSEG095::countDB(const char * where, long* count){
|
|
// DB Trace is off
|
|
return( db.countDB( where , count ) );
|
|
}
|
|
|
|
char* T_CYC_EXTSEG095::getSetDB(){
|
|
// DB Trace is off
|
|
return( db.getSetDB(*this) );
|
|
}
|
|
|
|
char* T_CYC_EXTSEG095::closeSetDB(){
|
|
// DB Trace is off
|
|
return( db.closeSetDB() );
|
|
}
|
|
|
|
char* T_CYC_EXTSEG095::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_CYC_EXTSEG095
|
|
//
|
|
// this methode stores the unique key attributes
|
|
//
|
|
void T_CYC_EXTSEG095::setPrimKey( long arg1 , const char* arg2 , short arg3 , long arg4 ){
|
|
l_k_muId = arg1;
|
|
strncpy( (char*)c_k_muCreator , arg2 , sizeof(c_k_muCreator) );
|
|
c_k_muCreator[sizeof(c_k_muCreator)-1] = '\0';
|
|
s_k_musId = arg3;
|
|
l_k_SeqNo = arg4;
|
|
} // end of methode
|
|
void T_CYC_EXTSEG095::setPrimKey( MU_CODE muCode , long arg1 ){
|
|
setPrimKey ( muCode.actual.muId , muCode.actual.muCreator , muCode.actual.musId , arg1);
|
|
} // end of methode
|
|
|
|
void T_CYC_EXTSEG095::initInsertKeys( long arg1 , const char* arg2 , short arg3 , long arg4 ){
|
|
setPrimKey ( arg1 , arg2 , arg3 , arg4);
|
|
l_muId = arg1;
|
|
strncpy( (char*)c_muCreator , arg2 , sizeof(c_muCreator) );
|
|
c_muCreator[sizeof(c_muCreator)-1] = '\0';
|
|
s_musId = arg3;
|
|
l_SeqNo = arg4;
|
|
} // end of methode
|
|
void T_CYC_EXTSEG095::initInsertKeys( MU_CODE muCode , long arg1 ){
|
|
initInsertKeys ( muCode.actual.muId , muCode.actual.muCreator , muCode.actual.musId , arg1);
|
|
} // end of methode
|
|
void T_CYC_EXTSEG095::setKeysFromRecord(){
|
|
set_k_muId( muId() );
|
|
set_k_muCreator( muCreator() );
|
|
set_k_musId( musId() );
|
|
set_k_SeqNo( SeqNo() );
|
|
} // end of methode
|
|
//
|
|
//O P E R A T O R +
|
|
//===================
|
|
//
|
|
T_CYC_EXTSEG095 T_CYC_EXTSEG095::operator+(const T_CYC_EXTSEG095 &inst) const{
|
|
T_CYC_EXTSEG095 ptrT_CYC_EXTSEG095(*this);
|
|
//----------------------------------------------------------
|
|
ptrT_CYC_EXTSEG095.set_SeqNo(inst.SeqNo());
|
|
//----------------------------------------------------------
|
|
if(inst.EnCoilIdZi() != -1){
|
|
ptrT_CYC_EXTSEG095.set_EnCoilId(inst.EnCoilId());
|
|
ptrT_CYC_EXTSEG095.set_EnCoilIdZi(inst.EnCoilIdZi());
|
|
}
|
|
//----------------------------------------------------------
|
|
if(inst.ExCoilIdZi() != -1){
|
|
ptrT_CYC_EXTSEG095.set_ExCoilId(inst.ExCoilId());
|
|
ptrT_CYC_EXTSEG095.set_ExCoilIdZi(inst.ExCoilIdZi());
|
|
}
|
|
//----------------------------------------------------------
|
|
if(inst.DLPTensionZi() != -1){
|
|
ptrT_CYC_EXTSEG095.set_DLPTension(inst.DLPTension());
|
|
ptrT_CYC_EXTSEG095.set_DLPTensionZi(inst.DLPTensionZi());
|
|
}
|
|
//----------------------------------------------------------
|
|
if(inst.TCZi() != -1){
|
|
ptrT_CYC_EXTSEG095.set_TC(inst.TC());
|
|
ptrT_CYC_EXTSEG095.set_TCZi(inst.TCZi());
|
|
}
|
|
//----------------------------------------------------------
|
|
ptrT_CYC_EXTSEG095.set_muId(inst.muId());
|
|
//----------------------------------------------------------
|
|
ptrT_CYC_EXTSEG095.set_muCreator(inst.muCreator());
|
|
//----------------------------------------------------------
|
|
ptrT_CYC_EXTSEG095.set_musId(inst.musId());
|
|
return (ptrT_CYC_EXTSEG095);
|
|
}
|
|
|
|
//
|
|
//O P E R A T O R =
|
|
//===================
|
|
//
|
|
const T_CYC_EXTSEG095& T_CYC_EXTSEG095::operator=(const T_CYC_EXTSEG095 &inst){
|
|
//----------------------------------------------------------
|
|
this->set_SeqNo(inst.SeqNo());
|
|
//----------------------------------------------------------
|
|
this->set_EnCoilId(inst.EnCoilId());
|
|
this->set_EnCoilIdZi(inst.EnCoilIdZi());
|
|
//----------------------------------------------------------
|
|
this->set_ExCoilId(inst.ExCoilId());
|
|
this->set_ExCoilIdZi(inst.ExCoilIdZi());
|
|
//----------------------------------------------------------
|
|
this->set_DLPTension(inst.DLPTension());
|
|
this->set_DLPTensionZi(inst.DLPTensionZi());
|
|
//----------------------------------------------------------
|
|
this->set_TC(inst.TC());
|
|
this->set_TCZi(inst.TCZi());
|
|
//----------------------------------------------------------
|
|
this->set_muId(inst.muId());
|
|
//----------------------------------------------------------
|
|
this->set_muCreator(inst.muCreator());
|
|
//----------------------------------------------------------
|
|
this->set_musId(inst.musId());
|
|
return (*this);
|
|
}
|
|
//
|
|
//C O P Y - C O N S T R U C T O R
|
|
//===================
|
|
//
|
|
T_CYC_EXTSEG095::T_CYC_EXTSEG095(const T_CYC_EXTSEG095 &inst){
|
|
//----------------------------------------------------------
|
|
this->set_SeqNo(inst.SeqNo());
|
|
//----------------------------------------------------------
|
|
this->set_EnCoilId(inst.EnCoilId());
|
|
this->set_EnCoilIdZi(inst.EnCoilIdZi());
|
|
//----------------------------------------------------------
|
|
this->set_ExCoilId(inst.ExCoilId());
|
|
this->set_ExCoilIdZi(inst.ExCoilIdZi());
|
|
//----------------------------------------------------------
|
|
this->set_DLPTension(inst.DLPTension());
|
|
this->set_DLPTensionZi(inst.DLPTensionZi());
|
|
//----------------------------------------------------------
|
|
this->set_TC(inst.TC());
|
|
this->set_TCZi(inst.TCZi());
|
|
//----------------------------------------------------------
|
|
this->set_muId(inst.muId());
|
|
//----------------------------------------------------------
|
|
this->set_muCreator(inst.muCreator());
|
|
//----------------------------------------------------------
|
|
this->set_musId(inst.musId());
|
|
}
|
|
long T_CYC_EXTSEG095::SeqNo() const{
|
|
return((long)l_SeqNo );
|
|
}
|
|
|
|
|
|
void T_CYC_EXTSEG095::set_SeqNo( long arg ){
|
|
l_SeqNo = arg;
|
|
return;
|
|
}
|
|
|
|
|
|
char* T_CYC_EXTSEG095::EnCoilId() const{
|
|
return((char*)c_EnCoilId );
|
|
}
|
|
|
|
short T_CYC_EXTSEG095::EnCoilIdZi() const{
|
|
return( s_EnCoilIdZi);
|
|
}
|
|
|
|
void T_CYC_EXTSEG095::set_EnCoilId( const char* arg ){
|
|
strncpy((char*)c_EnCoilId , arg , sizeof(c_EnCoilId));
|
|
c_EnCoilId[sizeof(c_EnCoilId)-1] = '\0';
|
|
s_EnCoilIdZi= 0;
|
|
return;
|
|
}
|
|
|
|
void T_CYC_EXTSEG095::set_EnCoilIdZi( short arg ) {
|
|
s_EnCoilIdZi = arg;
|
|
}
|
|
|
|
char* T_CYC_EXTSEG095::ExCoilId() const{
|
|
return((char*)c_ExCoilId );
|
|
}
|
|
|
|
short T_CYC_EXTSEG095::ExCoilIdZi() const{
|
|
return( s_ExCoilIdZi);
|
|
}
|
|
|
|
void T_CYC_EXTSEG095::set_ExCoilId( const char* arg ){
|
|
strncpy((char*)c_ExCoilId , arg , sizeof(c_ExCoilId));
|
|
c_ExCoilId[sizeof(c_ExCoilId)-1] = '\0';
|
|
s_ExCoilIdZi= 0;
|
|
return;
|
|
}
|
|
|
|
void T_CYC_EXTSEG095::set_ExCoilIdZi( short arg ) {
|
|
s_ExCoilIdZi = arg;
|
|
}
|
|
|
|
double T_CYC_EXTSEG095::DLPTension() const{
|
|
return((double)d_DLPTension );
|
|
}
|
|
|
|
short T_CYC_EXTSEG095::DLPTensionZi() const{
|
|
return( s_DLPTensionZi);
|
|
}
|
|
|
|
void T_CYC_EXTSEG095::set_DLPTension( double arg ){
|
|
d_DLPTension = arg;
|
|
s_DLPTensionZi= 0;
|
|
return;
|
|
}
|
|
|
|
void T_CYC_EXTSEG095::set_DLPTensionZi( short arg ) {
|
|
s_DLPTensionZi = arg;
|
|
}
|
|
|
|
char* T_CYC_EXTSEG095::TC() const{
|
|
return((char*)c_TC );
|
|
}
|
|
|
|
short T_CYC_EXTSEG095::TCZi() const{
|
|
return( s_TCZi);
|
|
}
|
|
|
|
void T_CYC_EXTSEG095::set_TC( char* arg ){
|
|
strncpy((char*)c_TC , arg , sizeof(c_TC));
|
|
c_TC[sizeof(c_TC)-1] = '\0';
|
|
s_TCZi= 0;
|
|
return;
|
|
}
|
|
|
|
void T_CYC_EXTSEG095::set_TCZi( short arg ) {
|
|
s_TCZi = arg;
|
|
}
|
|
|
|
long T_CYC_EXTSEG095::muId() const{
|
|
return((long)l_muId );
|
|
}
|
|
|
|
void T_CYC_EXTSEG095::set_muId( long arg ){
|
|
l_muId = arg;
|
|
return;
|
|
}
|
|
|
|
char* T_CYC_EXTSEG095::muCreator() const{
|
|
return((char*)c_muCreator );
|
|
}
|
|
|
|
void T_CYC_EXTSEG095::set_muCreator( const char* arg ){
|
|
strncpy((char*)c_muCreator , arg , sizeof(c_muCreator));
|
|
c_muCreator[sizeof(c_muCreator)-1] = '\0';
|
|
return;
|
|
}
|
|
|
|
short T_CYC_EXTSEG095::musId() const{
|
|
return((short)s_musId );
|
|
}
|
|
|
|
void T_CYC_EXTSEG095::set_musId( short arg ){
|
|
s_musId = arg;
|
|
return;
|
|
}
|
|
|
|
// methodes for Primary key
|
|
long T_CYC_EXTSEG095::k_muId(){
|
|
return((long)l_k_muId );
|
|
}
|
|
|
|
void T_CYC_EXTSEG095::set_k_muId( long arg ){
|
|
l_k_muId = arg;
|
|
return;
|
|
}
|
|
|
|
char* T_CYC_EXTSEG095::k_muCreator(){
|
|
return((char*)c_k_muCreator );
|
|
}
|
|
|
|
void T_CYC_EXTSEG095::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 T_CYC_EXTSEG095::k_musId(){
|
|
return((short)s_k_musId );
|
|
}
|
|
|
|
void T_CYC_EXTSEG095::set_k_musId( short arg ){
|
|
s_k_musId = arg;
|
|
return;
|
|
}
|
|
|
|
long T_CYC_EXTSEG095::k_SeqNo(){
|
|
return((long)l_k_SeqNo );
|
|
}
|
|
|
|
void T_CYC_EXTSEG095::set_k_SeqNo( long arg ){
|
|
l_k_SeqNo = arg;
|
|
return;
|
|
}
|
|
|
|
//
|
|
// public methode fillStructure
|
|
//
|
|
// this methode filles the classstructue with the private attributes
|
|
//
|
|
void T_CYC_EXTSEG095::fillStructure(){
|
|
structTable.SeqNo = SeqNo();
|
|
strncpy ( structTable.EnCoilId , EnCoilId(),sizeof(structTable.EnCoilId));
|
|
strncpy ( structTable.ExCoilId , ExCoilId(),sizeof(structTable.ExCoilId));
|
|
structTable.DLPTension = DLPTension();
|
|
strncpy ( structTable.TC , TC(),sizeof(structTable.TC));
|
|
structTable.muId = muId();
|
|
strncpy ( structTable.muCreator , muCreator(),sizeof(structTable.muCreator));
|
|
structTable.musId = musId();
|
|
return;
|
|
}
|
|
///////////////////////////////////////////////////
|
|
void T_CYC_EXTSEG095::fillStructureZi(){
|
|
structTableZi.EnCoilIdZi = EnCoilIdZi();
|
|
structTableZi.ExCoilIdZi = ExCoilIdZi();
|
|
structTableZi.DLPTensionZi = DLPTensionZi();
|
|
structTableZi.TCZi = TCZi();
|
|
return;
|
|
}
|
|
///////////////////////////////////////////////////
|
|
void T_CYC_EXTSEG095::setStructure() {
|
|
set_EnCoilId( structTable.EnCoilId);
|
|
set_ExCoilId( structTable.ExCoilId);
|
|
set_DLPTension( structTable.DLPTension);
|
|
set_TC( structTable.TC);
|
|
return;
|
|
}
|
|
///////////////////////////////////////////////////
|
|
void T_CYC_EXTSEG095::setStructureZi() {
|
|
set_EnCoilIdZi( structTableZi.EnCoilIdZi);
|
|
set_ExCoilIdZi( structTableZi.ExCoilIdZi);
|
|
set_DLPTensionZi( structTableZi.DLPTensionZi);
|
|
set_TCZi( structTableZi.TCZi);
|
|
return;
|
|
}
|
|
///////////////////////////////////////////////////
|
|
char* T_CYC_EXTSEG095::getName(){
|
|
return("T_CYC_EXTSEG095");
|
|
}
|
|
///////////////////////////////////////////////////
|
|
long T_CYC_EXTSEG095::getSqlCode(){
|
|
return( db.dbSqlCode);
|
|
}
|
|
long T_CYC_EXTSEG095::getRowsProcessed(){
|
|
return( db.dbRowsProcessed);
|
|
}
|