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
9a8d1b1a
Commit
9a8d1b1a
authored
Sep 19, 2007
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Newattribute flag handled and template object updated
parent
1010e4f0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
64 additions
and
26 deletions
+64
-26
wb/lib/wb/src/wb_wblnode.cpp
wb/lib/wb/src/wb_wblnode.cpp
+64
-26
No files found.
wb/lib/wb/src/wb_wblnode.cpp
View file @
9a8d1b1a
/*
* Proview $Id: wb_wblnode.cpp,v 1.5
7 2007-04-25 07:29:02
claes Exp $
* Proview $Id: wb_wblnode.cpp,v 1.5
8 2007-09-19 15:19:10
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -248,6 +248,8 @@ static wbl_sSym classes[] =
,{
"pwr_eCix_RtMethod"
,
pwr_eCix_RtMethod
}
,{
"pwr_eClass_Hier"
,
pwr_eClass_Hier
}
,{
"pwr_eCix_Hier"
,
pwr_eCix_Hier
}
,{
"pwr_eClass_ClassLost"
,
pwr_eClass_ClassLost
}
,{
"pwr_eCix_ClassLost"
,
pwr_eCix_ClassLost
}
,{
0
,
0
}
};
...
...
@@ -772,38 +774,74 @@ void wb_wblnode::postBuild()
((
pwr_sGraphPlcNode
*
)
o
->
rbody
)
->
default_mask
[
1
]
=
mask
;
}
}
else
if
(
isTemplate
()
&&
o
->
templ
.
created
)
{
// New template object, insert template values of attribute objects into body
size_t
size
;
void
*
body
;
else
if
(
isTemplate
())
{
if
(
o
->
templ
.
created
)
{
// New template object, insert template values of attribute objects into body
size_t
size
;
void
*
body
;
ch
=
o
->
fth
->
o
->
fch
;
while
(
ch
)
{
if
(
ch
->
isObjBodyDef
()
&&
ch
->
o
->
b
.
bix
==
pwr_eBix_rt
)
{
wb_wblnode
*
attr
=
ch
->
o
->
fch
;
while
(
attr
)
{
if
(
attr
->
isAttribute
())
{
if
(
cdh_tidIsCid
(
attr
->
o
->
a
.
tid
))
{
// Copy template for this object to offset of the attribute
if
(
m_vrep
->
getTemplateBody
(
attr
->
o
->
a
.
tid
,
pwr_eBix_sys
,
&
size
,
&
body
))
{
if
(
size
*
attr
->
o
->
a
.
elements
!=
attr
->
o
->
a
.
size
||
attr
->
o
->
a
.
offset
+
size
*
attr
->
o
->
a
.
elements
>
o
->
rbody_size
)
m_vrep
->
error
(
"AttrObject size mismatch"
,
getFileName
(),
line_number
);
else
for
(
int
i
=
0
;
i
<
attr
->
o
->
a
.
elements
;
i
++
)
memcpy
(
(
char
*
)
o
->
rbody
+
attr
->
o
->
a
.
offset
+
i
*
size
,
body
,
size
);
free
(
body
);
ch
=
o
->
fth
->
o
->
fch
;
while
(
ch
)
{
if
(
ch
->
isObjBodyDef
()
&&
ch
->
o
->
b
.
bix
==
pwr_eBix_rt
)
{
wb_wblnode
*
attr
=
ch
->
o
->
fch
;
while
(
attr
)
{
if
(
attr
->
isAttribute
())
{
if
(
cdh_tidIsCid
(
attr
->
o
->
a
.
tid
))
{
// Copy template for this object to offset of the attribute
if
(
m_vrep
->
getTemplateBody
(
attr
->
o
->
a
.
tid
,
pwr_eBix_sys
,
&
size
,
&
body
))
{
if
(
size
*
attr
->
o
->
a
.
elements
!=
attr
->
o
->
a
.
size
||
attr
->
o
->
a
.
offset
+
size
*
attr
->
o
->
a
.
elements
>
o
->
rbody_size
)
m_vrep
->
error
(
"AttrObject size mismatch"
,
getFileName
(),
line_number
);
else
for
(
int
i
=
0
;
i
<
attr
->
o
->
a
.
elements
;
i
++
)
memcpy
(
(
char
*
)
o
->
rbody
+
attr
->
o
->
a
.
offset
+
i
*
size
,
body
,
size
);
free
(
body
);
}
}
}
attr
=
attr
->
o
->
fws
;
}
attr
=
attr
->
o
->
fws
;
break
;
}
ch
=
ch
->
o
->
fws
;
}
}
else
{
// Check if any new attribute is created
size_t
size
;
void
*
body
;
ch
=
o
->
fth
->
o
->
fch
;
while
(
ch
)
{
if
(
ch
->
isObjBodyDef
()
&&
ch
->
o
->
b
.
bix
==
pwr_eBix_rt
)
{
wb_wblnode
*
attr
=
ch
->
o
->
fch
;
while
(
attr
)
{
if
(
attr
->
isAttribute
())
{
if
(
cdh_tidIsCid
(
attr
->
o
->
a
.
tid
)
&&
((
pwr_sParam
*
)
attr
->
o
->
rbody
)
->
Info
.
Flags
&
PWR_MASK_NEWATTRIBUTE
)
{
// Copy template for this object to offset of the attribute
if
(
m_vrep
->
getTemplateBody
(
attr
->
o
->
a
.
tid
,
pwr_eBix_sys
,
&
size
,
&
body
))
{
if
(
size
*
attr
->
o
->
a
.
elements
!=
attr
->
o
->
a
.
size
||
attr
->
o
->
a
.
offset
+
size
*
attr
->
o
->
a
.
elements
>
o
->
rbody_size
)
m_vrep
->
error
(
"AttrObject size mismatch"
,
getFileName
(),
line_number
);
else
for
(
int
i
=
0
;
i
<
attr
->
o
->
a
.
elements
;
i
++
)
memcpy
(
(
char
*
)
o
->
rbody
+
attr
->
o
->
a
.
offset
+
i
*
size
,
body
,
size
);
free
(
body
);
}
((
pwr_sParam
*
)
attr
->
o
->
rbody
)
->
Info
.
Flags
&=
~
PWR_MASK_NEWATTRIBUTE
;
}
}
attr
=
attr
->
o
->
fws
;
}
break
;
}
ch
=
ch
->
o
->
fws
;
break
;
}
ch
=
ch
->
o
->
fws
;
}
}
}
}
...
...
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