Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
2f4befb4
Commit
2f4befb4
authored
Apr 04, 2019
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wb method PostCopy added. Implemented in WindowPlc to reset compilation time, and in PnDevice
parent
b5367953
Changes
24
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
442 additions
and
4 deletions
+442
-4
profibus/lib/wb/gtk/wb_c_pndevice_gtk.cpp
profibus/lib/wb/gtk/wb_c_pndevice_gtk.cpp
+8
-1
profibus/lib/wb/qt/wb_c_pndevice_qt.cpp
profibus/lib/wb/qt/wb_c_pndevice_qt.cpp
+7
-1
profibus/lib/wb/src/wb_c_pndevice.cpp
profibus/lib/wb/src/wb_c_pndevice.cpp
+18
-0
profibus/lib/wb/src/wb_c_pndevice.h
profibus/lib/wb/src/wb_c_pndevice.h
+3
-0
profibus/wbl/mcomp/src/profibus.wb_load
profibus/wbl/mcomp/src/profibus.wb_load
+6
-1
src/wbl/pwrb/src/pwrb_c_windowcond.wb_load
src/wbl/pwrb/src/pwrb_c_windowcond.wb_load
+5
-0
src/wbl/pwrb/src/pwrb_c_windoworderact.wb_load
src/wbl/pwrb/src/pwrb_c_windoworderact.wb_load
+5
-0
src/wbl/pwrb/src/pwrb_c_windowplc.wb_load
src/wbl/pwrb/src/pwrb_c_windowplc.wb_load
+5
-0
src/wbl/pwrb/src/pwrb_c_windowsubstep.wb_load
src/wbl/pwrb/src/pwrb_c_windowsubstep.wb_load
+5
-0
wb/lib/wb/src/wb_c_windowcond.cpp
wb/lib/wb/src/wb_c_windowcond.cpp
+75
-0
wb/lib/wb/src/wb_c_windoworderact.cpp
wb/lib/wb/src/wb_c_windoworderact.cpp
+75
-0
wb/lib/wb/src/wb_c_windowplc.cpp
wb/lib/wb/src/wb_c_windowplc.cpp
+75
-0
wb/lib/wb/src/wb_c_windowsubstep.cpp
wb/lib/wb/src/wb_c_windowsubstep.cpp
+75
-0
wb/lib/wb/src/wb_cdrep.cpp
wb/lib/wb/src/wb_cdrep.cpp
+1
-0
wb/lib/wb/src/wb_i_base_methods.cpp
wb/lib/wb/src/wb_i_base_methods.cpp
+3
-1
wb/lib/wb/src/wb_ldh.h
wb/lib/wb/src/wb_ldh.h
+1
-0
wb/lib/wb/src/wb_pwrs.h
wb/lib/wb/src/wb_pwrs.h
+2
-0
wb/lib/wb/src/wb_session.cpp
wb/lib/wb/src/wb_session.cpp
+17
-0
wb/lib/wb/src/wb_session.h
wb/lib/wb/src/wb_session.h
+1
-0
wb/lib/wb/src/wb_treeimport.cpp
wb/lib/wb/src/wb_treeimport.cpp
+13
-0
wb/lib/wb/src/wb_treeimport.h
wb/lib/wb/src/wb_treeimport.h
+7
-0
wb/lib/wb/src/wb_volume.cpp
wb/lib/wb/src/wb_volume.cpp
+30
-0
wb/lib/wb/src/wb_volume.h
wb/lib/wb/src/wb_volume.h
+1
-0
wb/lib/wb/src/wb_wb.meth
wb/lib/wb/src/wb_wb.meth
+4
-0
No files found.
profibus/lib/wb/gtk/wb_c_pndevice_gtk.cpp
View file @
2f4befb4
...
...
@@ -263,6 +263,12 @@ static pwr_tStatus SetIoDeviceData(
return
sts
;
}
static
pwr_tStatus
PostCopy
(
ldh_tSesContext
Session
,
pwr_tOid
Object
,
pwr_tOid
Source
,
pwr_tCid
Class
)
{
return
pndevice_postcopy
(
Session
,
Object
,
Source
,
Class
);
}
/*----------------------------------------------------------------------------*\
Every method to be exported to the workbench should be registred here.
\*----------------------------------------------------------------------------*/
...
...
@@ -271,4 +277,5 @@ pwr_dExport pwr_BindMethods(PnDevice)
=
{
pwr_BindMethod
(
Configure
),
pwr_BindMethod
(
ConfigureFilter
),
pwr_BindMethod
(
CopyDevice
),
pwr_BindMethod
(
CopyDeviceFilter
),
pwr_BindMethod
(
SyntaxCheck
),
pwr_BindMethod
(
GetIoDeviceData
),
pwr_BindMethod
(
SetIoDeviceData
),
pwr_NullMethod
};
pwr_BindMethod
(
SetIoDeviceData
),
pwr_BindMethod
(
PostCopy
),
pwr_NullMethod
};
profibus/lib/wb/qt/wb_c_pndevice_qt.cpp
View file @
2f4befb4
...
...
@@ -254,6 +254,12 @@ static pwr_tStatus SetIoDeviceData(
return
sts
;
}
static
pwr_tStatus
PostCopy
(
ldh_tSesContext
Session
,
pwr_tOid
Object
,
pwr_tOid
Source
,
pwr_tCid
Class
)
{
return
pndevice_postcopy
(
Session
,
Object
,
Source
,
Class
);
}
/*----------------------------------------------------------------------------*\
Every method to be exported to the workbench should be registred here.
\*----------------------------------------------------------------------------*/
...
...
@@ -261,4 +267,4 @@ pwr_dExport pwr_BindMethods(PnDevice)
=
{
pwr_BindMethod
(
Configure
),
pwr_BindMethod
(
ConfigureFilter
),
pwr_BindMethod
(
CopyDevice
),
pwr_BindMethod
(
CopyDeviceFilter
),
pwr_BindMethod
(
SyntaxCheck
),
pwr_BindMethod
(
GetIoDeviceData
),
pwr_BindMethod
(
SetIoDeviceData
),
pwr_NullMethod
};
pwr_BindMethod
(
SetIoDeviceData
),
pwr_
BindMethod
(
PostCopy
),
pwr_
NullMethod
};
profibus/lib/wb/src/wb_c_pndevice.cpp
View file @
2f4befb4
...
...
@@ -993,3 +993,21 @@ pwr_tStatus pndevice_init(device_sCtx* ctx)
}
return
1
;
}
pwr_tStatus
pndevice_postcopy
(
ldh_tSesContext
Session
,
pwr_tOid
Object
,
pwr_tOid
Source
,
pwr_tCid
Class
)
{
pwr_tCmd
cmd
;
char
soidstr
[
40
];
if
(
cdh_ObjidIsNotNull
(
Source
))
{
printf
(
"-- Create $pwrp_load/pwr_pn_%s.xml
\n
"
,
cdh_ObjidToFnString
(
0
,
Object
));
strcpy
(
soidstr
,
cdh_ObjidToFnString
(
0
,
Source
));
sprintf
(
cmd
,
"cp $pwrp_load/pwr_pn_%s.xml $pwrp_load/pwr_pn_%s.xml"
,
soidstr
,
cdh_ObjidToFnString
(
0
,
Object
));
system
(
cmd
);
}
return
PWRB__SUCCESS
;
}
profibus/lib/wb/src/wb_c_pndevice.h
View file @
2f4befb4
...
...
@@ -59,5 +59,8 @@ pwr_tStatus pndevice_init(device_sCtx* ctx);
int
pndevice_help_cb
(
void
*
sctx
,
const
char
*
text
);
void
pndevice_close_cb
(
void
*
sctx
);
int
pndevice_save_cb
(
void
*
sctx
);
pwr_tStatus
pndevice_postcopy
(
ldh_tSesContext
Session
,
pwr_tOid
Object
,
pwr_tOid
Source
,
pwr_tCid
Class
);
#endif
profibus/wbl/mcomp/src/profibus.wb_load
View file @
2f4befb4
Volume Profibus $ClassVolume 0.0.250.7
Body SysBody 05-SEP-2005 17:51:40.00
Attr NextOix = "_X26
2
"
Attr NextOix = "_X26
3
"
Attr NextCix = "_X22"
Attr NextTix[0] = "_X14"
EndBody
...
...
@@ -3842,6 +3842,11 @@ Volume Profibus $ClassVolume 0.0.250.7
Attr MethodName = "BaseIORack-PostCreate"
EndBody
EndObject
Object PostCopy $DbCallBack 263 03-APR-2019 15:28:20.40
Body SysBody 03-APR-2019 15:28:39.62
Attr MethodName = "PnDevice-PostCopy"
EndBody
EndObject
Object Template PnDevice 2151907328 01-JAN-1970 01:00:00.00
Body RtBody 22-FEB-2017 16:12:07.73
Attr Process = 1
...
...
src/wbl/pwrb/src/pwrb_c_windowcond.wb_load
View file @
2f4befb4
...
...
@@ -139,5 +139,10 @@ SObject pwrb:Class
Attr graphname = "Condition"
EndBody
EndObject
Object PostCopy $DbCallBack
Body SysBody
Attr MethodName = "WindowCond-PostCopy"
EndBody
EndObject
EndObject
EndSObject
src/wbl/pwrb/src/pwrb_c_windoworderact.wb_load
View file @
2f4befb4
...
...
@@ -143,5 +143,10 @@ SObject pwrb:Class
Attr graphname = "Activity"
EndBody
EndObject
Object PostCopy $DbCallBack
Body SysBody
Attr MethodName = "WindowOrderact-PostCopy"
EndBody
EndObject
EndObject
EndSObject
src/wbl/pwrb/src/pwrb_c_windowplc.wb_load
View file @
2f4befb4
...
...
@@ -151,5 +151,10 @@ SObject pwrb:Class
Attr graphname = "WINDOW"
EndBody
EndObject
Object PostCopy $DbCallBack
Body SysBody
Attr MethodName = "WindowPlc-PostCopy"
EndBody
EndObject
EndObject
EndSObject
src/wbl/pwrb/src/pwrb_c_windowsubstep.wb_load
View file @
2f4befb4
...
...
@@ -140,5 +140,10 @@ SObject pwrb:Class
Attr graphname = "Substep"
EndBody
EndObject
Object PostCopy $DbCallBack
Body SysBody
Attr MethodName = "WindowSubstep-PostCopy"
EndBody
EndObject
EndObject
EndSObject
wb/lib/wb/src/wb_c_windowcond.cpp
0 → 100644
View file @
2f4befb4
/*
* ProviewR Open Source Process Control.
* Copyright (C) 2005-2019 SSAB EMEA AB.
*
* This file is part of ProviewR.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with ProviewR. If not, see <http://www.gnu.org/licenses/>
*
* Linking ProviewR statically or dynamically with other modules is
* making a combined work based on ProviewR. Thus, the terms and
* conditions of the GNU General Public License cover the whole
* combination.
*
* In addition, as a special exception, the copyright holders of
* ProviewR give you permission to, from the build function in the
* ProviewR Configurator, combine ProviewR with modules generated by the
* ProviewR PLC Editor to a PLC program, regardless of the license
* terms of these modules. You may copy and distribute the resulting
* combined work under the terms of your choice, provided that every
* copy of the combined work is accompanied by a complete copy of
* the source code of ProviewR (the version used to produce the
* combined work), being distributed under the terms of the GNU
* General Public License plus this exception.
*/
/* wb_c_windowcond.cpp -- work bench methods of the WindowCond class. */
#include "pwr_baseclasses.h"
#include "wb_pwrs.h"
#include "wb_pwrb_msg.h"
static
pwr_tStatus
PostCopy
(
ldh_tSesContext
Session
,
pwr_tOid
Object
,
pwr_tOid
Father
,
pwr_tCid
Class
)
{
pwr_tStatus
sts
;
pwr_tTime
time
=
pwr_cNTime
;
pwr_tUInt32
version
=
0
;
// Reset time for modified and compile
sts
=
ldh_SetObjectPar
(
Session
,
Object
,
"RtBody"
,
"Version"
,
(
char
*
)
&
version
,
sizeof
(
version
));
if
(
EVEN
(
sts
))
return
sts
;
sts
=
ldh_SetObjectPar
(
Session
,
Object
,
"DevBody"
,
"Modified"
,
(
char
*
)
&
time
,
sizeof
(
time
));
if
(
EVEN
(
sts
))
return
sts
;
sts
=
ldh_SetObjectPar
(
Session
,
Object
,
"DevBody"
,
"Compiled"
,
(
char
*
)
&
time
,
sizeof
(
time
));
if
(
EVEN
(
sts
))
return
sts
;
return
PWRB__SUCCESS
;
}
/*----------------------------------------------------------------------------*\
Every method to be exported to the workbench should be registred here.
\*----------------------------------------------------------------------------*/
pwr_dExport
pwr_BindMethods
(
WindowCond
)
=
{
pwr_BindMethod
(
PostCopy
),
pwr_NullMethod
};
wb/lib/wb/src/wb_c_windoworderact.cpp
0 → 100644
View file @
2f4befb4
/*
* ProviewR Open Source Process Control.
* Copyright (C) 2005-2019 SSAB EMEA AB.
*
* This file is part of ProviewR.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with ProviewR. If not, see <http://www.gnu.org/licenses/>
*
* Linking ProviewR statically or dynamically with other modules is
* making a combined work based on ProviewR. Thus, the terms and
* conditions of the GNU General Public License cover the whole
* combination.
*
* In addition, as a special exception, the copyright holders of
* ProviewR give you permission to, from the build function in the
* ProviewR Configurator, combine ProviewR with modules generated by the
* ProviewR PLC Editor to a PLC program, regardless of the license
* terms of these modules. You may copy and distribute the resulting
* combined work under the terms of your choice, provided that every
* copy of the combined work is accompanied by a complete copy of
* the source code of ProviewR (the version used to produce the
* combined work), being distributed under the terms of the GNU
* General Public License plus this exception.
*/
/* wb_c_windoworderact.cpp -- work bench methods of the WindowOrderact class. */
#include "pwr_baseclasses.h"
#include "wb_pwrs.h"
#include "wb_pwrb_msg.h"
static
pwr_tStatus
PostCopy
(
ldh_tSesContext
Session
,
pwr_tOid
Object
,
pwr_tOid
Father
,
pwr_tCid
Class
)
{
pwr_tStatus
sts
;
pwr_tTime
time
=
pwr_cNTime
;
pwr_tUInt32
version
=
0
;
// Reset time for modified and compile
sts
=
ldh_SetObjectPar
(
Session
,
Object
,
"RtBody"
,
"Version"
,
(
char
*
)
&
version
,
sizeof
(
version
));
if
(
EVEN
(
sts
))
return
sts
;
sts
=
ldh_SetObjectPar
(
Session
,
Object
,
"DevBody"
,
"Modified"
,
(
char
*
)
&
time
,
sizeof
(
time
));
if
(
EVEN
(
sts
))
return
sts
;
sts
=
ldh_SetObjectPar
(
Session
,
Object
,
"DevBody"
,
"Compiled"
,
(
char
*
)
&
time
,
sizeof
(
time
));
if
(
EVEN
(
sts
))
return
sts
;
return
PWRB__SUCCESS
;
}
/*----------------------------------------------------------------------------*\
Every method to be exported to the workbench should be registred here.
\*----------------------------------------------------------------------------*/
pwr_dExport
pwr_BindMethods
(
WindowOrderact
)
=
{
pwr_BindMethod
(
PostCopy
),
pwr_NullMethod
};
wb/lib/wb/src/wb_c_windowplc.cpp
0 → 100644
View file @
2f4befb4
/*
* ProviewR Open Source Process Control.
* Copyright (C) 2005-2019 SSAB EMEA AB.
*
* This file is part of ProviewR.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with ProviewR. If not, see <http://www.gnu.org/licenses/>
*
* Linking ProviewR statically or dynamically with other modules is
* making a combined work based on ProviewR. Thus, the terms and
* conditions of the GNU General Public License cover the whole
* combination.
*
* In addition, as a special exception, the copyright holders of
* ProviewR give you permission to, from the build function in the
* ProviewR Configurator, combine ProviewR with modules generated by the
* ProviewR PLC Editor to a PLC program, regardless of the license
* terms of these modules. You may copy and distribute the resulting
* combined work under the terms of your choice, provided that every
* copy of the combined work is accompanied by a complete copy of
* the source code of ProviewR (the version used to produce the
* combined work), being distributed under the terms of the GNU
* General Public License plus this exception.
*/
/* wb_c_windowplc.cpp -- work bench methods of the WindowPlc class. */
#include "pwr_baseclasses.h"
#include "wb_pwrs.h"
#include "wb_pwrb_msg.h"
static
pwr_tStatus
PostCopy
(
ldh_tSesContext
Session
,
pwr_tOid
Object
,
pwr_tOid
Father
,
pwr_tCid
Class
)
{
pwr_tStatus
sts
;
pwr_tTime
time
=
pwr_cNTime
;
pwr_tUInt32
version
=
0
;
// Reset time for modified and compile
sts
=
ldh_SetObjectPar
(
Session
,
Object
,
"RtBody"
,
"Version"
,
(
char
*
)
&
version
,
sizeof
(
version
));
if
(
EVEN
(
sts
))
return
sts
;
sts
=
ldh_SetObjectPar
(
Session
,
Object
,
"DevBody"
,
"Modified"
,
(
char
*
)
&
time
,
sizeof
(
time
));
if
(
EVEN
(
sts
))
return
sts
;
sts
=
ldh_SetObjectPar
(
Session
,
Object
,
"DevBody"
,
"Compiled"
,
(
char
*
)
&
time
,
sizeof
(
time
));
if
(
EVEN
(
sts
))
return
sts
;
return
PWRB__SUCCESS
;
}
/*----------------------------------------------------------------------------*\
Every method to be exported to the workbench should be registred here.
\*----------------------------------------------------------------------------*/
pwr_dExport
pwr_BindMethods
(
WindowPlc
)
=
{
pwr_BindMethod
(
PostCopy
),
pwr_NullMethod
};
wb/lib/wb/src/wb_c_windowsubstep.cpp
0 → 100644
View file @
2f4befb4
/*
* ProviewR Open Source Process Control.
* Copyright (C) 2005-2019 SSAB EMEA AB.
*
* This file is part of ProviewR.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with ProviewR. If not, see <http://www.gnu.org/licenses/>
*
* Linking ProviewR statically or dynamically with other modules is
* making a combined work based on ProviewR. Thus, the terms and
* conditions of the GNU General Public License cover the whole
* combination.
*
* In addition, as a special exception, the copyright holders of
* ProviewR give you permission to, from the build function in the
* ProviewR Configurator, combine ProviewR with modules generated by the
* ProviewR PLC Editor to a PLC program, regardless of the license
* terms of these modules. You may copy and distribute the resulting
* combined work under the terms of your choice, provided that every
* copy of the combined work is accompanied by a complete copy of
* the source code of ProviewR (the version used to produce the
* combined work), being distributed under the terms of the GNU
* General Public License plus this exception.
*/
/* wb_c_windowsubstep.cpp -- work bench methods of the WindowSubstep class. */
#include "pwr_baseclasses.h"
#include "wb_pwrs.h"
#include "wb_pwrb_msg.h"
static
pwr_tStatus
PostCopy
(
ldh_tSesContext
Session
,
pwr_tOid
Object
,
pwr_tOid
Father
,
pwr_tCid
Class
)
{
pwr_tStatus
sts
;
pwr_tTime
time
=
pwr_cNTime
;
pwr_tUInt32
version
=
0
;
// Reset time for modified and compile
sts
=
ldh_SetObjectPar
(
Session
,
Object
,
"RtBody"
,
"Version"
,
(
char
*
)
&
version
,
sizeof
(
version
));
if
(
EVEN
(
sts
))
return
sts
;
sts
=
ldh_SetObjectPar
(
Session
,
Object
,
"DevBody"
,
"Modified"
,
(
char
*
)
&
time
,
sizeof
(
time
));
if
(
EVEN
(
sts
))
return
sts
;
sts
=
ldh_SetObjectPar
(
Session
,
Object
,
"DevBody"
,
"Compiled"
,
(
char
*
)
&
time
,
sizeof
(
time
));
if
(
EVEN
(
sts
))
return
sts
;
return
PWRB__SUCCESS
;
}
/*----------------------------------------------------------------------------*\
Every method to be exported to the workbench should be registred here.
\*----------------------------------------------------------------------------*/
pwr_dExport
pwr_BindMethods
(
WindowSubstep
)
=
{
pwr_BindMethod
(
PostCopy
),
pwr_NullMethod
};
wb/lib/wb/src/wb_cdrep.cpp
View file @
2f4befb4
...
...
@@ -65,6 +65,7 @@ static pwr_tString32 callBackName[] = {
"AnteUpdate"
,
// ldh_eDbCallBack_AnteUpdate
"PostUpdate"
,
// ldh_eDbCallBack_PostUpdate
"SyntaxCheck"
,
// ldh_eDbCallBack_SyntaxCheck
"PostCopy"
,
// ldh_eDbCallBack_PostCopy
"-"
// ldh_eDbCallBack_
};
...
...
wb/lib/wb/src/wb_i_base_methods.cpp
View file @
2f4befb4
...
...
@@ -79,6 +79,7 @@ pwr_dImport pwr_BindMethods(Application);
pwr_dImport
pwr_BindMethods
(
FriendNodeConfig
);
pwr_dImport
pwr_BindMethods
(
SevHistThread
);
pwr_dImport
pwr_BindMethods
(
SevHistObject
);
pwr_dImport
pwr_BindMethods
(
WindowPlc
);
pwr_dExport
pwr_BindClasses
(
Base
)
=
{
pwr_BindClass
(
ASup
),
pwr_BindClass
(
DsFast
),
pwr_BindClass
(
SevHist
),
pwr_BindClass
(
DsTrend
),
...
...
@@ -95,4 +96,5 @@ pwr_dExport pwr_BindClasses(Base) = { pwr_BindClass(ASup),
pwr_BindClass
(
PlcProcess
),
pwr_BindClass
(
PlcThread
),
pwr_BindClass
(
NodeConfig
),
pwr_BindClass
(
SevNodeConfig
),
pwr_BindClass
(
Application
),
pwr_BindClass
(
FriendNodeConfig
),
pwr_BindClass
(
SevHistThread
),
pwr_BindClass
(
SevHistObject
),
pwr_NullClass
};
pwr_BindClass
(
SevHistThread
),
pwr_BindClass
(
SevHistObject
),
pwr_BindClass
(
WindowPlc
),
pwr_NullClass
};
wb/lib/wb/src/wb_ldh.h
View file @
2f4befb4
...
...
@@ -204,6 +204,7 @@ typedef enum {
ldh_eDbCallBack_AnteUpdate
,
ldh_eDbCallBack_PostUpdate
,
ldh_eDbCallBack_SyntaxCheck
,
ldh_eDbCallBack_PostCopy
,
ldh_eDbCallBack_
}
ldh_eDbCallBack
;
...
...
wb/lib/wb/src/wb_pwrs.h
View file @
2f4befb4
...
...
@@ -106,5 +106,7 @@ typedef pwr_tStatus (*wb_tMethodGetIoDeviceData)(
pwr_tAttrRef
,
const
char
*
,
char
*
,
int
);
typedef
pwr_tStatus
(
*
wb_tMethodSetIoDeviceData
)(
pwr_tAttrRef
,
const
char
*
,
const
char
*
);
typedef
pwr_tStatus
(
*
wb_tMethodPostCopy
)(
ldh_tSesContext
,
pwr_tOid
,
pwr_tOid
,
pwr_tCid
);
#endif
wb/lib/wb/src/wb_session.cpp
View file @
2f4befb4
...
...
@@ -207,7 +207,9 @@ wb_object wb_session::copyObject(wb_object o, wb_destination d, wb_name name)
ldh_sEvent
*
ep
=
m_srep
->
eventStart
(
onew
.
oid
(),
ldh_eEvent_ObjectCreated
);
m_srep
->
eventNewFamily
(
ep
,
onew
);
triggPostCreate
(
onew
);
triggPostCopy
(
onew
,
o
);
triggPostAdopt
(
parent
,
onew
);
m_srep
->
eventSend
(
ep
);
return
onew
;
...
...
@@ -493,9 +495,23 @@ bool wb_session::copyOset(pwr_sAttrRef* arp, bool keepref, bool keepsym,
if
(
vmem
)
*
vmem
=
mem
;
m_vrep
->
set_object_import_cb
(
import_cb
,
(
void
*
)
this
);
return
mem
->
importTree
(
keepref
,
keepsym
);
}
void
wb_session
::
import_cb
(
wb_orep
*
o
,
wb_orep
*
os
,
void
*
data
)
{
wb_session
*
ses
=
(
wb_session
*
)
data
;
wb_object
object
=
wb_object
(
o
);
wb_object
source
;
if
(
os
)
source
=
wb_object
(
os
);
else
source
=
wb_object
();
ses
->
triggPostCopy
(
object
,
source
);
}
bool
wb_session
::
cutOset
(
pwr_sAttrRef
*
arp
,
bool
keepref
)
{
if
(
isReadonly
())
...
...
@@ -610,6 +626,7 @@ bool wb_session::pasteOset(
if
(
recycleix
)
recix
=
m_srep
->
recix
();
pwr_tOid
*
olist
;
m_vrep
->
set_object_import_cb
(
import_cb
,
(
void
*
)
this
);
mem
->
exportPaste
(
*
m_vrep
,
doid
,
dest
,
keepoid
,
recix
,
&
olist
);
m_srep
->
update
();
if
(
recycleix
)
...
...
wb/lib/wb/src/wb_session.h
View file @
2f4befb4
...
...
@@ -139,6 +139,7 @@ public:
{
m_srep
->
recix_set_destination
(
d
);
}
static
void
import_cb
(
wb_orep
*
o
,
wb_orep
*
os
,
void
*
data
);
};
inline
bool
wb_session
::
isEmpty
()
...
...
wb/lib/wb/src/wb_treeimport.cpp
View file @
2f4befb4
...
...
@@ -38,6 +38,7 @@
#include "wb_bdrep.h"
#include "wb_cdrep.h"
#include "wb_merep.h"
#include "wb_volume.h"
wb_treeimport
::~
wb_treeimport
()
{
...
...
@@ -107,6 +108,18 @@ bool wb_treeimport::importUpdateTree(wb_vrep* vrep)
o
->
ref
();
importUpdateObject
(
o
,
vrep
);
if
(
m_object_import_cb
)
{
oid
.
oix
=
it
->
first
;
oid
.
vid
=
vrep
->
vid
();
wb_orep
*
os
=
vrep
->
object
(
&
sts
,
oid
);
if
(
ODD
(
sts
))
os
->
ref
();
else
os
=
0
;
(
m_object_import_cb
)(
o
,
os
,
m_object_import_cb_data
);
if
(
os
)
os
->
unref
();
}
o
->
unref
();
}
return
true
;
...
...
wb/lib/wb/src/wb_treeimport.h
View file @
2f4befb4
...
...
@@ -52,6 +52,8 @@ class wb_treeimport {
std
::
map
<
pwr_tOix
,
pwr_tOix
>
m_translation_table
;
std
::
map
<
pwr_tCid
,
pwr_tCid
>
m_translation_table_cid
;
pwr_tVid
m_import_source_vid
;
void
(
*
m_object_import_cb
)(
wb_orep
*
,
wb_orep
*
,
void
*
);
void
*
m_object_import_cb_data
;
typedef
std
::
map
<
pwr_tOix
,
pwr_tOix
>::
iterator
iterator_translation_table
;
typedef
std
::
map
<
pwr_tCid
,
pwr_tCid
>::
iterator
iterator_translation_table_cid
;
...
...
@@ -61,6 +63,7 @@ class wb_treeimport {
bool
importUpdateObject
(
wb_orep
*
o
,
wb_vrep
*
vrep
);
public:
wb_treeimport
()
:
m_object_import_cb
(
0
)
{}
virtual
~
wb_treeimport
();
virtual
bool
importTree
(
bool
keepref
,
bool
keepsym
)
=
0
;
virtual
bool
importTreeObject
(
wb_merep
*
merep
,
pwr_tOid
oid
,
pwr_tCid
cid
,
...
...
@@ -81,6 +84,10 @@ public:
pwr_tCid
importTranslateCid
(
pwr_tCid
cid
);
void
importSetSourceVid
(
pwr_tVid
vid
);
bool
importUpdateTree
(
wb_vrep
*
vrep
);
void
set_object_import_cb
(
void
(
*
object_import_cb
)(
wb_orep
*
,
wb_orep
*
,
void
*
),
void
*
data
)
{
m_object_import_cb
=
object_import_cb
;
m_object_import_cb_data
=
data
;
}
};
#endif
wb/lib/wb/src/wb_volume.cpp
View file @
2f4befb4
...
...
@@ -903,6 +903,36 @@ pwr_tStatus wb_volume::triggPostRename(wb_object& o)
return
sts
;
}
pwr_tStatus
wb_volume
::
triggPostCopy
(
wb_object
&
o
,
wb_object
&
so
)
{
pwr_tStatus
sts
;
char
*
methodName
;
wb_tMethod
method
;
// Call object method, or inherited method
for
(
wb_cdef
cd
=
cdef
(
o
.
cid
());
cd
;
cd
=
cd
.
super
())
{
wb_cdrep
*
cdrep
=
cd
;
cdrep
->
dbCallBack
(
&
sts
,
ldh_eDbCallBack_PostCopy
,
&
methodName
,
0
);
if
(
ODD
(
sts
))
{
m_vrep
->
erep
()
->
method
(
&
sts
,
methodName
,
&
method
);
if
(
EVEN
(
sts
))
return
LDH__SUCCESS
;
if
(
so
)
{
sts
=
((
wb_tMethodPostCopy
)(
method
))(
(
ldh_tSesContext
)
this
,
o
.
oid
(),
so
.
oid
(),
so
.
cid
());
}
else
sts
=
((
wb_tMethodPostCopy
)(
method
))(
(
ldh_tSesContext
)
this
,
o
.
oid
(),
pwr_cNObjid
,
pwr_cNClassId
);
return
sts
;
}
}
return
LDH__SUCCESS
;
}
ldh_sRefInfo
*
wb_volume
::
refinfo
(
wb_object
o
,
ldh_sRefInfo
*
rp
)
{
int
rows
;
...
...
wb/lib/wb/src/wb_volume.h
View file @
2f4befb4
...
...
@@ -161,6 +161,7 @@ public:
pwr_tStatus
triggPostMove
(
wb_object
&
o
);
pwr_tStatus
triggPostUnadopt
(
wb_object
&
father
,
wb_object
&
o
);
pwr_tStatus
triggPostRename
(
wb_object
&
o
);
pwr_tStatus
triggPostCopy
(
wb_object
&
o
,
wb_object
&
so
);
ldh_sRefInfo
*
refinfo
(
wb_object
o
,
ldh_sRefInfo
*
rp
);
...
...
wb/lib/wb/src/wb_wb.meth
View file @
2f4befb4
...
...
@@ -42,3 +42,7 @@ FriendNodeConfig
SevHistThread
SevHistObject
AppGraph
WindowCond
WindowOrderact
WindowPlc
WindowSubstep
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment