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
5ff20a88
Commit
5ff20a88
authored
Aug 03, 2009
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bugfix in loading wbload file with objects containing object attributes
parent
fb001fc8
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
35 additions
and
13 deletions
+35
-13
wb/changelog.txt
wb/changelog.txt
+2
-1
wb/lib/wb/src/wb_bdrep.cpp
wb/lib/wb/src/wb_bdrep.cpp
+7
-3
wb/lib/wb/src/wb_bdrep.h
wb/lib/wb/src/wb_bdrep.h
+3
-0
wb/lib/wb/src/wb_cdrep.cpp
wb/lib/wb/src/wb_cdrep.cpp
+13
-7
wb/lib/wb/src/wb_cdrep.h
wb/lib/wb/src/wb_cdrep.h
+2
-0
wb/lib/wb/src/wb_merep.cpp
wb/lib/wb/src/wb_merep.cpp
+8
-2
No files found.
wb/changelog.txt
View file @
5ff20a88
...
@@ -134,4 +134,5 @@
...
@@ -134,4 +134,5 @@
090518 cs wb Wb method PostRename added and implemented for XttGraph and ProjectReg objects.
090518 cs wb Wb method PostRename added and implemented for XttGraph and ProjectReg objects.
090518 cs wb Advanced user set as default in wb.
090518 cs wb Advanced user set as default in wb.
090630 cs wb Directory database changed from BerkeleyDb to wb_load format.
090630 cs wb Directory database changed from BerkeleyDb to wb_load format.
090701 cs plc Env variable PWR_EXT_INC added to plc compile command. Replaces pwrp_cmn.
090701 cs plc Env variable PWR_EXT_INC added to plc compile command. Replaces pwrp_cmn.
\ No newline at end of file
090803 cs wb Bugfix in loading wbload file with objects containing object attributes.
\ No newline at end of file
wb/lib/wb/src/wb_bdrep.cpp
View file @
5ff20a88
...
@@ -37,12 +37,12 @@ wb_bdrep *wb_bdrep::ref()
...
@@ -37,12 +37,12 @@ wb_bdrep *wb_bdrep::ref()
return
this
;
return
this
;
}
}
wb_bdrep
::
wb_bdrep
(
wb_orep
&
o
)
:
m_nRef
(
0
),
m_orep
(
&
o
),
m_sts
(
LDH__SUCCESS
)
wb_bdrep
::
wb_bdrep
(
wb_orep
&
o
)
:
m_nRef
(
0
),
m_orep
(
&
o
),
m_sts
(
LDH__SUCCESS
)
,
m_merep
(
0
)
{
{
m_orep
->
ref
();
m_orep
->
ref
();
}
}
wb_bdrep
::
wb_bdrep
(
wb_adrep
*
adrep
)
:
m_nRef
(
0
)
wb_bdrep
::
wb_bdrep
(
wb_adrep
*
adrep
)
:
m_nRef
(
0
)
,
m_merep
(
0
)
{
{
pwr_tStatus
sts
;
pwr_tStatus
sts
;
m_orep
=
adrep
->
m_orep
->
parent
(
&
sts
);
m_orep
=
adrep
->
m_orep
->
parent
(
&
sts
);
...
@@ -196,7 +196,11 @@ wb_adrep *wb_bdrep::adrep( pwr_tStatus *sts, const char *aname)
...
@@ -196,7 +196,11 @@ wb_adrep *wb_bdrep::adrep( pwr_tStatus *sts, const char *aname)
}
}
if
(
(
i
!=
n
.
attributes
()
-
1
)
&&
adrep
->
isClass
())
{
if
(
(
i
!=
n
.
attributes
()
-
1
)
&&
adrep
->
isClass
())
{
wb_cdrep
*
cd
=
m_orep
->
vrep
()
->
merep
()
->
cdrep
(
sts
,
adrep
->
subClass
());
wb_cdrep
*
cd
;
if
(
m_merep
)
cd
=
m_merep
->
cdrep
(
sts
,
adrep
->
subClass
());
else
cd
=
m_orep
->
vrep
()
->
merep
()
->
cdrep
(
sts
,
adrep
->
subClass
());
if
(
EVEN
(
*
sts
))
return
0
;
if
(
EVEN
(
*
sts
))
return
0
;
if
(
bd
!=
this
)
if
(
bd
!=
this
)
...
...
wb/lib/wb/src/wb_bdrep.h
View file @
5ff20a88
...
@@ -26,6 +26,7 @@
...
@@ -26,6 +26,7 @@
class
wb_adrep
;
class
wb_adrep
;
class
wb_orep
;
class
wb_orep
;
class
wb_merep
;
class
wb_bdrep
class
wb_bdrep
{
{
...
@@ -33,6 +34,7 @@ class wb_bdrep
...
@@ -33,6 +34,7 @@ class wb_bdrep
wb_orep
*
m_orep
;
wb_orep
*
m_orep
;
pwr_tStatus
m_sts
;
pwr_tStatus
m_sts
;
pwr_tObjName
m_structname
;
pwr_tObjName
m_structname
;
wb_merep
*
m_merep
;
public:
public:
wb_bdrep
();
wb_bdrep
();
...
@@ -62,6 +64,7 @@ public:
...
@@ -62,6 +64,7 @@ public:
pwr_tStatus
sts
()
{
return
m_sts
;}
pwr_tStatus
sts
()
{
return
m_sts
;}
pwr_tTime
modTime
();
pwr_tTime
modTime
();
char
*
structName
();
char
*
structName
();
void
merep
(
wb_merep
*
me
)
{
m_merep
=
me
;}
};
};
...
...
wb/lib/wb/src/wb_cdrep.cpp
View file @
5ff20a88
...
@@ -64,7 +64,7 @@ wb_cdrep *wb_cdrep::ref()
...
@@ -64,7 +64,7 @@ wb_cdrep *wb_cdrep::ref()
return
this
;
return
this
;
}
}
wb_cdrep
::
wb_cdrep
()
:
m_nRef
(
0
),
m_orep
(
0
),
m_sts
(
LDH__NOCLASS
)
wb_cdrep
::
wb_cdrep
()
:
m_nRef
(
0
),
m_orep
(
0
),
m_sts
(
LDH__NOCLASS
)
,
m_merep
(
0
)
{
{
}
}
...
@@ -74,7 +74,7 @@ wb_cdrep::~wb_cdrep()
...
@@ -74,7 +74,7 @@ wb_cdrep::~wb_cdrep()
m_orep
->
unref
();
m_orep
->
unref
();
}
}
wb_cdrep
::
wb_cdrep
(
wb_mvrep
*
mvrep
,
pwr_tCid
cid
)
:
m_nRef
(
0
),
m_orep
(
0
)
wb_cdrep
::
wb_cdrep
(
wb_mvrep
*
mvrep
,
pwr_tCid
cid
)
:
m_nRef
(
0
),
m_orep
(
0
)
,
m_merep
(
0
)
{
{
pwr_tOid
oid
=
cdh_ClassIdToObjid
(
cid
);
pwr_tOid
oid
=
cdh_ClassIdToObjid
(
cid
);
m_orep
=
mvrep
->
object
(
&
m_sts
,
oid
);
m_orep
=
mvrep
->
object
(
&
m_sts
,
oid
);
...
@@ -84,7 +84,7 @@ wb_cdrep::wb_cdrep( wb_mvrep *mvrep, pwr_tCid cid) : m_nRef(0), m_orep(0)
...
@@ -84,7 +84,7 @@ wb_cdrep::wb_cdrep( wb_mvrep *mvrep, pwr_tCid cid) : m_nRef(0), m_orep(0)
m_sts
=
LDH__SUCCESS
;
m_sts
=
LDH__SUCCESS
;
}
}
wb_cdrep
::
wb_cdrep
(
wb_mvrep
*
mvrep
,
wb_name
name
)
:
m_nRef
(
0
),
m_orep
(
0
)
wb_cdrep
::
wb_cdrep
(
wb_mvrep
*
mvrep
,
wb_name
name
)
:
m_nRef
(
0
),
m_orep
(
0
)
,
m_merep
(
0
)
{
{
char
str
[
80
];
char
str
[
80
];
strcpy
(
str
,
"Class-"
);
strcpy
(
str
,
"Class-"
);
...
@@ -97,7 +97,7 @@ wb_cdrep::wb_cdrep( wb_mvrep *mvrep, wb_name name) : m_nRef(0), m_orep(0)
...
@@ -97,7 +97,7 @@ wb_cdrep::wb_cdrep( wb_mvrep *mvrep, wb_name name) : m_nRef(0), m_orep(0)
m_sts
=
LDH__SUCCESS
;
m_sts
=
LDH__SUCCESS
;
}
}
wb_cdrep
::
wb_cdrep
(
wb_mvrep
*
mvrep
,
const
wb_orep
&
o
)
:
m_nRef
(
0
),
m_orep
(
0
)
wb_cdrep
::
wb_cdrep
(
wb_mvrep
*
mvrep
,
const
wb_orep
&
o
)
:
m_nRef
(
0
),
m_orep
(
0
)
,
m_merep
(
0
)
{
{
pwr_tOid
oid
=
cdh_ClassIdToObjid
(
o
.
cid
());
pwr_tOid
oid
=
cdh_ClassIdToObjid
(
o
.
cid
());
m_orep
=
mvrep
->
object
(
&
m_sts
,
oid
);
m_orep
=
mvrep
->
object
(
&
m_sts
,
oid
);
...
@@ -107,7 +107,7 @@ wb_cdrep::wb_cdrep( wb_mvrep *mvrep, const wb_orep& o) : m_nRef(0), m_orep(0)
...
@@ -107,7 +107,7 @@ wb_cdrep::wb_cdrep( wb_mvrep *mvrep, const wb_orep& o) : m_nRef(0), m_orep(0)
m_sts
=
LDH__SUCCESS
;
m_sts
=
LDH__SUCCESS
;
}
}
wb_cdrep
::
wb_cdrep
(
const
wb_orep
&
o
)
:
m_nRef
(
0
),
m_orep
(
0
)
wb_cdrep
::
wb_cdrep
(
const
wb_orep
&
o
)
:
m_nRef
(
0
),
m_orep
(
0
)
,
m_merep
(
0
)
{
{
pwr_tStatus
sts
;
pwr_tStatus
sts
;
...
@@ -120,7 +120,7 @@ wb_cdrep::wb_cdrep( const wb_orep& o) : m_nRef(0), m_orep(0)
...
@@ -120,7 +120,7 @@ wb_cdrep::wb_cdrep( const wb_orep& o) : m_nRef(0), m_orep(0)
}
}
}
}
wb_cdrep
::
wb_cdrep
(
wb_adrep
*
adrep
)
:
m_nRef
(
0
)
wb_cdrep
::
wb_cdrep
(
wb_adrep
*
adrep
)
:
m_nRef
(
0
)
,
m_merep
(
0
)
{
{
pwr_tStatus
sts
;
pwr_tStatus
sts
;
wb_orep
*
orep
=
adrep
->
m_orep
->
parent
(
&
sts
);
wb_orep
*
orep
=
adrep
->
m_orep
->
parent
(
&
sts
);
...
@@ -140,6 +140,7 @@ wb_bdrep *wb_cdrep::bdrep( pwr_tStatus *sts, const char *bname)
...
@@ -140,6 +140,7 @@ wb_bdrep *wb_cdrep::bdrep( pwr_tStatus *sts, const char *bname)
if
(
EVEN
(
*
sts
))
if
(
EVEN
(
*
sts
))
return
0
;
return
0
;
wb_bdrep
*
bdrep
=
new
wb_bdrep
(
*
orep
);
wb_bdrep
*
bdrep
=
new
wb_bdrep
(
*
orep
);
bdrep
->
merep
(
m_merep
);
return
bdrep
;
return
bdrep
;
}
}
...
@@ -151,6 +152,7 @@ wb_bdrep *wb_cdrep::bdrep( pwr_tStatus *sts, pwr_eBix bix)
...
@@ -151,6 +152,7 @@ wb_bdrep *wb_cdrep::bdrep( pwr_tStatus *sts, pwr_eBix bix)
if
(
orep
->
cid
()
==
pwr_eClass_ObjBodyDef
&&
if
(
orep
->
cid
()
==
pwr_eClass_ObjBodyDef
&&
cdh_oixToBix
(
orep
->
oid
().
oix
)
==
bix
)
{
cdh_oixToBix
(
orep
->
oid
().
oix
)
==
bix
)
{
wb_bdrep
*
bdrep
=
new
wb_bdrep
(
*
orep
);
wb_bdrep
*
bdrep
=
new
wb_bdrep
(
*
orep
);
bdrep
->
merep
(
m_merep
);
return
bdrep
;
return
bdrep
;
}
}
old
=
orep
;
old
=
orep
;
...
@@ -874,7 +876,11 @@ void wb_cdrep::updateTemplateSubClass( wb_adrep *subattr, char *body, pwr_tOid o
...
@@ -874,7 +876,11 @@ void wb_cdrep::updateTemplateSubClass( wb_adrep *subattr, char *body, pwr_tOid o
{
{
pwr_tStatus
sts
;
pwr_tStatus
sts
;
pwr_tCid
cid
=
subattr
->
subClass
();
pwr_tCid
cid
=
subattr
->
subClass
();
wb_cdrep
*
cdrep
=
m_orep
->
vrep
()
->
merep
()
->
cdrep
(
&
sts
,
cid
);
wb_cdrep
*
cdrep
;
if
(
m_merep
)
cdrep
=
m_merep
->
cdrep
(
&
sts
,
cid
);
else
cdrep
=
m_orep
->
vrep
()
->
merep
()
->
cdrep
(
&
sts
,
cid
);
if
(
EVEN
(
sts
))
throw
wb_error
(
sts
);
if
(
EVEN
(
sts
))
throw
wb_error
(
sts
);
wb_bdrep
*
bdrep
=
cdrep
->
bdrep
(
&
sts
,
pwr_eBix_rt
);
wb_bdrep
*
bdrep
=
cdrep
->
bdrep
(
&
sts
,
pwr_eBix_rt
);
if
(
EVEN
(
sts
))
throw
wb_error
(
sts
);
if
(
EVEN
(
sts
))
throw
wb_error
(
sts
);
...
...
wb/lib/wb/src/wb_cdrep.h
View file @
5ff20a88
...
@@ -38,6 +38,7 @@ class wb_cdrep
...
@@ -38,6 +38,7 @@ class wb_cdrep
int
m_nRef
;
int
m_nRef
;
wb_orep
*
m_orep
;
wb_orep
*
m_orep
;
pwr_tStatus
m_sts
;
pwr_tStatus
m_sts
;
wb_merep
*
m_merep
;
public:
public:
wb_cdrep
();
wb_cdrep
();
...
@@ -92,6 +93,7 @@ public:
...
@@ -92,6 +93,7 @@ public:
pwr_tStatus
sts
()
{
return
m_sts
;}
pwr_tStatus
sts
()
{
return
m_sts
;}
ldh_eVolRep
vtype
()
const
;
ldh_eVolRep
vtype
()
const
;
bool
renameClass
(
pwr_tStatus
*
sts
,
wb_name
&
name
);
bool
renameClass
(
pwr_tStatus
*
sts
,
wb_name
&
name
);
void
merep
(
wb_merep
*
me
)
{
m_merep
=
me
;}
};
};
#endif
#endif
...
...
wb/lib/wb/src/wb_merep.cpp
View file @
5ff20a88
...
@@ -310,7 +310,9 @@ wb_cdrep *wb_merep::cdrep( pwr_tStatus *sts, const wb_orep& o)
...
@@ -310,7 +310,9 @@ wb_cdrep *wb_merep::cdrep( pwr_tStatus *sts, const wb_orep& o)
return
0
;
return
0
;
}
}
*
sts
=
LDH__SUCCESS
;
*
sts
=
LDH__SUCCESS
;
return
it
->
second
->
cdrep
(
o
);
wb_cdrep
*
cd
=
it
->
second
->
cdrep
(
o
);
cd
->
merep
(
this
);
return
cd
;
}
}
wb_cdrep
*
wb_merep
::
cdrep
(
pwr_tStatus
*
sts
,
pwr_tCid
cid
)
wb_cdrep
*
wb_merep
::
cdrep
(
pwr_tStatus
*
sts
,
pwr_tCid
cid
)
...
@@ -322,7 +324,9 @@ wb_cdrep *wb_merep::cdrep( pwr_tStatus *sts, pwr_tCid cid)
...
@@ -322,7 +324,9 @@ wb_cdrep *wb_merep::cdrep( pwr_tStatus *sts, pwr_tCid cid)
}
}
try
{
try
{
*
sts
=
LDH__SUCCESS
;
*
sts
=
LDH__SUCCESS
;
return
it
->
second
->
cdrep
(
cid
);
wb_cdrep
*
cd
=
it
->
second
->
cdrep
(
cid
);
cd
->
merep
(
this
);
return
cd
;
}
}
catch
(
wb_error
&
e
)
{
catch
(
wb_error
&
e
)
{
*
sts
=
e
.
sts
();
*
sts
=
e
.
sts
();
...
@@ -339,6 +343,7 @@ wb_cdrep *wb_merep::cdrep( pwr_tStatus *sts, wb_name name)
...
@@ -339,6 +343,7 @@ wb_cdrep *wb_merep::cdrep( pwr_tStatus *sts, wb_name name)
if
(
EVEN
(
*
sts
))
return
0
;
if
(
EVEN
(
*
sts
))
return
0
;
try
{
try
{
cdrep
=
new
wb_cdrep
(
mvrep
,
name
);
cdrep
=
new
wb_cdrep
(
mvrep
,
name
);
cdrep
->
merep
(
this
);
*
sts
=
LDH__SUCCESS
;
*
sts
=
LDH__SUCCESS
;
return
cdrep
;
return
cdrep
;
}
}
...
@@ -351,6 +356,7 @@ wb_cdrep *wb_merep::cdrep( pwr_tStatus *sts, wb_name name)
...
@@ -351,6 +356,7 @@ wb_cdrep *wb_merep::cdrep( pwr_tStatus *sts, wb_name name)
for
(
mvrep_iterator
it
=
m_mvrepdbs
.
begin
();
it
!=
m_mvrepdbs
.
end
();
it
++
)
{
for
(
mvrep_iterator
it
=
m_mvrepdbs
.
begin
();
it
!=
m_mvrepdbs
.
end
();
it
++
)
{
try
{
try
{
cdrep
=
new
wb_cdrep
(
it
->
second
,
name
);
cdrep
=
new
wb_cdrep
(
it
->
second
,
name
);
cdrep
->
merep
(
this
);
*
sts
=
LDH__SUCCESS
;
*
sts
=
LDH__SUCCESS
;
return
cdrep
;
return
cdrep
;
}
}
...
...
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