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
9e1757fc
Commit
9e1757fc
authored
Feb 12, 2003
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*** empty log message ***
parent
1b55cb29
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
77 additions
and
13 deletions
+77
-13
wb/lib/wb/src/wb_cdrep.cpp
wb/lib/wb/src/wb_cdrep.cpp
+5
-0
wb/lib/wb/src/wb_cdrep.h
wb/lib/wb/src/wb_cdrep.h
+1
-1
wb/lib/wb/src/wb_ldh.cpp
wb/lib/wb/src/wb_ldh.cpp
+4
-1
wb/lib/wb/src/wb_merep.cpp
wb/lib/wb/src/wb_merep.cpp
+23
-1
wb/lib/wb/src/wb_merep.h
wb/lib/wb/src/wb_merep.h
+1
-0
wb/lib/wb/src/wb_tdrep.cpp
wb/lib/wb/src/wb_tdrep.cpp
+17
-0
wb/lib/wb/src/wb_tdrep.h
wb/lib/wb/src/wb_tdrep.h
+4
-2
wb/lib/wb/src/wb_vrepdbs.cpp
wb/lib/wb/src/wb_vrepdbs.cpp
+8
-5
wb/lib/wb/src/wb_vrepwbl.cpp
wb/lib/wb/src/wb_vrepwbl.cpp
+14
-3
No files found.
wb/lib/wb/src/wb_cdrep.cpp
View file @
9e1757fc
...
...
@@ -112,3 +112,8 @@ wb_name wb_cdrep::name()
wb_name
n
=
wb_name
(
m_orep
->
name
());
return
n
;
}
pwr_tCid
wb_cdrep
::
cid
()
{
return
cdh_ClassObjidToId
(
m_orep
->
oid
());
}
wb/lib/wb/src/wb_cdrep.h
View file @
9e1757fc
...
...
@@ -33,7 +33,7 @@ class wb_cdrep
//wb_object& operator=(const wb_orep&);
size_t
size
()
{
return
0
;}
// Fix get objects runtime body size
pwr_tCid
cid
()
{
return
0
;}
// Fix
pwr_tCid
cid
()
;
wb_name
name
();
// get class name
...
...
wb/lib/wb/src/wb_ldh.cpp
View file @
9e1757fc
...
...
@@ -896,7 +896,10 @@ pwr_tStatus
ldh_NameToObjid
(
ldh_tSession
session
,
pwr_tOid
*
oid
,
char
*
name
)
{
wb_session
*
sp
=
(
wb_session
*
)
session
;
wb_object
o
=
sp
->
object
(
name
);
wb_name
n
=
wb_name
(
name
);
if
(
n
.
evenSts
())
return
n
.
sts
();
wb_object
o
=
sp
->
object
(
n
);
if
(
!
o
)
return
o
.
sts
();
*
oid
=
o
.
oid
();
...
...
wb/lib/wb/src/wb_merep.cpp
View file @
9e1757fc
...
...
@@ -58,7 +58,8 @@ wb_cdrep *wb_merep::cdrep( pwr_tStatus *sts, const wb_orep& o)
// Fetch from other meta environment
return
m_erep
->
cdrep
(
sts
,
o
);
mvrep_iterator
it
=
m_mvrepdbs
.
find
(
cdh_CidToVid
(
o
.
cid
()));
pwr_tVid
vid
=
cdh_CidToVid
(
o
.
cid
());
mvrep_iterator
it
=
m_mvrepdbs
.
find
(
vid
);
if
(
it
==
m_mvrepdbs
.
end
())
{
*
sts
=
LDH__NOSUCHVOL
;
return
0
;
...
...
@@ -128,3 +129,24 @@ wb_tdrep *wb_merep::tdrep( pwr_tStatus *sts, pwr_tTid tid)
}
return
it
->
second
->
tdrep
(
tid
);
}
wb_tdrep
*
wb_merep
::
tdrep
(
pwr_tStatus
*
sts
,
wb_name
name
)
{
wb_tdrep
*
tdrep
;
for
(
mvrep_iterator
it
=
m_mvrepdbs
.
begin
();
it
!=
m_mvrepdbs
.
end
();
it
++
)
{
try
{
tdrep
=
new
wb_tdrep
(
it
->
second
,
name
);
*
sts
=
LDH__SUCCESS
;
return
tdrep
;
}
catch
(
wb_error
&
e
)
{
// Not found in this volume, try next
}
}
// Not found
*
sts
=
LDH__NOTYPE
;
return
0
;
}
wb/lib/wb/src/wb_merep.h
View file @
9e1757fc
...
...
@@ -31,6 +31,7 @@ class wb_merep {
wb_cdrep
*
cdrep
(
pwr_tStatus
*
sts
,
wb_name
name
);
wb_tdrep
*
tdrep
(
pwr_tStatus
*
sts
,
const
wb_adrep
&
a
);
wb_tdrep
*
tdrep
(
pwr_tStatus
*
sts
,
pwr_tTid
tid
);
wb_tdrep
*
tdrep
(
pwr_tStatus
*
sts
,
wb_name
name
);
};
#endif
wb/lib/wb/src/wb_tdrep.cpp
View file @
9e1757fc
...
...
@@ -34,6 +34,18 @@ wb_tdrep::wb_tdrep( wb_mvrep *mvrep, pwr_tTid tid) : m_nRef(0)
m_sts
=
LDH__SUCCESS
;
}
wb_tdrep
::
wb_tdrep
(
wb_mvrep
*
mvrep
,
wb_name
name
)
:
m_nRef
(
0
)
{
char
str
[
80
];
strcpy
(
str
,
"Type-"
);
strcat
(
str
,
name
.
object
());
m_orep
=
(
wb_orepdbs
*
)
mvrep
->
object
(
&
m_sts
,
str
);
if
(
EVEN
(
m_sts
))
throw
wb_error
(
m_sts
);
m_orep
->
ref
();
m_sts
=
LDH__SUCCESS
;
}
wb_tdrep
::
wb_tdrep
(
wb_mvrep
*
mvrep
,
const
wb_adrep
&
a
)
:
m_nRef
(
0
)
{
pwr_tOid
oid
=
cdh_TypeIdToObjid
(
a
.
type
());
...
...
@@ -54,3 +66,8 @@ wb_tdrep::wb_tdrep( const wb_adrep& a) : m_nRef(0)
m_orep
->
ref
();
delete
tdrep
;
}
pwr_tTid
wb_tdrep
::
tid
()
{
return
cdh_TypeObjidToId
(
m_orep
->
oid
());
}
wb/lib/wb/src/wb_tdrep.h
View file @
9e1757fc
...
...
@@ -18,15 +18,17 @@ class wb_tdrep
public:
wb_tdrep
();
wb_tdrep
(
wb_mvrep
*
,
pwr_tTid
);
wb_tdrep
(
wb_mvrep
*
mvrep
,
wb_name
name
);
wb_tdrep
(
const
wb_adrep
&
a
);
wb_tdrep
(
wb_mvrep
*
,
const
wb_adrep
&
);
wb_tdrep
(
wb_mvrep
*
,
pwr_tTid
);
void
unref
();
wb_tdrep
*
ref
();
size_t
size
()
{
return
0
;}
// Fix // get objects runtime body size
pwr_tTid
tid
()
{
return
0
;}
// Fix
pwr_tTid
tid
();
pwr_eType
type
()
{
return
(
pwr_eType
)
0
;}
// Fix
int
nElement
()
{
return
0
;}
// Fix
wb_name
name
()
{
wb_name
n
;
return
n
;}
// Fix // get type name
...
...
wb/lib/wb/src/wb_vrepdbs.cpp
View file @
9e1757fc
#include "wb_vrepdbs.h"
#include "wb_orepdbs.h"
#include "wb_erep.h"
#include "wb_merep.h"
void
wb_vrepdbs
::
unref
()
...
...
@@ -16,10 +17,7 @@ wb_vrep *wb_vrepdbs::ref()
wb_vrepdbs
::
wb_vrepdbs
(
wb_erep
*
erep
,
const
char
*
fileName
)
:
m_erep
(
erep
)
{
pwr_tStatus
sts
;
m_merep
=
new
wb_merep
(
m_erep
,
(
wb_mvrep
*
)
this
);
m_merep
->
addDbs
(
&
sts
,
(
wb_mvrep
*
)
this
);
// only if i am a class volume
strcpy
(
m_fileName
,
fileName
);
m_isDbsenvLoaded
=
false
;
}
...
...
@@ -49,7 +47,10 @@ wb_vrepdbs::dbsenv()
bool
wb_vrepdbs
::
load
()
{
return
dbsenv
()
!=
0
;
pwr_tStatus
sts
;
bool
rsts
=
(
dbsenv
()
!=
0
);
m_merep
->
addDbs
(
&
sts
,
(
wb_mvrep
*
)
this
);
// only if i am a class volume
return
rsts
;
}
...
...
@@ -364,7 +365,9 @@ wb_vrepdbs::erep() const
wb_vrep
*
wb_vrepdbs
::
next
()
const
{
return
0
;
pwr_tStatus
sts
;
return
m_erep
->
nextVolume
(
&
sts
,
vid
());
}
wb_merep
*
...
...
wb/lib/wb/src/wb_vrepwbl.cpp
View file @
9e1757fc
...
...
@@ -12,6 +12,8 @@
#include "wb_ldh_msg.h"
#include "wb_dbs.h"
#include "wb_erep.h"
#include "wb_merep.h"
#include "wb_tdrep.h"
#include "wb_ldh_msg.h"
extern
"C"
{
...
...
@@ -43,9 +45,9 @@ wb_orep *wb_vrepwbl::object(pwr_tStatus *sts, pwr_tOid oid)
return
new
wb_orepwbl
(
this
,
n
);
}
wb_orep
*
wb_vrepwbl
::
object
(
pwr_tStatus
*
sts
,
char
*
name
)
wb_orep
*
wb_vrepwbl
::
object
(
pwr_tStatus
*
sts
,
wb_name
name
)
{
ref_wblnode
n
=
find
(
name
);
ref_wblnode
n
=
find
(
name
.
name
()
);
if
(
!
n
)
{
*
sts
=
LDH__NOSUCHOBJ
;
return
0
;
...
...
@@ -313,7 +315,16 @@ int wb_vrepwbl::getTypeInfo( char *name, pwr_tTid *tid, pwr_eType *type, int *si
}
}
if
(
type_extern
)
{
return
0
;
// TODO...
pwr_tStatus
sts
;
wb_tdrep
*
tdrep
=
m_merep
->
tdrep
(
&
sts
,
wname
);
if
(
EVEN
(
sts
))
return
0
;
*
tid
=
tdrep
->
tid
();
*
type
=
tdrep
->
type
();
*
size
=
tdrep
->
size
();
*
elements
=
tdrep
->
nElement
();
return
1
;
}
return
1
;
}
...
...
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